/* ==========================================================================
   基金公告运营助手 · 设计系统（浅色 · 蓝青主色）
   ========================================================================== */
:root {
  --bg: #f2f5f9;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef2f7;
  --line: #e2e8f0;
  --line-2: #edf1f6;
  --text: #0f1b2d;
  --text-2: #3f4d63;
  --text-3: #7b8799;
  --text-4: #a3adbb;

  --primary: #1765e0;
  --primary-600: #0f54c4;
  --primary-50: #eaf2fe;
  --primary-100: #d5e5fd;
  --teal: #0aa29f;
  --teal-50: #e3f6f5;
  --green: #18a058;
  --green-50: #e6f6ed;
  --amber: #d98406;
  --amber-50: #fdf3e1;
  --rose: #dc3d4b;
  --rose-50: #fdecee;
  --sky: #0b8bd9;
  --sky-50: #e4f3fc;
  --slate: #64748b;
  --slate-50: #f0f3f7;

  --grad: linear-gradient(135deg, #1765e0 0%, #0aa29f 100%);
  --grad-soft: linear-gradient(135deg, rgba(23, 101, 224, .10), rgba(10, 162, 159, .10));
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(15, 27, 45, .05);
  --shadow-sm: 0 1px 3px rgba(15, 27, 45, .06), 0 1px 2px rgba(15, 27, 45, .04);
  --shadow: 0 4px 16px -4px rgba(15, 27, 45, .08), 0 2px 4px -2px rgba(15, 27, 45, .04);
  --shadow-lg: 0 18px 40px -12px rgba(15, 27, 45, .16), 0 6px 12px -6px rgba(15, 27, 45, .06);
  --ring: 0 0 0 3px rgba(23, 101, 224, .16);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --sidebar-w: 15rem;
  --topbar-h: 3.75rem;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

html { font-size: clamp(14.5px, 0.32vw + 10.8px, 18px); -webkit-text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  font-size: 1rem; line-height: 1.55; -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1;
}
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
::selection { background: rgba(23, 101, 224, .18); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cfd7e3; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #b6c1d1; background-clip: padding-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }
.ic { width: 1.1em; height: 1.1em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.18em; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.mono { font-family: var(--mono); }
.muted { color: var(--text-3); }
.hidden { display: none !important; }

/* ---------- 动态背景 ---------- */
.bg-mesh { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-mesh::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(23, 101, 224, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(23, 101, 224, .045) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}
.bg-mesh .blob { position: absolute; border-radius: 50%; opacity: .55; will-change: transform; }
.bg-mesh .b1 { width: 46vw; height: 46vw; left: -12vw; top: -18vw; background: radial-gradient(circle, rgba(23, 101, 224, .20), transparent 65%); animation: drift1 26s ease-in-out infinite alternate; }
.bg-mesh .b2 { width: 40vw; height: 40vw; right: -10vw; top: 8vh; background: radial-gradient(circle, rgba(10, 162, 159, .18), transparent 65%); animation: drift2 30s ease-in-out infinite alternate; }
.bg-mesh .b3 { width: 34vw; height: 34vw; left: 30vw; bottom: -20vw; background: radial-gradient(circle, rgba(11, 139, 217, .14), transparent 65%); animation: drift3 34s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(8vw, 6vh) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-6vw, 10vh) scale(.9); } }
@keyframes drift3 { to { transform: translate(-10vw, -8vh) scale(1.15); } }

/* ---------- 布局 ---------- */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; transition: grid-template-columns .35s var(--ease); }
.app.collapsed { --sidebar-w: 4.25rem; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: .9rem .7rem;
  background: rgba(255, 255, 255, .78); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-right: 1px solid var(--line); z-index: 30; overflow: hidden;
}
.brand { display: flex; align-items: center; gap: .65rem; padding: .25rem .45rem 1rem; white-space: nowrap; }
.logo { width: 2.25rem; height: 2.25rem; border-radius: 10px; background: var(--grad); display: grid; place-items: center; color: #fff; flex: none; box-shadow: 0 6px 14px -4px rgba(23, 101, 224, .45); position: relative; overflow: hidden; }
.logo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .5) 50%, transparent 70%); transform: translateX(-120%); animation: shine 5s ease-in-out infinite 2s; }
.logo svg { width: 1.3rem; height: 1.3rem; position: relative; z-index: 1; }
@keyframes shine { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.brand-t b { display: block; font-size: 1.02rem; font-weight: 700; letter-spacing: .01em; }
.brand-t span { display: block; font-size: .73rem; color: var(--text-3); letter-spacing: .14em; text-transform: uppercase; }
.nav { flex: 1; overflow-y: auto; overflow-x: hidden; margin: 0 -.2rem; padding: 0 .2rem; }
.nav-g { font-size: .77rem; color: var(--text-4); letter-spacing: .12em; padding: .9rem .7rem .35rem; white-space: nowrap; }
.nav a {
  position: relative; display: flex; align-items: center; gap: .7rem; padding: .56rem .7rem; margin: .1rem 0; border-radius: 9px;
  color: var(--text-2); font-size: .94rem; white-space: nowrap; transition: background .2s, color .2s;
}
.nav a .ic { font-size: 1.1rem; color: var(--text-3); transition: color .2s, transform .25s var(--ease); }
.nav a:hover { background: var(--surface-3); color: var(--text); }
.nav a:hover .ic { transform: scale(1.08); color: var(--primary); }
.nav a.active { background: var(--primary-50); color: var(--primary); font-weight: 600; }
.nav a.active .ic { color: var(--primary); }
.nav a.active::before { content: ""; position: absolute; left: -.7rem; top: 22%; bottom: 22%; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); animation: growY .35s var(--ease); }
@keyframes growY { from { transform: scaleY(0); } }
.nav a .cnt { margin-left: auto; font-size: .77rem; padding: 0 .42rem; border-radius: 10px; background: var(--surface-3); color: var(--text-3); line-height: 1.5; }
.nav a.active .cnt { background: #fff; color: var(--primary); }
.nav a .cnt.warn { background: var(--amber-50); color: var(--amber); }
.side-foot { border-top: 1px solid var(--line); padding-top: .7rem; display: grid; gap: .5rem; }
.model-card { border-radius: 10px; padding: .6rem .7rem; background: var(--grad-soft); border: 1px solid rgba(23, 101, 224, .12); font-size: .85rem; white-space: nowrap; overflow: hidden; }
.model-card .r { display: flex; align-items: center; gap: .4rem; }
.model-card b { font-size: .86rem; }
.model-card .bal { margin-top: .25rem; color: var(--text-2); display: flex; justify-content: space-between; }
.app.collapsed .brand-t, .app.collapsed .nav-g, .app.collapsed .nav a span, .app.collapsed .nav a .cnt, .app.collapsed .model-card { display: none; }
.app.collapsed .nav a { justify-content: center; padding: .6rem; }
.app.collapsed .brand { justify-content: center; padding-left: 0; padding-right: 0; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; align-items: center; gap: .8rem; padding: 0 1.25rem;
  background: rgba(242, 245, 249, .78); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid rgba(226, 232, 240, .8);
}
.icon-btn { width: 2.1rem; height: 2.1rem; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; transition: all .2s; position: relative; flex: none; }
.icon-btn:hover { background: #fff; border-color: var(--line); color: var(--primary); box-shadow: var(--shadow-xs); }
.icon-btn .ic { font-size: 1.1rem; }
.crumb { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.crumb h1 { font-size: 1.12rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb span { font-size: .81rem; color: var(--text-3); }
.top-search { margin-left: 1rem; flex: 0 1 22rem; position: relative; }
.top-search input { width: 100%; height: 2.2rem; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .85); padding: 0 .8rem 0 2.2rem; font-size: .90rem; outline: none; transition: all .2s; }
.top-search input:focus { border-color: var(--primary); box-shadow: var(--ring); background: #fff; }
.top-search .ic { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.top-search kbd { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); font-size: .75rem; color: var(--text-4); border: 1px solid var(--line); border-radius: 5px; padding: 0 .3rem; background: var(--surface-2); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.pill { display: inline-flex; align-items: center; gap: .4rem; height: 2.1rem; padding: 0 .75rem; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .9); font-size: .84rem; color: var(--text-2); white-space: nowrap; cursor: default; transition: all .2s; }
.pill.click { cursor: pointer; }
.pill.click:hover { border-color: var(--primary-100); box-shadow: var(--shadow-sm); color: var(--primary); }
.pill b { color: var(--text); font-weight: 650; }
.dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--green); flex: none; position: relative; }
.dot.live::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--green); opacity: 0; animation: ping 2s ease-out infinite; }
.dot.off { background: var(--rose); }
.dot.warn { background: var(--amber); }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.9); opacity: 0; } }
.badge-n { position: absolute; top: 2px; right: 2px; min-width: 1rem; height: 1rem; border-radius: 1rem; background: var(--rose); color: #fff; font-size: .69rem; display: grid; place-items: center; padding: 0 .2rem; border: 2px solid var(--bg); }
.avatar { width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .89rem; flex: none; }
.user-menu { position: relative; display: flex; align-items: center; gap: .5rem; cursor: pointer; padding: .15rem .35rem .15rem .15rem; border-radius: 12px; transition: background .2s; }
.user-menu:hover { background: rgba(255, 255, 255, .8); }
.user-menu .u b { display: block; font-size: .86rem; line-height: 1.2; }
.user-menu .u span { font-size: .77rem; color: var(--text-3); }
.dropdown { position: absolute; right: 0; top: calc(100% + .4rem); min-width: 11rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: .35rem; opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none; transition: all .2s var(--ease); z-index: 50; }
.dropdown.open { opacity: 1; transform: none; pointer-events: auto; }
.dropdown a, .dropdown button { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .5rem .65rem; border-radius: 8px; color: var(--text-2); font-size: .90rem; border: 0; background: none; cursor: pointer; text-align: left; }
.dropdown a:hover, .dropdown button:hover { background: var(--surface-3); color: var(--text); }
.dropdown .sep { height: 1px; background: var(--line); margin: .3rem 0; }
.notif { width: 22rem; padding: .5rem; }
.notif h4 { font-size: .89rem; padding: .35rem .5rem .5rem; display: flex; justify-content: space-between; }
.notif .it { display: flex; gap: .55rem; padding: .5rem; border-radius: 8px; font-size: .86rem; color: var(--text-2); align-items: flex-start; }
.notif .it:hover { background: var(--surface-2); }

.content { padding: 1rem 1.25rem 1.5rem; flex: 1; min-width: 0; }
.content > * { animation: fadeUp .55s var(--ease) both; }
.content > *:nth-child(2) { animation-delay: .05s; } .content > *:nth-child(3) { animation-delay: .1s; }
.content > *:nth-child(4) { animation-delay: .15s; } .content > *:nth-child(5) { animation-delay: .2s; }
.content > *:nth-child(6) { animation-delay: .25s; }
.stagger > * { animation: fadeUp .55s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .04s; } .stagger > *:nth-child(2) { animation-delay: .08s; } .stagger > *:nth-child(3) { animation-delay: .12s; }
.stagger > *:nth-child(4) { animation-delay: .16s; } .stagger > *:nth-child(5) { animation-delay: .2s; } .stagger > *:nth-child(6) { animation-delay: .24s; }
.stagger > *:nth-child(7) { animation-delay: .28s; } .stagger > *:nth-child(8) { animation-delay: .32s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.foot { padding: .6rem 1.25rem 1rem; font-size: .81rem; color: var(--text-4); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- 网格 ---------- */
.grid { display: grid; gap: .9rem; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.grid + .grid, .grid + .card, .card + .grid, .card + .card { margin-top: .9rem; }
.grid > .card + .card, .grid > .card + .grid, .grid > .grid + .card, .grid > .grid + .grid { margin-top: 0; }
.s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; } .s6 { grid-column: span 6; }
.s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s9 { grid-column: span 9; } .s12 { grid-column: span 12; }
.stack { display: flex; flex-direction: column; gap: .9rem; min-width: 0; }
.stack > * + *, .kpis > * + * { margin-top: 0 !important; }
.kpis + .grid, .kpis + .card { margin-top: .9rem; }
.row { display: flex; align-items: center; gap: .5rem; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

/* ---------- 卡片 ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); min-width: 0; position: relative; transition: box-shadow .25s, border-color .25s; }
.card.hover:hover { box-shadow: var(--shadow); border-color: #d6dee9; }
.card-h { display: flex; align-items: center; gap: .55rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line-2); min-height: 3rem; }
.card-h h3 { font-size: .97rem; display: flex; align-items: center; gap: .45rem; white-space: nowrap; }
.card-h h3 .ic { color: var(--primary); }
.card-h .sub { font-size: .83rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-h .act { margin-left: auto; display: flex; align-items: center; gap: .4rem; }
.card-b { padding: .85rem 1rem; }
.card-b.tight { padding: .5rem .6rem; }
.card-b.flush { padding: 0; }
.card-f { padding: .6rem 1rem; border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--text-3); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .9rem; }
.kpi { padding: .85rem 1rem .8rem; overflow: hidden; }
.kpi .t { display: flex; align-items: center; gap: .5rem; color: var(--text-3); font-size: .84rem; }
.kpi .ico { width: 1.9rem; height: 1.9rem; border-radius: 9px; display: grid; place-items: center; flex: none; }
.kpi .ico .ic { font-size: 1rem; }
.kpi .v { font-size: 1.75rem; font-weight: 700; margin: .45rem 0 .1rem; letter-spacing: -.02em; line-height: 1.15; }
.kpi .v small { font-size: .84rem; font-weight: 500; color: var(--text-3); margin-left: .2rem; }
.kpi .d { font-size: .83rem; color: var(--text-3); display: flex; align-items: center; gap: .35rem; white-space: nowrap; }
.kpi .spark { position: absolute; right: .6rem; bottom: .55rem; width: 38%; height: 2.1rem; opacity: .9; }
.kpi::after { content: ""; position: absolute; right: -2.5rem; top: -2.5rem; width: 6rem; height: 6rem; border-radius: 50%; background: currentColor; opacity: .04; }
.t-blue { color: var(--primary); } .t-teal { color: var(--teal); } .t-green { color: var(--green); } .t-amber { color: var(--amber); } .t-rose { color: var(--rose); } .t-sky { color: var(--sky); } .t-slate { color: var(--slate); }
.bg-blue { background: var(--primary-50); color: var(--primary); } .bg-teal { background: var(--teal-50); color: var(--teal); }
.bg-green { background: var(--green-50); color: var(--green); } .bg-amber { background: var(--amber-50); color: var(--amber); }
.bg-rose { background: var(--rose-50); color: var(--rose); } .bg-sky { background: var(--sky-50); color: var(--sky); } .bg-slate { background: var(--slate-50); color: var(--slate); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; height: 2.15rem; padding: 0 .9rem; border-radius: 9px;
  border: 1px solid var(--line); background: #fff; color: var(--text-2); font-size: .90rem; font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: all .2s var(--ease); position: relative; overflow: hidden; user-select: none;
}
.btn:hover { border-color: #cdd6e3; color: var(--text); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.sm { height: 1.85rem; padding: 0 .65rem; font-size: .84rem; border-radius: 8px; }
.btn.xs { height: 1.6rem; padding: 0 .5rem; font-size: .82rem; border-radius: 7px; gap: .25rem; }
.btn.lg { height: 2.6rem; padding: 0 1.3rem; font-size: .96rem; border-radius: 11px; }
.btn.primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 16px -6px rgba(23, 101, 224, .55); }
.btn.primary:hover { box-shadow: 0 10px 22px -8px rgba(23, 101, 224, .6); color: #fff; filter: saturate(1.1) brightness(1.03); }
.btn.primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%); transform: translateX(-120%); transition: transform .8s var(--ease); }
.btn.primary:hover::after { transform: translateX(120%); }
.btn.soft { background: var(--primary-50); color: var(--primary); border-color: transparent; }
.btn.soft:hover { background: var(--primary-100); color: var(--primary-600); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-3); transform: none; }
.btn.danger:hover { color: var(--rose); border-color: #f5c2c7; background: var(--rose-50); }
.btn.success { background: var(--green); color: #fff; border-color: transparent; }
.btn .spin { width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.pulse { animation: btnPulse 2.2s ease-in-out infinite; }
@keyframes btnPulse { 0%, 100% { box-shadow: 0 6px 16px -6px rgba(23, 101, 224, .55), 0 0 0 0 rgba(23, 101, 224, .35); } 50% { box-shadow: 0 6px 16px -6px rgba(23, 101, 224, .55), 0 0 0 7px rgba(23, 101, 224, 0); } }

/* ---------- 标签 ---------- */
.tag { display: inline-flex; align-items: center; gap: .3rem; height: 1.45rem; padding: 0 .5rem; border-radius: 6px; font-size: .81rem; font-weight: 550; white-space: nowrap; line-height: 1; }
.tag .ic { font-size: .89rem; }
.tag.sky { background: var(--sky-50); color: var(--sky); } .tag.amber { background: var(--amber-50); color: var(--amber); }
.tag.green { background: var(--green-50); color: var(--green); } .tag.slate { background: var(--slate-50); color: var(--slate); }
.tag.blue { background: var(--primary-50); color: var(--primary); } .tag.rose { background: var(--rose-50); color: var(--rose); }
.tag.teal { background: var(--teal-50); color: var(--teal); }
.tag.line { background: #fff; border: 1px solid var(--line); color: var(--text-2); }
.status { display: inline-flex; align-items: center; gap: .35rem; font-size: .84rem; color: var(--text-2); white-space: nowrap; }
.status i { width: .45rem; height: .45rem; border-radius: 50%; background: var(--slate); }
.status.parsed i { background: var(--sky); } .status.generated i { background: var(--amber); } .status.reviewed i { background: var(--green); }

/* ---------- 表单 ---------- */
.field { display: grid; gap: .3rem; }
.field > label { font-size: .84rem; color: var(--text-2); font-weight: 550; display: flex; align-items: center; gap: .35rem; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: .5rem .7rem; font-size: .92rem; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input, .select { height: 2.2rem; padding-top: 0; padding-bottom: 0; }
.input:hover, .select:hover, .textarea:hover { border-color: #cdd6e3; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: var(--ring); }
.textarea { resize: vertical; min-height: 4.2rem; line-height: 1.6; }
.select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237b8799' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .65rem center; padding-right: 2rem; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 3px; gap: 2px; position: relative; }
.seg button { border: 0; background: transparent; padding: .28rem .7rem; font-size: .84rem; border-radius: 7px; cursor: pointer; color: var(--text-3); transition: all .2s; white-space: nowrap; position: relative; z-index: 1; }
.seg button:hover { color: var(--text); }
.seg button.on { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); font-weight: 600; }
.switch { position: relative; width: 2.3rem; height: 1.3rem; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 1rem; background: #cfd7e3; transition: .25s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 1rem; height: 1rem; left: .15rem; top: .15rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: .25s var(--ease); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(1rem); }
.check { display: inline-flex; align-items: center; gap: .45rem; font-size: .88rem; color: var(--text-2); cursor: pointer; user-select: none; }
.check input { width: 1rem; height: 1rem; accent-color: var(--primary); }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .90rem; }
.table th { text-align: left; font-weight: 550; color: var(--text-3); font-size: .83rem; padding: .55rem .8rem; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.table td { padding: .65rem .8rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #f8fbff; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .t-title { font-weight: 600; color: var(--text); display: block; max-width: 30rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .t-title:hover { color: var(--primary); }
.kv { display: grid; grid-template-columns: minmax(6.5rem, max-content) 1fr; font-size: .90rem; }
.kv > div { padding: .45rem .1rem; border-bottom: 1px dashed var(--line-2); }
.kv > div:nth-child(odd) { color: var(--text-3); padding-right: 1rem; }
.kv > div:nth-child(even) { color: var(--text); font-weight: 500; word-break: break-all; }
.kv > div:nth-last-child(-n+2) { border-bottom: 0; }

/* ---------- 进度 / 步骤 ---------- */
.bar { height: .4rem; background: var(--surface-3); border-radius: 1rem; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--grad); border-radius: 1rem; width: 0; transition: width 1.1s var(--ease); }
.steps { display: flex; align-items: center; gap: 0; }
.step { display: flex; align-items: center; gap: .45rem; font-size: .84rem; color: var(--text-3); white-space: nowrap; }
.step .c { width: 1.45rem; height: 1.45rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); font-size: .79rem; font-weight: 700; flex: none; transition: all .3s; }
.step .c .ic { font-size: .89rem; stroke-width: 2.6; }
.step.done { color: var(--text-2); }
.step.done .c { background: var(--green); color: #fff; }
.step.cur { color: var(--primary); font-weight: 600; }
.step.cur .c { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(23, 101, 224, .15); animation: curPulse 1.8s ease-in-out infinite; }
@keyframes curPulse { 50% { box-shadow: 0 0 0 7px rgba(23, 101, 224, .06); } }
.step-line { flex: 1; min-width: 1rem; height: 2px; background: var(--line); margin: 0 .5rem; position: relative; overflow: hidden; border-radius: 2px; }
.step-line.done { background: var(--green); }
.step-line.flow::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--primary), transparent); animation: flow 1.4s linear infinite; }
@keyframes flow { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ---------- 时间轴 ---------- */
.tl { position: relative; padding-left: 1.2rem; }
.tl::before { content: ""; position: absolute; left: .38rem; top: .4rem; bottom: .4rem; width: 2px; background: linear-gradient(var(--primary-100), var(--line)); }
.tl-i { position: relative; padding: .35rem 0 .55rem .6rem; }
.tl-i::before { content: ""; position: absolute; left: -1.06rem; top: .62rem; width: .62rem; height: .62rem; border-radius: 50%; background: #fff; border: 2px solid var(--c, var(--primary)); box-shadow: 0 0 0 3px #fff; }
.tl-i .d { font-size: .83rem; color: var(--text-3); font-weight: 600; }
.tl-i .x { font-size: .89rem; color: var(--text); margin-top: .1rem; }
.tl-i .x small { color: var(--text-3); }

/* ---------- 列表 ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: .65rem; padding: .55rem .2rem; border-bottom: 1px solid var(--line-2); font-size: .90rem; min-width: 0; }
.li:last-child { border-bottom: 0; }
.li .ico { width: 1.85rem; height: 1.85rem; border-radius: 8px; display: grid; place-items: center; flex: none; }
.li .main-t { flex: 1; min-width: 0; }
.li .main-t b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .90rem; }
.li .main-t span { display: block; font-size: .82rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.li { color: inherit; border-radius: 8px; transition: background .15s, padding .2s; }
a.li:hover { background: var(--surface-2); padding-left: .45rem; }
.empty { text-align: center; padding: 2rem 1rem; color: var(--text-3); font-size: .90rem; }
.empty .ic { font-size: 2rem; color: var(--text-4); display: block; margin: 0 auto .5rem; stroke-width: 1.4; }

/* ---------- 指标块 ---------- */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.metric { border-radius: 10px; padding: .6rem .75rem; background: var(--surface-2); border: 1px solid var(--line-2); position: relative; overflow: hidden; animation: fadeUp .5s var(--ease) both; }
.metric::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--mc, var(--primary)); }
.metric .l { font-size: .81rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric .v { font-size: 1.08rem; font-weight: 700; margin-top: .15rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric.blue { --mc: var(--primary); } .metric.teal { --mc: var(--teal); } .metric.green { --mc: var(--green); } .metric.amber { --mc: var(--amber); }
.metric.rose { --mc: var(--rose); } .metric.slate { --mc: var(--slate); }
.metric.green .v { color: var(--green); } .metric.rose .v { color: var(--rose); } .metric.amber .v { color: var(--amber); }
.calc { counter-reset: s; display: grid; gap: .35rem; }
.calc li { list-style: none; position: relative; padding: .45rem .6rem .45rem 2.1rem; background: #fff; border: 1px solid var(--line-2); border-radius: 8px; font-size: .88rem; color: var(--text-2); animation: fadeUp .45s var(--ease) both; }
.calc li::before { counter-increment: s; content: counter(s); position: absolute; left: .55rem; top: .5rem; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--primary-50); color: var(--primary); font-size: .77rem; font-weight: 700; display: grid; place-items: center; }
.calc { padding: 0; margin: 0; }
.notes { margin: 0; padding: 0; display: grid; gap: .25rem; }
.notes li { list-style: none; font-size: .86rem; color: var(--text-2); display: flex; gap: .4rem; align-items: flex-start; }
.notes li .ic { margin-top: .2rem; font-size: .91rem; }
.callout { border-radius: 10px; padding: .65rem .8rem; font-size: .88rem; display: flex; gap: .55rem; align-items: flex-start; line-height: 1.6; }
.callout .ic { margin-top: .2rem; }
.callout.blue { background: var(--primary-50); color: #134a9e; } .callout.amber { background: var(--amber-50); color: #8a5300; }
.callout.green { background: var(--green-50); color: #0f6b3b; } .callout.rose { background: var(--rose-50); color: #9b1c27; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line-2); padding: 0 .6rem; overflow-x: auto; position: relative; }
.tabs button { border: 0; background: none; padding: .7rem .6rem; font-size: .90rem; color: var(--text-3); cursor: pointer; position: relative; white-space: nowrap; display: flex; align-items: center; gap: .35rem; transition: color .2s; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--primary); font-weight: 600; }
.tabs button.on::after { content: ""; position: absolute; left: .5rem; right: .5rem; bottom: -1px; height: 2px; border-radius: 2px; background: var(--grad); animation: tabIn .3s var(--ease); }
@keyframes tabIn { from { transform: scaleX(0); } }
.tabs button .n { font-size: .77rem; background: var(--surface-3); border-radius: 8px; padding: 0 .35rem; color: var(--text-3); }
.pane { display: none; }
.pane.on { display: block; animation: fadeIn .35s ease; }

/* ---------- Markdown ---------- */
.md { font-size: .91rem; line-height: 1.75; color: var(--text); word-wrap: break-word; }
.md > *:first-child { margin-top: 0; }
.md > *:last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3, .md h4 { margin: 1.1em 0 .5em; line-height: 1.35; }
.md h1 { font-size: 1.2rem; } .md h2 { font-size: 1.06rem; } .md h3 { font-size: .99rem; } .md h4 { font-size: .93rem; }
.md p { margin: .45em 0; }
.md ul, .md ol { margin: .4em 0; padding-left: 1.4em; }
.md li { margin: .18em 0; }
.md li::marker { color: var(--primary); }
.md strong { font-weight: 650; color: #0b1a33; }
.md blockquote { margin: .6em 0; padding: .45em .85em; border-left: 3px solid var(--teal); background: var(--teal-50); border-radius: 0 8px 8px 0; color: #0d5654; }
.md blockquote p { margin: .2em 0; }
.md code { font-family: var(--mono); font-size: .84em; background: var(--surface-3); padding: .1em .35em; border-radius: 5px; }
.md pre { background: #0f1b2d; color: #e6edf6; padding: .8rem 1rem; border-radius: 10px; overflow: auto; }
.md pre code { background: none; color: inherit; }
.md table { border-collapse: separate; border-spacing: 0; width: 100%; margin: .6em 0; font-size: .88rem; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; display: block; overflow-x: auto; }
.md thead { background: var(--surface-2); }
.md th { font-weight: 600; color: var(--text-2); text-align: left; white-space: nowrap; }
.md th, .md td { padding: .45rem .7rem; border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); vertical-align: top; }
.md tr > *:last-child { border-right: 0; }
.md tbody tr:last-child td { border-bottom: 0; }
.md tbody tr:nth-child(even) { background: #fafcfe; }
.md hr { border: 0; border-top: 1px dashed var(--line); margin: 1em 0; }
.md input[type=checkbox] { accent-color: var(--primary); margin-right: .35rem; }
.md li:has(> input[type=checkbox]) { list-style: none; margin-left: -1.3em; }
.cursor::after { content: ""; display: inline-block; width: .5em; height: 1.05em; margin-left: 2px; vertical-align: -.15em; background: var(--primary); border-radius: 2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- 思考过程 ---------- */
.think { border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 10px; margin-bottom: .7rem; font-size: .84rem; overflow: hidden; }
.think summary { list-style: none; cursor: pointer; padding: .45rem .7rem; display: flex; align-items: center; gap: .45rem; color: var(--text-3); user-select: none; }
.think summary::-webkit-details-marker { display: none; }
.think summary .ic { color: var(--teal); }
.think summary .chev { margin-left: auto; transition: transform .25s; }
.think[open] summary .chev { transform: rotate(180deg); }
.think .tb { padding: .1rem .8rem .6rem 2rem; color: var(--text-3); white-space: pre-wrap; max-height: 14rem; overflow: auto; line-height: 1.65; border-top: 1px dashed var(--line); padding-top: .5rem; }
.thinking-dots { display: inline-flex; gap: 3px; }
.thinking-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--teal); animation: bounce 1.2s ease-in-out infinite; }
.thinking-dots i:nth-child(2) { animation-delay: .15s; } .thinking-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-4px); opacity: 1; } }

/* ---------- 骨架屏 ---------- */
.sk { background: linear-gradient(90deg, var(--surface-3) 25%, #f7f9fc 37%, var(--surface-3) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 6px; height: .8rem; margin: .45rem 0; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- Toast / Modal ---------- */
.toasts { position: fixed; right: 1.2rem; top: 1rem; z-index: 999; display: grid; gap: .5rem; }
.toast { min-width: 16rem; max-width: 26rem; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow-lg); padding: .65rem .85rem; display: flex; gap: .55rem; align-items: flex-start; font-size: .90rem; animation: toastIn .35s var(--ease); }
.toast.out { animation: toastOut .3s ease forwards; }
.toast .ic { margin-top: .15rem; font-size: 1.05rem; }
.toast.ok .ic { color: var(--green); } .toast.err .ic { color: var(--rose); } .toast.info .ic { color: var(--primary); } .toast.warn .ic { color: var(--amber); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }
.modal-mask { position: fixed; inset: 0; background: rgba(15, 27, 45, .28); backdrop-filter: blur(3px); z-index: 100; display: grid; place-items: center; animation: fadeIn .2s; padding: 1rem; }
.modal { background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); width: min(30rem, 100%); animation: modalIn .3s var(--ease); overflow: hidden; }
.modal .mh { padding: 1rem 1.1rem .4rem; font-weight: 650; font-size: 1rem; display: flex; gap: .5rem; align-items: center; }
.modal .mb { padding: .2rem 1.1rem 1rem; color: var(--text-2); font-size: .92rem; }
.modal .mf { padding: .7rem 1.1rem; background: var(--surface-2); display: flex; justify-content: flex-end; gap: .5rem; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.97); } }

/* ---------- 合规徽章 ---------- */
.score { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; padding: .15rem .6rem .15rem .2rem; border-radius: 20px; font-weight: 600; white-space: nowrap; flex: none; }
.score b { min-width: 1.75rem; height: 1.75rem; padding: 0 .2rem; border-radius: 1rem; display: grid; place-items: center; color: #fff; font-size: .74rem; letter-spacing: -.02em; }
.score.pass { background: var(--green-50); color: var(--green); } .score.pass b { background: var(--green); }
.score.warn { background: var(--amber-50); color: var(--amber); } .score.warn b { background: var(--amber); }
.score.fail { background: var(--rose-50); color: var(--rose); } .score.fail b { background: var(--rose); }
mark.hit { background: rgba(220, 61, 75, .14); color: #a11a28; border-bottom: 2px solid var(--rose); border-radius: 3px; padding: 0 2px; }
mark.hit.medium { background: rgba(217, 132, 6, .14); color: #8a5300; border-bottom-color: var(--amber); }
mark.hit.low { background: rgba(11, 139, 217, .12); color: #075f96; border-bottom-color: var(--sky); }
mark.ign { background: rgba(100, 116, 139, .1); color: var(--text-2); border-bottom: 2px dotted var(--slate); }
mark.kw { background: linear-gradient(transparent 58%, rgba(10, 162, 159, .22) 58%); color: inherit; padding: 0 1px; }
mark.kd { background: linear-gradient(transparent 58%, rgba(23, 101, 224, .2) 58%); color: inherit; padding: 0 1px; }
mark.ka { background: linear-gradient(transparent 58%, rgba(217, 132, 6, .25) 58%); color: inherit; padding: 0 1px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1360px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1280px) {
  .app { --sidebar-w: 4.25rem; }
  .app .brand-t, .app .nav-g, .app .nav a span, .app .nav a .cnt, .app .model-card { display: none; }
  .app .nav a { justify-content: center; padding: .6rem; }
  .app .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .app.expanded { --sidebar-w: 15rem; }
  .app.expanded .brand-t, .app.expanded .nav-g, .app.expanded .nav a span, .app.expanded .model-card { display: block; }
  .app.expanded .nav a .cnt { display: inline; }
  .app.expanded .nav a { justify-content: flex-start; padding: .56rem .7rem; }
  .user-menu .u { display: none; }
  .top-search { flex-basis: 14rem; }
  .m-s12 { grid-column: span 12; }
  .m-s6 { grid-column: span 6; }
}
@media (max-width: 1024px) {
  .s3, .s4, .s5, .s6, .s7, .s8, .s9 { grid-column: span 12; }
  .t-s6 { grid-column: span 6; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-search { display: none; }
  .pill.hide-md { display: none; }
}
@media (max-width: 720px) {
  .app { grid-template-columns: 0 1fr; }
  .sidebar { position: fixed; left: 0; width: 15rem; transform: translateX(-100%); transition: transform .3s var(--ease); box-shadow: var(--shadow-lg); }
  .app.expanded .sidebar { transform: none; }
  .app.expanded { --sidebar-w: 0; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-s6 { grid-column: span 12; }
  .content { padding: .8rem; }
  .topbar { padding: 0 .8rem; }
  .pill.hide-sm { display: none; }
  .steps { flex-wrap: wrap; gap: .4rem; }
  .step-line { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- 规则可视化 ---------- */
.rule-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: .9rem; margin-top: .9rem; }
.rh { font-size: .86rem; font-weight: 650; margin-bottom: .45rem; display: flex; align-items: center; gap: .35rem; color: var(--text); }
.rh .ic { color: var(--primary); }
.viz { margin-top: .8rem; border: 1px solid var(--line-2); border-radius: 12px; padding: .8rem .9rem; background: linear-gradient(180deg, #fbfcfe, #fff); }
.viz-h { font-size: .86rem; font-weight: 650; display: flex; align-items: center; gap: .35rem; margin-bottom: .55rem; }
.viz-h .ic { color: var(--teal); }
.dv { position: relative; height: 9.6rem; margin: 0 .3rem; }
.dv-cols { position: absolute; inset: 0; display: flex; }
.dv-col { flex: 1; border-left: 1px dashed var(--line); position: relative; }
.dv-col:last-child { border-right: 1px dashed var(--line); }
.dv-col.wk { background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(100, 116, 139, .05) 6px 12px); }
.dv-col span { position: absolute; bottom: .1rem; left: 0; right: 0; text-align: center; font-size: .81rem; font-weight: 650; color: var(--text-2); }
.dv-col em { position: absolute; bottom: -.95rem; left: 0; right: 0; text-align: center; font-size: .71rem; color: var(--text-4); font-style: normal; }
.dv-line { position: absolute; left: 0; right: 0; top: 50%; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--primary-100), var(--teal-50)); }
.dv-ev { position: absolute; top: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; animation: fadeUp .5s var(--ease) both; z-index: 2; }
.dv-ev i { width: .8rem; height: .8rem; border-radius: 50%; background: #fff; border: 3px solid var(--c); margin-top: -.4rem; box-shadow: 0 0 0 3px #fff; }
.dv-ev b { font-size: .79rem; color: var(--c); margin-top: .3rem; white-space: nowrap; }
.dv-ev span { font-size: .73rem; color: var(--text-3); }
.dv-ev.up { flex-direction: column-reverse; transform: translate(-50%, -100%); }
.dv-ev.up i { margin-top: 0; margin-bottom: -.4rem; }
.dv-ev.up b { margin-top: 0; margin-bottom: .3rem; }
.dv-cut { position: absolute; top: .3rem; bottom: 1.4rem; border-left: 2px dashed var(--amber); z-index: 1; }
.dv-cut span { position: absolute; top: 0; left: .25rem; font-size: .71rem; color: var(--amber); white-space: nowrap; background: rgba(255, 255, 255, .9); padding: 0 .2rem; border-radius: 3px; }
.dv-req { position: absolute; top: 1.15rem; transform: translateX(-50%); z-index: 3; animation: fadeUp .5s var(--ease) .6s both; }
.dv-req span { display: inline-flex; align-items: center; gap: .2rem; font-size: .75rem; font-weight: 650; padding: .12rem .4rem; border-radius: 6px; white-space: nowrap; color: #fff; background: var(--rose); box-shadow: 0 4px 10px -4px rgba(220, 61, 75, .6); }
.dv-req.ok span { background: var(--green); box-shadow: 0 4px 10px -4px rgba(24, 160, 88, .6); }
.dv-req::after { content: ""; position: absolute; left: 50%; top: 100%; height: 2.1rem; border-left: 2px solid var(--rose); }
.dv-req.ok::after { border-color: var(--green); }
.dv-arrow { position: absolute; top: calc(50% + 1.9rem); height: 2px; background: var(--rose); z-index: 1; animation: growX .8s var(--ease) .9s both; transform-origin: left; }
.dv-arrow::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--rose); border-right: 0; }
.dv-arrow span { position: absolute; top: .2rem; left: 50%; transform: translateX(-50%); font-size: .71rem; color: var(--rose); white-space: nowrap; }
@keyframes growX { from { transform: scaleX(0); } }
.dv-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.dv-cmp .opt { border: 1px solid var(--line); border-radius: 11px; padding: .65rem .8rem; opacity: .62; transition: all .3s; }
.dv-cmp .opt.on { opacity: 1; border-color: #bfe6d0; background: var(--green-50); box-shadow: 0 6px 16px -10px rgba(24, 160, 88, .5); }
.dv-cmp .t { font-size: .84rem; font-weight: 650; display: flex; align-items: center; gap: .4rem; }
.dv-cmp .v { font-size: 1.45rem; font-weight: 750; margin: .2rem 0 .1rem; }
.dv-cmp .opt.on .v { color: var(--green); }
.dv-cmp .s { font-size: .79rem; color: var(--text-3); }
.dv-cmp .bar { margin-top: .45rem; height: .35rem; }
.dv-cmp .bar i { transition: width 1.2s var(--ease); background: var(--green); }
.lm { display: grid; grid-template-columns: 1fr 10rem; gap: .8rem; align-items: center; }
.lm-chart { height: 13rem; }
.lm-side { display: grid; gap: .45rem; }
.lm-k { padding: .45rem .6rem; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line-2); }
.lm-k span { display: block; font-size: .77rem; color: var(--text-3); }
.lm-k b { font-size: .96rem; }
.mg { display: grid; grid-template-columns: 1fr auto 1fr; gap: .8rem; align-items: center; }
.mg-g { border: 1px solid var(--line); border-radius: 12px; padding: .6rem .7rem; background: #fff; }
.mg-t { font-size: .81rem; color: var(--text-3); margin-bottom: .45rem; }
.mg-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.mg-p { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .45rem .7rem; border-radius: 10px; background: var(--surface-2); min-width: 4.6rem; animation: fadeUp .5s var(--ease) both; }
.mg-a { width: 2.3rem; height: 2.3rem; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; background: var(--grad); }
.mg-p b { font-size: .88rem; }
.mg-p.leave { opacity: .6; }
.mg-p.leave .mg-a { background: #c3ccd8; }
.mg-p.leave b { text-decoration: line-through; }
.mg-mid { display: flex; flex-direction: column; align-items: center; gap: .2rem; font-size: .79rem; color: var(--text-3); }
.mg-arrow { width: 4.5rem; height: 2px; background: var(--grad); position: relative; margin-bottom: .3rem; animation: growX .8s var(--ease) .3s both; transform-origin: left; }
.mg-arrow::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--teal); border-right: 0; }
.mg-note { margin-top: .6rem; font-size: .83rem; color: var(--text-2); display: flex; gap: .35rem; align-items: flex-start; }
.mg-note .ic { color: var(--sky); margin-top: .15rem; }
@media (max-width: 1024px) { .rule-cols, .lm { grid-template-columns: 1fr; } .mg { grid-template-columns: 1fr; } .mg-arrow { transform: rotate(90deg); } }

/* ==========================================================================
   视觉升级：更丰富的色彩、层次与动效
   ========================================================================== */
:root {
  --grad-2: linear-gradient(135deg, #0b8bd9 0%, #18a058 100%);
  --grad-3: linear-gradient(135deg, #f0a020 0%, #e5603a 100%);
  --grad-anim: linear-gradient(110deg, #1765e0, #0b8bd9, #0aa29f, #18a058, #0aa29f, #1765e0);
}
body { background: #eef3f8; }
.bg-mesh .blob { opacity: .8; }
.bg-mesh .b4 { width: 30vw; height: 30vw; right: 18vw; bottom: -14vw; background: radial-gradient(circle, rgba(240, 160, 32, .10), transparent 65%); animation: drift2 38s ease-in-out infinite alternate-reverse; }

/* 顶栏流光线 */
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--grad-anim); background-size: 300% 100%; animation: flowGrad 8s linear infinite; opacity: .55; }
@keyframes flowGrad { to { background-position: 300% 0; } }

/* 侧栏 */
.nav a { font-size: .95rem; }
.nav a .ic { width: 1.85rem; height: 1.85rem; padding: .38rem; border-radius: 8px; background: var(--surface-3); transition: all .25s var(--ease); }
.nav a:hover .ic { background: var(--primary-50); transform: none; }
.nav a.active { background: linear-gradient(90deg, rgba(23, 101, 224, .12), rgba(10, 162, 159, .06)); }
.nav a.active .ic { background: var(--grad); color: #fff; box-shadow: 0 4px 10px -3px rgba(23, 101, 224, .5); }
.app.collapsed .nav a .ic, .app .nav a .ic { flex: none; }
.model-card { background: linear-gradient(135deg, rgba(23, 101, 224, .1), rgba(10, 162, 159, .12)); }

/* 卡片：渐变图标徽章 + 悬停描边流光 */
.card { box-shadow: 0 1px 2px rgba(15, 27, 45, .04), 0 6px 18px -12px rgba(15, 27, 45, .12); }
.card:hover { box-shadow: 0 2px 4px rgba(15, 27, 45, .04), 0 14px 30px -16px rgba(15, 27, 45, .2); }
.card:not(.kpi):not(.hero)::after { content: ""; position: absolute; left: 1rem; right: 1rem; top: -1px; height: 2px; border-radius: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); pointer-events: none; }
.card:not(.kpi):not(.hero):hover::after { transform: scaleX(1); }
.card-h h3 { font-size: 1.02rem; }
.card-h h3 > .ic { width: 1.75rem; height: 1.75rem; padding: .36rem; border-radius: 8px; background: var(--grad); color: #fff; box-shadow: 0 4px 10px -4px rgba(23, 101, 224, .55); }
.card:hover .card-h h3 > .ic { animation: iconPop .5s var(--ease); }
@keyframes iconPop { 40% { transform: scale(1.15) rotate(-6deg); } }

/* KPI：浅色渐变底 + 彩色数值 */
.kpi { background: linear-gradient(140deg, color-mix(in srgb, currentColor 9%, #fff) 0%, #fff 62%); border-color: color-mix(in srgb, currentColor 16%, var(--line)); }
.kpi .t { color: var(--text-2); font-weight: 550; }
.kpi .ico { background: currentColor !important; }
.kpi .ico .ic { color: #fff; }
.kpi .v { color: currentColor; }
.kpi:hover { transform: translateY(-2px); }
.kpi { transition: transform .3s var(--ease), box-shadow .3s; }

/* 按钮：流动渐变 */
.btn.primary { background: linear-gradient(110deg, #1765e0, #0b8bd9 45%, #0aa29f); background-size: 180% 100%; background-position: 0 0; transition: all .35s var(--ease); }
.btn.primary:hover { background-position: 100% 0; }

/* 标签更饱满 */
.tag { height: 1.6rem; padding: 0 .55rem; border-radius: 7px; }

/* 表格 */
.table th { font-size: .82rem; }
.table td { font-size: .92rem; }
.table tbody tr:hover { background: linear-gradient(90deg, rgba(23, 101, 224, .05), transparent); }

/* ==========================================================================
   Markdown 渲染增强
   ========================================================================== */
.md { font-size: .96rem; line-height: 1.85; color: #1d2b40; }
.md p { margin: .5em 0; }
.md h1, .md h2 { font-size: 1.1rem; padding-left: .7rem; position: relative; margin: 1.2em 0 .6em; }
.md h1::before, .md h2::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 4px; border-radius: 4px; background: var(--grad); }
.md h3 { font-size: 1rem; color: var(--primary-600); display: flex; align-items: center; gap: .45rem; margin: 1.1em 0 .5em; }
.md h3::before { content: ""; width: .5rem; height: .5rem; border-radius: 2px; background: var(--teal); transform: rotate(45deg); flex: none; }
.md h4 { font-size: .96rem; color: var(--text); }
.md strong { color: #0b1a33; background: linear-gradient(transparent 62%, rgba(23, 101, 224, .13) 62%); padding: 0 1px; }
.md ul { list-style: none; padding-left: 1.3em; }
.md ul > li { position: relative; }
.md ul > li::before { content: ""; position: absolute; left: -1em; top: .72em; width: .42em; height: .42em; border-radius: 50%; background: var(--grad); }
.md ol { counter-reset: oli; list-style: none; padding-left: 2em; }
.md ol > li { counter-increment: oli; position: relative; margin: .35em 0; }
.md ol > li::before { content: counter(oli); position: absolute; left: -1.9em; top: .22em; width: 1.4em; height: 1.4em; border-radius: 50%; background: var(--primary-50); color: var(--primary); font-size: .78em; font-weight: 700; display: grid; place-items: center; }
.md li:has(> input[type=checkbox]) { list-style: none; margin-left: 0; padding: .35rem .6rem; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-2); margin-top: .35rem; display: flex; align-items: flex-start; gap: .5rem; }
.md li:has(> input[type=checkbox])::before { display: none; }
.md input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 1.05rem; height: 1.05rem; border: 2px solid #b8c6d8; border-radius: 5px; margin: .28rem 0 0; flex: none; background: #fff; }
.md input[type=checkbox]:checked { background: var(--green); border-color: var(--green); }
.md blockquote { position: relative; margin: .7em 0; padding: .6em 1em .6em 2.4em; border: 1px solid #c7ebe8; border-left: 4px solid var(--teal); background: linear-gradient(90deg, var(--teal-50), #fff); border-radius: 0 10px 10px 0; color: #0d4f4d; }
.md blockquote::before { content: "“"; position: absolute; left: .55em; top: -.05em; font-size: 2em; color: var(--teal); font-family: Georgia, serif; opacity: .7; }
.md .tbl { margin: .75em 0; border: 1px solid var(--line); border-radius: 11px; overflow: auto; box-shadow: 0 4px 14px -10px rgba(15, 27, 45, .2); }
.md .tbl table { margin: 0; border: 0; border-radius: 0; display: table; width: 100%; }
.md table { font-size: .9rem; }
.md thead { background: linear-gradient(90deg, #edf4fe, #eaf7f6); }
.md th { color: #1f3b63; font-weight: 650; padding: .55rem .8rem; }
.md td { padding: .55rem .8rem; }
.md tbody tr { transition: background .15s; }
.md tbody tr:hover { background: #f3f8ff; }
.md td:first-child { font-weight: 550; color: var(--text); }
.md hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); margin: 1.2em 0; }
.md code { color: #b4235a; background: #fbf0f4; }
.md .hl-d { color: var(--primary-600); font-weight: 600; background: var(--primary-50); padding: .02em .32em; border-radius: 5px; white-space: nowrap; }
.md .hl-m { color: #9a5b00; font-weight: 650; background: var(--amber-50); padding: .02em .32em; border-radius: 5px; white-space: nowrap; }
.md .wc { display: inline-block; font-size: .74em; font-weight: 600; color: var(--teal); background: var(--teal-50); border: 1px solid #c7ebe8; padding: 0 .45em; border-radius: 20px; margin-left: .3em; vertical-align: .1em; }
.md .qa { margin: .7em 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; transition: box-shadow .25s, transform .25s; }
.md .qa:hover { box-shadow: 0 8px 20px -14px rgba(15, 27, 45, .35); transform: translateY(-1px); }
.md .qa-q, .md .qa-a { display: flex; gap: .65rem; padding: .6rem .85rem; align-items: flex-start; }
.md .qa-q { background: linear-gradient(90deg, #eef5ff, #fff); font-weight: 600; color: #12305e; border-bottom: 1px dashed var(--line); }
.md .qa-a { color: #26364d; }
.md .qa i { font-style: normal; flex: none; width: 1.55rem; height: 1.55rem; border-radius: 7px; display: grid; place-items: center; font-size: .78rem; font-weight: 800; color: #fff; margin-top: .12rem; }
.md .qa-q i { background: var(--primary); }
.md .qa-a i { background: var(--teal); }
.md .qa-x { padding: .3rem .85rem; }
.md .lead { font-size: 1rem; padding: .7rem .9rem; border-radius: 10px; background: linear-gradient(120deg, rgba(23, 101, 224, .07), rgba(10, 162, 159, .06)); border: 1px solid rgba(23, 101, 224, .12); }

/* 顶栏在大字号下的自适应 */
.crumb { flex: 0 1 auto; }
.crumb span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 26rem; }
.top-search { flex: 0 1 17rem; }
.user-menu .u { white-space: nowrap; }
.pill { white-space: nowrap; flex: none; }
@media (max-width: 1560px) { .user-menu .u { display: none; } .top-search { flex-basis: 13rem; } }
@media (max-width: 1360px) { .crumb span { display: none; } .pill [data-model-state] { display: none; } }

/* 分红日期轴（重排，避免标签重叠） */
.dv { height: 10.2rem; }
.dv-line { top: 4.6rem; }
.dv-ev, .dv-ev.up { top: 4.6rem; transform: translateX(-50%); flex-direction: column; }
.dv-ev.up i { margin: -.4rem 0 0; }
.dv-ev.up b { margin: .3rem 0 0; }
.dv-ev b { max-width: 6.6rem; text-align: center; white-space: normal; line-height: 1.3; }
.dv-cut { top: .2rem; bottom: auto; height: 4.4rem; }
.dv-cut span { left: auto; right: .3rem; top: 2.2rem; }
.dv-req { top: .2rem; transform: none; }
.dv-req::after { left: 0; top: 100%; height: 3.1rem; }
.dv-req span { border-radius: 0 6px 6px 0; }
.dv-arrow { top: 3.9rem; }
.dv-arrow span { display: none; }
.dv { height: 11.2rem; }
.dv-ev.up b { margin-top: 1.9rem; }
.dv-ev.up::before { content: ""; position: absolute; top: .45rem; height: 1.75rem; border-left: 1px dashed var(--c); }
.dv-ev.up span { order: 3; }

/* 分红时间轴标签：不折行，靠边的事件向内对齐 */
.dv-ev b { white-space: nowrap; max-width: none; }
.dv-ev.edge-r { align-items: flex-end; transform: translateX(calc(-100% + .4rem)); }
.dv-ev.edge-l { align-items: flex-start; transform: translateX(-.4rem); }
.dv-ev.edge-r.up::before { right: .4rem; }
.dv-ev.edge-l.up::before { left: .4rem; }
/* 研判“依据条款”：引用更紧凑 */
.ai-sec.k-basis .md blockquote { margin: .35em 0; padding: .35em .8em .35em 2.1em; }
.ai-sec.k-basis .md blockquote::before { font-size: 1.6em; top: 0; }
.ai-sec.k-basis .md blockquote p { margin: .1em 0; }
