/* Utteria Design Tokens — from OD design system v1.1 (2026-10-09 定稿)
   1px = 1pt · Light/Dark 双形态 · 层级靠明度+阴影，描边仅兜底 */

:root {
  color-scheme: light;

  --font-display: 'Avenir Next', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'PingFang SC', 'Noto Sans SC', 'Hiragino Sans GB', system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', 'PingFang SC', 'Noto Sans SC', 'Hiragino Sans GB', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;

  --text-xs: 12px; --text-sm: 13px; --text-base: 14px; --text-md: 15px;
  --text-lg: 16px; --text-xl: 18px; --text-2xl: 20px; --text-3xl: 24px;
  --text-4xl: 28px; --text-5xl: 32px;
  --tracking-display: -0.015em; --tracking-tight: -0.01em; --tracking-wide: 0.02em;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px;

  --radius-xs: 4px; --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px;
  --radius-xl: 16px; --radius-full: 999px;

  --duration-fast: 120ms; --duration-base: 200ms; --duration-slow: 320ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-emphasized: cubic-bezier(0.05, 0.7, 0.1, 1);

  /* 背景层级 */
  --bg:             oklch(98% 0.005 250);
  --surface:        oklch(100% 0 0);
  --surface-2:      oklch(96% 0.006 250);
  --surface-3:      oklch(94% 0.008 250);
  --surface-hover:  oklch(95% 0.006 250);
  --overlay:        oklch(100% 0 0);

  /* 中性文字 */
  --fg:             oklch(22% 0.02 240);
  --fg-strong:      oklch(17% 0.02 240);
  --muted:          oklch(50% 0.018 240);
  --subtle:         oklch(55% 0.016 240);
  --faint:          oklch(74% 0.012 240);

  /* 描边 */
  --border:         oklch(90% 0.008 240);
  --border-strong:  oklch(84% 0.01 240);

  /* 品牌 + 语义 */
  --accent:         oklch(53% 0.15 145);
  --accent-hover:   oklch(47% 0.15 145);
  --accent-subtle:  oklch(96% 0.035 150);
  --on-accent:      #FFFFFF;
  --ring:           var(--accent);
  --positive:       oklch(51% 0.15 150);
  --positive-subtle:oklch(96% 0.04 150);
  --negative:       oklch(52% 0.19 28);
  --negative-subtle:oklch(96% 0.04 28);
  --warning:        oklch(46% 0.12 72);
  --warning-subtle: oklch(96% 0.045 85);
  --info:           oklch(52% 0.13 245);
  --info-subtle:    oklch(96% 0.03 245);
  --scrim:          rgba(7,17,23,0.42);

  /* 阴影 */
  --shadow-xs: 0 1px 2px rgba(7,17,23,0.06);
  --shadow-sm: 0 1px 3px rgba(7,17,23,0.08), 0 1px 2px rgba(7,17,23,0.04);
  --shadow-md: 0 6px 16px rgba(7,17,23,0.10), 0 1px 3px rgba(7,17,23,0.05);
  --shadow-lg: 0 16px 40px rgba(7,17,23,0.14), 0 2px 8px rgba(7,17,23,0.06);

  /* 图表 categorical（独立于品牌与语义） */
  --c1: oklch(53% 0.14 165); --c2: oklch(50% 0.15 255); --c3: oklch(52% 0.16 300);
  --c4: oklch(58% 0.13 205); --c5: oklch(52% 0.15 140); --c6: oklch(60% 0.16 115);
  --c7: oklch(60% 0.15 85);  --c8: oklch(55% 0.16 55);  --c9: oklch(53% 0.17 20);
  --c10: oklch(45% 0.04 250);
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg:             oklch(17% 0.018 250);
  --surface:        oklch(21% 0.02 250);
  --surface-2:      oklch(25% 0.022 250);
  --surface-3:      oklch(29% 0.024 250);
  --surface-hover:  oklch(27% 0.023 250);
  --overlay:        oklch(24% 0.023 250);

  --fg:             oklch(94% 0.006 250);
  --fg-strong:      oklch(98% 0.004 250);
  --muted:          oklch(70% 0.02 250);
  --subtle:         oklch(61% 0.02 250);
  --faint:          oklch(45% 0.02 250);

  --border:         oklch(30% 0.022 250);
  --border-strong:  oklch(38% 0.024 250);

  --accent:         oklch(74% 0.15 155);
  --accent-hover:   oklch(79% 0.14 155);
  --accent-subtle:  oklch(28% 0.05 155);
  --on-accent:      oklch(17% 0.02 240);
  --positive:       oklch(73% 0.15 150);
  --positive-subtle:oklch(28% 0.05 150);
  --negative:       oklch(71% 0.18 28);
  --negative-subtle:oklch(28% 0.06 28);
  --warning:        oklch(82% 0.14 85);
  --warning-subtle: oklch(30% 0.05 85);
  --info:           oklch(73% 0.13 245);
  --info-subtle:    oklch(28% 0.05 245);
  --scrim:          rgba(0,0,0,0.60);

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.30);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.38), 0 1px 2px rgba(0,0,0,0.24);
  --shadow-md: 0 6px 16px rgba(0,0,0,0.44), 0 1px 3px rgba(0,0,0,0.28);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.54), 0 2px 8px rgba(0,0,0,0.34);

  --c1: oklch(74% 0.14 165); --c2: oklch(74% 0.13 255); --c3: oklch(76% 0.14 300);
  --c4: oklch(78% 0.12 205); --c5: oklch(75% 0.15 140); --c6: oklch(80% 0.15 115);
  --c7: oklch(80% 0.14 85);  --c8: oklch(78% 0.14 55);  --c9: oklch(75% 0.15 20);
  --c10: oklch(70% 0.03 250);
}

/* ── Base ─────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard);
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--fg-strong); margin: 0; letter-spacing: var(--tracking-tight); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
::selection { background: var(--accent-subtle); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: var(--radius-xs); }
button { font-family: inherit; }

.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }

/* ── 布局 ─────────────────────────────── */
.shell { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { flex: 1; padding: var(--space-8); max-width: 1280px; width: 100%; margin: 0 auto; }
.page-head { margin-bottom: var(--space-6); }
.page-title { font-size: var(--text-3xl); font-weight: 700; }
.page-desc { color: var(--muted); margin-top: var(--space-1); font-size: var(--text-md); }

/* ── 侧边栏 ───────────────────────────── */
.sidebar {
  width: 232px; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  background: var(--surface); border-inline-end: 1px solid var(--border);
  display: flex; flex-direction: column; padding: var(--space-5) var(--space-3);
}
.brand { display: flex; align-items: center; gap: 10px; padding: var(--space-2) var(--space-2) var(--space-5); }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); color: var(--fg-strong); letter-spacing: var(--tracking-tight); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px var(--space-3);
  border-radius: var(--radius-md); color: var(--muted); font-size: var(--text-md); font-weight: 500;
  transition: background var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard);
}
.nav-item:hover { background: var(--surface-hover); color: var(--fg); }
.nav-item.active { background: var(--accent-subtle); color: var(--accent); font-weight: 600; }
.nav-item svg { flex-shrink: 0; }

/* ── 顶栏 ─────────────────────────────── */
.topbar {
  height: 60px; display: flex; align-items: center; gap: var(--space-4);
  padding: 0 var(--space-8); border-bottom: 1px solid var(--border);
  background: var(--surface); position: sticky; top: 0; z-index: 50;
}
.searchbox { position: relative; flex: 1; max-width: 460px; }
.searchbox input {
  width: 100%; height: 36px; padding: 0 var(--space-3) 0 36px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-2); color: var(--fg); font-size: var(--text-md);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast), background var(--duration-fast);
}
.searchbox input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 18%, transparent); }
.searchbox > svg { position: absolute; inset-inline-start: 11px; top: 10px; color: var(--faint); pointer-events: none; }
.search-drop {
  position: absolute; top: 42px; inset-inline-start: 0; inset-inline-end: 0; max-height: 380px; overflow: auto;
  background: var(--overlay); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); z-index: 60;
}
.search-hit { display: flex; align-items: center; gap: 10px; padding: 10px var(--space-3); cursor: pointer; }
.search-hit:hover { background: var(--surface-hover); }
.search-hit + .search-hit { border-top: 1px solid var(--border); }
.topbar-right { margin-inline-start: auto; display: flex; align-items: center; gap: var(--space-3); }

.tool-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); color: var(--muted); cursor: pointer;
  transition: all var(--duration-fast) var(--ease-standard);
}
.tool-btn:hover { color: var(--fg); background: var(--surface-hover); }

.user-chip {
  display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px;
  border: 1px solid var(--border); border-radius: var(--radius-full);
  background: var(--surface); cursor: pointer; font-size: var(--text-sm); color: var(--fg);
}
.user-chip:hover { background: var(--surface-hover); }
.avatar {
  width: 26px; height: 26px; border-radius: var(--radius-full);
  background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center; font-size: var(--text-xs); font-weight: 700;
}
.menu {
  position: absolute; inset-inline-end: 0; top: 46px; min-width: 200px;
  background: var(--overlay); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); z-index: 70; overflow: hidden;
}
.menu-item { display: block; width: 100%; text-align: start; padding: 10px var(--space-4); font-size: var(--text-md); color: var(--fg); background: none; border: none; cursor: pointer; }
.menu-item:hover { background: var(--surface-hover); }
.menu-sep { height: 1px; background: var(--border); }
.user-wrap { position: relative; }

/* ── 卡片 ─────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-xs);
}
.card-pad { padding: var(--space-6); }
.card-title { font-size: var(--text-lg); font-weight: 700; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-5) var(--space-6) 0; }
.card-link { font-size: var(--text-sm); font-weight: 600; }

.grid { display: grid; gap: var(--space-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .grid-2, .grid-4 { grid-template-columns: 1fr; } }

/* 指标卡 */
.stat { padding: var(--space-5); }
.stat-label { font-size: var(--text-sm); color: var(--muted); font-weight: 500; }
.stat-value { font-family: var(--font-mono); font-size: var(--text-4xl); font-weight: 700; color: var(--fg-strong); margin-top: var(--space-1); letter-spacing: var(--tracking-tight); }
.stat-foot { font-size: var(--text-xs); color: var(--faint); margin-top: var(--space-1); }

/* ── 按钮 ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 var(--space-5); border-radius: var(--radius-md);
  font-size: var(--text-md); font-weight: 600; cursor: pointer; border: 1px solid transparent;
  transition: all var(--duration-fast) var(--ease-standard);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--fg); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-hover); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-hover); color: var(--fg); }
.btn-danger { background: transparent; color: var(--negative); border-color: color-mix(in oklch, var(--negative) 35%, transparent); }
.btn-danger:hover:not(:disabled) { background: var(--negative-subtle); }
.btn-sm { height: 30px; padding: 0 var(--space-3); font-size: var(--text-sm); }
.btn-block { width: 100%; }

/* ── 表单 ─────────────────────────────── */
.field { margin-bottom: var(--space-4); }
.field label { display: block; font-size: var(--text-sm); font-weight: 600; color: var(--fg); margin-bottom: 6px; }
.input {
  width: 100%; height: 42px; padding: 0 var(--space-3);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--surface); color: var(--fg); font-size: var(--text-md);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 18%, transparent); }
.input::placeholder { color: var(--faint); }
.form-error {
  background: var(--negative-subtle); color: var(--negative);
  border-radius: var(--radius-md); padding: 10px var(--space-3);
  font-size: var(--text-sm); margin-bottom: var(--space-4);
}
.form-ok {
  background: var(--positive-subtle); color: var(--positive);
  border-radius: var(--radius-md); padding: 10px var(--space-3);
  font-size: var(--text-sm); margin-bottom: var(--space-4);
}

/* OTP 输入 */
.otp-row { display: flex; gap: 10px; justify-content: center; margin: var(--space-5) 0; }
.otp-box {
  width: 48px; height: 58px; text-align: center;
  font-family: var(--font-mono); font-size: var(--text-3xl); font-weight: 700; color: var(--fg-strong);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.otp-box:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 18%, transparent); }

/* ── Badge / Tag / Delta ─────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--text-xs); font-weight: 600; padding: 3px 9px; border-radius: var(--radius-full);
  background: var(--surface-2); color: var(--muted); white-space: nowrap;
}
.badge-accent { background: var(--accent-subtle); color: var(--accent); }
.badge-positive { background: var(--positive-subtle); color: var(--positive); }
.badge-negative { background: var(--negative-subtle); color: var(--negative); }
.badge-warning { background: var(--warning-subtle); color: var(--warning); }
.badge-info { background: var(--info-subtle); color: var(--info); }

/* Delta 三重编码：颜色 + 箭头 + 符号（国际化硬性规则） */
.delta { display: inline-flex; align-items: center; gap: 3px; font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta.up { color: var(--positive); }
.delta.down { color: var(--negative); }
.delta.flat { color: var(--muted); }

/* ── Chips 筛选 ───────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  padding: 6px 14px; border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: 500;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); cursor: pointer;
  transition: all var(--duration-fast) var(--ease-standard);
}
.chip:hover { color: var(--fg); border-color: var(--border-strong); }
.chip.on { background: var(--accent-subtle); border-color: color-mix(in oklch, var(--accent) 40%, transparent); color: var(--accent); font-weight: 600; }

/* 分段控件 */
.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--radius-md); padding: 3px; gap: 2px; }
.seg-opt {
  padding: 6px 16px; border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 600;
  color: var(--muted); cursor: pointer; border: none; background: transparent;
  transition: all var(--duration-fast) var(--ease-standard);
}
.seg-opt:hover { color: var(--fg); }
.seg-opt.on { background: var(--surface); color: var(--fg-strong); box-shadow: var(--shadow-xs); }

/* ── 表格 ─────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: var(--text-md); }
.tbl th {
  text-align: start; font-size: var(--text-xs); font-weight: 600; text-transform: uppercase;
  letter-spacing: var(--tracking-wide); color: var(--subtle);
  padding: 10px var(--space-4); border-bottom: 1px solid var(--border-strong); white-space: nowrap;
}
.tbl td { padding: 12px var(--space-4); border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr { transition: background var(--duration-fast); }
.tbl tbody tr:hover { background: var(--surface-hover); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .num { text-align: end; }
.tbl th.num { text-align: end; }
.row-click { cursor: pointer; }

/* App 单元格 */
.app-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.app-name { font-weight: 600; color: var(--fg-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-sub { font-size: var(--text-xs); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff;
  font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700;
}

/* ── 事件流 ───────────────────────────── */
.event {
  display: flex; gap: var(--space-4); padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border);
  transition: background var(--duration-fast);
}
.event:hover { background: var(--surface-hover); }
.event:last-child { border-bottom: none; }
.event-body { flex: 1; min-width: 0; }
.event-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.event-detail { font-size: var(--text-sm); color: var(--muted); margin-top: 4px; line-height: 1.6; }
.event-date { font-size: var(--text-xs); color: var(--faint); white-space: nowrap; font-family: var(--font-mono); }

/* ── 时间轴（政策） ───────────────────── */
.timeline { position: relative; padding-inline-start: 28px; }
.timeline::before { content: ''; position: absolute; inset-inline-start: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--border); border-radius: 2px; }
.tl-item { position: relative; padding: 0 0 var(--space-6); }
.tl-item::before {
  content: ''; position: absolute; inset-inline-start: -25px; top: 6px; width: 10px; height: 10px;
  border-radius: var(--radius-full); background: var(--surface); border: 2px solid var(--accent);
}
.tl-item.warn::before { border-color: var(--warning); }
.tl-title { font-weight: 600; color: var(--fg-strong); font-size: var(--text-md); }
.tl-excerpt { color: var(--muted); font-size: var(--text-sm); margin-top: 4px; line-height: 1.6; }
.tl-date { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--faint); }

/* ── 图表 ─────────────────────────────── */
.chart-box { padding: var(--space-5) var(--space-6) var(--space-4); }
.chart-title { font-size: var(--text-sm); font-weight: 600; color: var(--muted); margin-bottom: var(--space-2); }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-svg text { font-family: var(--font-mono); font-size: 10px; fill: var(--faint); }
.chart-svg .grid-line { stroke: var(--border); stroke-width: 1; }
.chart-svg .line-main { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart-svg .area-fill { fill: var(--accent); opacity: 0.10; }
.chart-svg .dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }

/* ── 空状态 / 加载 ────────────────────── */
.empty { text-align: center; padding: var(--space-12) var(--space-6); color: var(--faint); }
.empty-glyph {
  width: 44px; height: 44px; margin: 0 auto var(--space-3); border-radius: var(--radius-lg);
  background: var(--surface-2); display: grid; place-items: center; color: var(--faint);
}
.empty-title { font-weight: 600; color: var(--muted); font-size: var(--text-md); }
.empty-desc { font-size: var(--text-sm); margin-top: 4px; max-width: 380px; margin-inline-start: auto; margin-inline-end: auto; line-height: 1.6; }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid color-mix(in oklch, currentColor 25%, transparent);
  border-top-color: currentColor; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-wrap { display: flex; align-items: center; justify-content: center; gap: 10px; padding: var(--space-12); color: var(--faint); font-size: var(--text-sm); }

.skeleton { background: var(--surface-2); border-radius: var(--radius-md); min-height: 16px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ── 登录页 ───────────────────────────── */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: var(--space-6); }
.login-card { width: 100%; max-width: 400px; padding: var(--space-10) var(--space-8); }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: var(--space-8); }
.login-title { font-size: var(--text-2xl); font-weight: 700; margin-bottom: var(--space-1); }
.login-sub { color: var(--muted); font-size: var(--text-md); margin-bottom: var(--space-6); }
.login-foot { text-align: center; margin-top: var(--space-6); font-size: var(--text-xs); color: var(--faint); line-height: 1.8; }

/* ── 详情页头 ─────────────────────────── */
.detail-head { display: flex; align-items: flex-start; gap: var(--space-4); flex-wrap: wrap; }
.detail-head .tile { width: 56px; height: 56px; border-radius: 14px; font-size: var(--text-2xl); }
.detail-actions { margin-inline-start: auto; display: flex; gap: var(--space-3); }
.tag-row { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-3); }

/* 收藏星标 */
.star { background: none; border: none; cursor: pointer; color: var(--faint); padding: 4px; transition: all var(--duration-fast); border-radius: var(--radius-sm); display: grid; place-items: center; }
.star:hover { color: var(--warning); background: var(--surface-hover); }
.star.on { color: var(--warning); }
.star.pop svg { animation: starpop 320ms var(--ease-emphasized); }
@keyframes starpop { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-5); }
.toolbar.toolbar-inline { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.toolbar.toolbar-inline > * { flex: 0 0 auto; }
@media (max-width: 860px) { .toolbar.toolbar-inline { flex-wrap: wrap; overflow-x: visible; } }
.toolbar .spacer { flex: 1; }

/* Toast */
.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--fg-strong); color: var(--bg);
  padding: 10px 20px; border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: 500;
  box-shadow: var(--shadow-lg); animation: toastin 240ms var(--ease-emphasized);
}
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── 响应式：侧边栏折叠 ───────────────── */
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar { display: none; }
  .menu-toggle { display: grid; }
  .content { padding: var(--space-5); }
  .topbar { padding: 0 var(--space-5); }
  .mobile-nav {
    display: flex; gap: 2px; overflow-x: auto; padding: var(--space-2) var(--space-5);
    background: var(--surface); border-bottom: 1px solid var(--border);
  }
  .mobile-nav .nav-item { white-space: nowrap; }
}
.mobile-nav { display: none; }
@media (max-width: 900px) { .mobile-nav { display: flex; } }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ── RTL 兼容（未来阿拉伯语/希伯来语） ──
   布局已全部使用逻辑属性；方向性图标加 .flip-rtl 即在 RTL 下自动镜像 */
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

/* 数据永远 LTR：数字、图表、验证码框不受文字方向影响（国际数据产品通行规则） */
.num, .chart-svg, .otp-row, .otp-box, .delta { direction: ltr; }

/* ── 每日新冒头（New Findings） ── */
.finding-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-3); }
.finding-item { display: block; padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-lg, 12px); background: var(--surface); text-decoration: none; color: inherit; transition: border-color .15s, transform .1s; }
.finding-item:hover { border-color: var(--brand, #1F812D); transform: translateY(-1px); }
.finding-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.finding-date { font-size: var(--text-xs); color: var(--faint); }
.finding-name { font-weight: 600; font-size: var(--text-sm); margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finding-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: var(--text-xs); color: var(--muted); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: var(--text-xs); font-weight: 600; }
.badge-chart { background: color-mix(in srgb, var(--brand, #1F812D) 12%, transparent); color: var(--brand, #1F812D); }
.badge-intensity { background: color-mix(in srgb, #B45309 12%, transparent); color: #B45309; }

/* ── 策略解读卡（M2） ── */
.insight-card { border-inline-start: 3px solid var(--brand, #1F812D); }
.insight-anchor { font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--space-3); }
.insight-learn { font-size: var(--text-sm); line-height: 1.7; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.insight-learn:last-of-type { border-bottom: none; }

/* ══════════════════════════════════════════════════════════════
   Intelligence pages（榜单雷达 / 定价情报 / 痛点与需求 / 机会清单 / App 360）
   交互约定：筛选条吸顶 · 结果原地更新 · 不做手势/弹模态/无限滚动
   ══════════════════════════════════════════════════════════════ */

.page-head.tight { margin-bottom: var(--space-4); }
.page-head.tight .page-title { font-size: var(--text-2xl); }

/* ── 吸顶筛选条 ── */
.sticky-filters {
  position: sticky; top: 60px; z-index: 40;
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: box-shadow 150ms ease-out, border-color 150ms ease-out;
}
.sticky-filters.is-scrolled { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.filters-row { display: flex; align-items: flex-end; gap: var(--space-3); flex-wrap: wrap; }
.filters-controls { display: flex; align-items: flex-end; gap: var(--space-3); flex-wrap: wrap; min-width: 0; }
.filters-right { margin-inline-start: auto; display: flex; align-items: center; gap: var(--space-2); }
.filter-stamp { font-size: var(--text-xs); color: var(--subtle); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.filter-stamp b { color: var(--fg); font-weight: 600; }
.stamp-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--positive); flex-shrink: 0; }
.stamp-dot.busy { background: var(--warning); animation: pulse 1.1s ease-in-out infinite; }
.field-inline { display: inline-flex; flex-direction: column; gap: 4px; }
.field-label { font-size: var(--text-xs); color: var(--subtle); font-weight: 600; white-space: nowrap; }
.select {
  height: 32px; padding: 0 26px 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background-color: var(--surface-2); color: var(--fg); font-size: var(--text-sm); font-weight: 600;
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 14px, calc(100% - 9px) 14px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 18%, transparent); }
.seg-wrap { display: inline-flex; flex-direction: column; gap: 4px; }
.seg-wrap .seg { height: 32px; align-items: center; }
.seg-wrap .seg-opt { padding: 4px 11px; font-size: var(--text-xs); }
.filters-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-2); }
.chips-label { font-size: var(--text-xs); color: var(--faint); }
.chip-removable { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; font-size: var(--text-xs); }
.chip-x { opacity: .65; font-size: var(--text-sm); line-height: 1; }
.chip-removable:hover .chip-x { opacity: 1; }
.sample-wrap { display: inline-flex; align-items: center; gap: 6px; }
.sample-note { font-size: var(--text-xs); color: var(--warning); }
.filters-hint { font-size: var(--text-xs); color: var(--faint); margin-inline-start: auto; }

/* ── 结果区：骨架 / 淡入 / 空态 ── */
.result-frame { position: relative; scroll-margin-top: 152px; }
.result-content { }
.fade-in { animation: fadein 200ms ease-out; }
@keyframes fadein { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }
.updated-pill {
  position: absolute; top: 8px; inset-inline-end: 12px; z-index: 2;
  background: var(--positive-subtle); color: var(--positive);
  font-size: var(--text-xs); font-weight: 600; padding: 3px 10px;
  border-radius: var(--radius-full); animation: pillin 160ms ease-out;
}
@keyframes pillin { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.result-state { min-height: 240px; display: grid; place-items: center; }
.state-action { margin-top: calc(-1 * var(--space-4)); padding-bottom: var(--space-6); text-align: center; }
.skeleton-head { height: 30px; margin-bottom: 8px; }
.sk-list { display: flex; flex-direction: column; gap: 6px; }
.sk-row {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) 110px 84px; gap: 12px; align-items: center;
  padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface);
}
.sk-cell { height: 11px; }
.sk-sm { } .sk-md { } .sk-lg { }
.sk-row .sk-cell:last-child { justify-self: end; width: 70px; }

/* ── 榜单行（桌面表格 / 移动两行卡片，无横向滚动） ── */
.list-card { overflow: hidden; }
.rank-head, .rank-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 120px 92px 132px 112px 18px; gap: var(--space-3); align-items: center; }
.rank-head {
  padding: 9px var(--space-4); font-size: var(--text-xs); text-transform: uppercase;
  letter-spacing: var(--tracking-wide); color: var(--subtle); font-weight: 600;
  border-bottom: 1px solid var(--border-strong);
}
.rank-head > span:nth-child(4), .rank-head > span:nth-child(6) { text-align: end; }
.rank-row {
  padding: 8px var(--space-4); border-bottom: 1px solid var(--border);
  color: inherit; text-decoration: none; min-height: 52px;
  transition: background var(--duration-fast) var(--ease-standard);
}
.rank-row:hover { background: var(--surface-hover); }
.rank-row:last-child { border-bottom: none; }
.rank-pos { font-family: var(--font-mono); font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.rank-pos.top { color: var(--accent); }
.rank-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rank-name { font-weight: 600; color: var(--fg-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-cat { font-size: var(--text-xs); color: var(--subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-cat-cell { font-size: var(--text-sm); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-cell { font-size: var(--text-sm); color: var(--fg); white-space: nowrap; }
.rank-cell.monet { color: var(--muted); }
.rank-cell.end { text-align: end; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.rank-chev { color: var(--faint); text-align: end; }
.rank-mobile-meta { display: none; }

/* ── 条形图列表（价格档 / 标签 / 热度榜） ── */
.barlist { display: flex; flex-direction: column; }
.barrow {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) 62px; gap: 10px; align-items: center;
  padding: 5px 0; font-size: var(--text-sm); border-radius: var(--radius-sm);
}
.barrow.clickable { cursor: pointer; padding-inline: 6px; }
.barrow.clickable:hover { background: var(--surface-hover); }
.barrow.active .barrow-label { color: var(--accent); font-weight: 600; }
.barrow-label { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barrow-track { height: 9px; background: var(--surface-3); border-radius: var(--radius-full); overflow: hidden; }
.barrow-fill { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-full); }
.barrow-fill.tone-warning { background: var(--warning); }
.barrow-fill.tone-negative { background: var(--negative); }
.barrow-fill.tone-info { background: var(--info); }
.barrow-fill.tone-c1 { background: var(--c1); }
.barrow-fill.tone-c2 { background: var(--c2); }
.barrow-value { text-align: end; font-weight: 600; color: var(--fg); }

/* ── 分位区间 / 占比 / 付费墙 ── */
.rangebar { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.rangebar-track { position: relative; height: 10px; background: var(--surface-3); border-radius: var(--radius-full); }
.rangebar-band { position: absolute; top: 0; height: 100%; background: color-mix(in oklch, var(--accent) 32%, transparent); border-radius: var(--radius-full); }
.rangebar-med { position: absolute; top: -3px; width: 3px; height: 16px; border-radius: 2px; background: var(--accent); transform: translateX(-50%); }
.rangebar-labels { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--subtle); }
.rangebar-med-label { color: var(--fg); font-weight: 600; }
.mixbar { display: flex; flex-direction: column; gap: 8px; }
.mixbar-track { display: flex; height: 12px; border-radius: var(--radius-full); overflow: hidden; background: var(--surface-3); }
.mixbar-seg { display: block; height: 100%; }
.mixbar-seg.c1 { background: var(--c1); }
.mixbar-seg.c2 { background: var(--c2); }
.mixbar-seg.c3 { background: var(--c3); }
.mixbar-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--text-xs); color: var(--muted); }
.mixbar-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.legend-dot.c1 { background: var(--c1); } .legend-dot.c2 { background: var(--c2); } .legend-dot.c3 { background: var(--c3); }
.sharebar { display: flex; flex-direction: column; gap: 6px; }
.sharebar-value { font-size: var(--text-3xl); font-weight: 700; color: var(--fg-strong); letter-spacing: var(--tracking-tight); }
.sharebar-track { height: 10px; background: var(--surface-3); border-radius: var(--radius-full); overflow: hidden; }
.sharebar-fill { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-full); }

/* ── 小指标 ── */
.stat-mini { display: flex; flex-direction: column; gap: 2px; }
.stat-mini-label { font-size: var(--text-xs); color: var(--subtle); font-weight: 600; }
.stat-mini-value { font-size: var(--text-2xl); font-weight: 700; color: var(--fg-strong); letter-spacing: var(--tracking-tight); }
.stat-mini-foot { font-size: var(--text-xs); color: var(--faint); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: var(--space-4); }

/* ── 五维分数条 ── */
.dims { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.dim { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dim-label { font-size: 10px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dim-track { height: 5px; background: var(--surface-3); border-radius: var(--radius-full); overflow: hidden; }
.dim-fill { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-full); }

/* ── 机会清单 ── */
.opp-head, .opp-row { display: grid; grid-template-columns: 40px minmax(0, 1.25fr) 108px 62px 300px 96px; gap: var(--space-3); align-items: center; }
.opp-head {
  padding: 9px var(--space-4); font-size: var(--text-xs); text-transform: uppercase;
  letter-spacing: var(--tracking-wide); color: var(--subtle); font-weight: 600;
  border-bottom: 1px solid var(--border-strong);
}
.opp-head > span:nth-child(4) { text-align: end; }
.opp-item { border-bottom: 1px solid var(--border); }
.opp-item:last-child { border-bottom: none; }
.opp-row { padding: 8px var(--space-4); min-height: 58px; }
.opp-item:hover .opp-row { background: var(--surface-hover); }
.opp-score { text-align: end; font-family: var(--font-mono); font-weight: 700; font-size: var(--text-lg); color: var(--fg-strong); }
.opp-evidence-btn { justify-self: end; }
.tier-badge { font-size: var(--text-xs); font-weight: 700; padding: 1px 7px; border-radius: var(--radius-full); margin-inline-start: 6px; }
.tier-badge.S { background: var(--accent-subtle); color: var(--accent); }
.tier-badge.A { background: var(--info-subtle); color: var(--info); }
.evidence { margin: 0; padding: 0 0 var(--space-3) 0; list-style: none; }
.evidence li {
  position: relative; padding: 4px 0 4px 18px; font-size: var(--text-sm); color: var(--muted); line-height: 1.6;
}
.evidence li::before { content: '—'; position: absolute; inset-inline-start: 0; color: var(--faint); }
.evidence-wrap { padding-inline: var(--space-4) var(--space-4); background: var(--surface-2); }

/* ── 折叠 ── */
.acc { border-top: 1px solid var(--border); }
.acc:first-child { border-top: none; }
.acc-h { margin: 0; font-size: inherit; font-weight: inherit; }
.acc-head {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: none; cursor: pointer; text-align: start;
  padding: 10px 0; color: var(--fg); font-size: var(--text-sm); font-weight: 600;
}
.acc-head:hover { color: var(--accent); }
.acc-arrow { display: inline-block; color: var(--faint); transition: transform 150ms ease-out; font-size: var(--text-md); line-height: 1; }
.acc.open .acc-arrow { transform: rotate(90deg); }
.acc-title { min-width: 0; }
.acc-meta { margin-inline-start: auto; font-size: var(--text-xs); color: var(--faint); font-weight: 500; }
.acc-body { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows 250ms ease-out, visibility 0s 250ms; }
.acc-body.open { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows 250ms ease-out, visibility 0s 0s; }
.acc-inner { overflow: hidden; min-height: 0; }

/* ── 品类页卡片布局 ── */
.bench-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.bench-side { display: flex; flex-direction: column; gap: var(--space-4); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: var(--space-2); }
.panel-title { font-size: var(--text-md); font-weight: 700; color: var(--fg-strong); }
.panel-sub { font-size: var(--text-xs); color: var(--faint); }
.top3-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.top3-card { }
.top3-list { display: flex; flex-direction: column; gap: 8px; margin-top: var(--space-2); }
.top3-item { display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 8px; align-items: center; }
.top3-bar-row { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.top3-name { font-size: var(--text-sm); font-weight: 600; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top3-count { font-size: var(--text-sm); color: var(--muted); text-align: end; font-family: var(--font-mono); }
.top3-empty { font-size: var(--text-sm); color: var(--faint); padding: var(--space-3) 0; }
.metric-line { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--faint); margin-top: var(--space-3); }

/* ── App 360 ── */
.app-hero { display: flex; align-items: flex-start; gap: var(--space-4); flex-wrap: wrap; }
.app-hero-main { min-width: 0; flex: 1 1 280px; }
.app-hero-name { font-size: var(--text-2xl); font-weight: 700; color: var(--fg-strong); margin: 0; letter-spacing: var(--tracking-tight); }
.app-hero-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: var(--text-sm); color: var(--muted); }
.app-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.app-card { display: flex; flex-direction: column; gap: var(--space-3); }
.app-card .panel-head { margin-bottom: 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: var(--text-sm); padding: 4px 0; }
.kv-k { color: var(--muted); }
.kv-v { font-weight: 600; color: var(--fg); text-align: end; }
.voice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.voice-col { border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-3); }
.voice-col-title { font-size: var(--text-xs); font-weight: 700; margin-bottom: 6px; }
.voice-col.praise .voice-col-title { color: var(--positive); }
.voice-col.complaint .voice-col-title { color: var(--negative); }
.voice-col.request .voice-col-title { color: var(--info); }
.voice-tag { display: flex; justify-content: space-between; gap: 6px; font-size: var(--text-xs); color: var(--muted); padding: 2px 0; }
.voice-tag b { color: var(--fg); font-weight: 600; }
.voice-empty { font-size: var(--text-xs); color: var(--faint); }
.ver-row { display: flex; justify-content: space-between; gap: 10px; font-size: var(--text-sm); padding: 5px 0; border-bottom: 1px dashed var(--border); }
.ver-row:last-child { border-bottom: none; }
.ver-row .num { color: var(--muted); }
.chart-line { display: flex; align-items: baseline; gap: 10px; }
.chart-rank { font-family: var(--font-mono); font-size: var(--text-3xl); font-weight: 700; color: var(--fg-strong); }
.chart-days { font-size: var(--text-xs); color: var(--subtle); }
.spark-track { height: 8px; background: var(--surface-3); border-radius: var(--radius-full); overflow: hidden; }
.spark-fill { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-full); }

/* ── 移动端 ── */
@media (max-width: 900px) {
  .sticky-filters { top: 60px; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); margin-bottom: var(--space-3); }
  .filters-row { gap: var(--space-2); }
  .filters-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; width: 100%; }
  .filters-controls .seg-wrap, .filters-controls .field-inline { min-width: 0; }
  .filters-controls .seg { width: 100%; }
  .filters-controls .seg-opt { flex: 1; padding: 4px 6px; }
  .filters-controls .select { width: 100%; }
  .filters-right { margin-inline-start: 0; width: 100%; justify-content: space-between; }
  .filters-chips { margin-top: 6px; gap: 6px; }
  .filters-hint { display: none; }
  .sample-note { display: none; }
  .rank-head { display: none; }
  .rank-row {
    grid-template-columns: 40px minmax(0, 1fr) 18px; grid-template-areas: none;
    gap: 2px 10px; padding: 8px var(--space-3); min-height: 58px;
  }
  .rank-row .rank-pos { grid-row: 1 / span 2; align-self: center; }
  .rank-row .rank-main { grid-column: 2; grid-row: 1; }
  .rank-row .rank-cell.end, .rank-row .rank-cell.monet, .rank-row .rank-cat-cell { display: none; }
  .rank-row .rank-mobile-meta { display: block; grid-column: 2; grid-row: 2; font-size: 11px; color: var(--subtle); }
  .rank-row .rank-chev { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .bench-grid { grid-template-columns: 1fr; }
  .top3-grid { grid-template-columns: 1fr; }
  .app-cards { grid-template-columns: 1fr; }
  .voice-grid { grid-template-columns: 1fr; }
  .opp-head { display: none; }
  .opp-row { grid-template-columns: 34px minmax(0, 1fr) 52px; grid-template-areas: none; padding: 8px var(--space-3); gap: 6px 10px; min-height: 66px; }
  .opp-row .opp-cat-cell { display: none; }
  .opp-row .opp-rank { grid-row: 1 / span 3; }
  .opp-row .opp-main { grid-column: 2; grid-row: 1; }
  .opp-row .opp-score { grid-column: 3; grid-row: 1; font-size: var(--text-md); }
  .opp-row .opp-dims { grid-column: 2 / span 2; grid-row: 2; }
  .opp-row .opp-evidence-btn { grid-column: 2 / span 2; grid-row: 3; justify-self: start; }
  .opp-row .opp-cat { display: none; }
  .evidence-wrap { padding-inline: var(--space-3); }
  .sk-row { grid-template-columns: 32px minmax(0, 1fr) 70px; }
  .sk-row .sk-cell:nth-child(3) { display: none; }
  .updated-pill { top: 4px; inset-inline-end: 8px; }
  .content { padding: var(--space-4); }
}

/* ── 动效降级：prefers-reduced-motion 全关 ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── 洞察 / App 360 补充布局 ── */
.insights-stack { display: flex; flex-direction: column; gap: var(--space-4); }
.insights-stack .metric-line { margin-top: calc(-1 * var(--space-2)); }
.app-hero-wrap { margin-bottom: var(--space-4); }
.crumb { font-size: var(--text-xs); margin-bottom: 4px; }
.crumb a { color: var(--muted); font-weight: 600; }
.crumb a:hover { color: var(--accent); }
.acc-arrow.open { transform: rotate(90deg); }
@media (max-width: 900px) {
  .top3-grid { grid-template-columns: 1fr 1fr; }
  .top3-grid > .top3-card:last-child { grid-column: 1 / -1; }
  .top3-item { grid-template-columns: minmax(0, 1fr) 40px; }
  .top3-name { font-size: var(--text-xs); }
  .insights-stack .metric-line { flex-direction: column; gap: 2px; }
  .panel { padding: var(--space-3) var(--space-4); }
  .app-hero-name { font-size: var(--text-xl); }
  .sticky-filters { max-height: 46vh; overflow-y: auto; }
}

/* ── 移动端密度：首屏控件 + ≥6 行 ── */
.filters-advanced { display: contents; }
.filter-meta-text { font-size: var(--text-xs); color: var(--subtle); white-space: nowrap; }

@media (max-width: 900px) {
  .mobile-nav { padding: 4px var(--space-4); }
  .mobile-nav .nav-item { padding: 6px 10px; font-size: var(--text-sm); }
  .page-head.tight { margin-bottom: var(--space-2); }
  .page-head.tight .page-title { font-size: var(--text-xl); }
  .page-head.tight .page-desc {
    font-size: var(--text-sm); display: -webkit-box; -webkit-line-clamp: 1;
    -webkit-box-orient: vertical; overflow: hidden;
  }
  .filter-meta-text { display: none; }
  .sticky-filters { padding: 8px 10px; max-height: 56vh; overflow-y: auto; }
  .filters-row { gap: 6px; }
  .filters-controls { gap: 4px 8px; }
  .field-inline { gap: 2px; }
  .select { height: 30px; }
  .seg-wrap { gap: 2px; }
  .seg-wrap .seg { height: 30px; }
  .filters-right { height: 28px; }
  .filters-chips { margin-top: 4px; }
  .rank-row { padding: 6px var(--space-3); min-height: 50px; }
  .rank-row .rank-cat { display: none; }
  .rank-row .rank-mobile-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rank-pos { font-size: var(--text-sm); }
  .rank-name { font-size: var(--text-sm); }
  .opp-row { grid-template-columns: 30px minmax(0, 1fr) 58px; gap: 3px 8px; padding: 7px var(--space-3); }
  .opp-row .opp-rank { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
  .opp-row .opp-main { grid-column: 2; grid-row: 1; }
  .opp-row .opp-score { grid-column: 3; grid-row: 1; font-size: var(--text-md); align-self: start; }
  .opp-row .opp-dims { grid-column: 2; grid-row: 2; }
  .opp-row .opp-evidence-btn { grid-column: 3; grid-row: 2; justify-self: end; height: 20px; padding: 0 2px; font-size: 11px; white-space: nowrap; }
  .opp-main .rank-name { font-size: var(--text-sm); }
  .opp-main .rank-cat { font-size: 10px; }
  .dims { gap: 5px; }
  .dim-label { font-size: 9px; }
  .dim-track { height: 4px; }
  .top3-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .top3-grid > .top3-card:last-child { grid-column: auto; }
  .top3-card { padding: 7px 8px; }
  .top3-card .panel-head { flex-direction: column; align-items: flex-start; gap: 2px; margin-bottom: 2px; }
  .top3-card .panel-title { font-size: 11px; line-height: 1.3; }
  .top3-card .badge { display: none; }
  .top3-list { gap: 4px; margin-top: 0; }
  .top3-item { grid-template-columns: minmax(0, 1fr) 24px; gap: 3px; }
  .top3-name { font-size: 10px; }
  .top3-count { font-size: 10px; }
  .top3-bar-row .barrow-track { height: 4px; }
  .insights-stack { gap: var(--space-2); }
  .insights-stack .metric-line { display: none; }
  .barrow { padding: 3px 0; font-size: var(--text-xs); grid-template-columns: 80px minmax(0, 1fr) 44px; gap: 8px; }
  .panel { padding: 10px 12px; }
  .panel-head { margin-bottom: 4px; }
  .panel-title { font-size: var(--text-sm); }
  .panel-sub { display: none; }
  .app-hero-wrap { padding: var(--space-3) var(--space-4); }
  .app-hero-name { font-size: var(--text-xl); }
}

.sidebar-foot { margin-top: var(--space-3); padding: 0 var(--space-5) var(--space-4); font-size: 11px; color: var(--faint); }

/* ── 内容区底栏（与顶栏同高、同底边，一行放合规信息）── */
.content-footer {
  position: sticky; bottom: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  min-height: 44px; padding: 0 var(--space-8);
  border-top: 1px solid var(--border); background: var(--surface);
  font-size: 11.5px; color: var(--subtle); flex-wrap: nowrap; overflow: hidden;
}
.filings-footer { display: flex; align-items: center; gap: var(--space-4); min-width: 0; }
.foot-links { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--fg-strong); }
.foot-sep { color: var(--faint); }
.foot-filings a { color: var(--subtle); border-bottom: 1px dotted var(--border-strong); }
.foot-org { color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.content-foot-copy { color: var(--faint); white-space: nowrap; }
@media (max-width: 900px) {
  .content-footer { flex-wrap: wrap; padding: var(--space-2) var(--space-4); min-height: 0; }
  .filings-footer { flex-wrap: wrap; gap: 4px var(--space-3); }
}

.panel-skeleton { min-height: 0; margin-bottom: var(--space-4); }
.page-skeleton { display: grid; gap: 10px; padding: var(--space-2) 0; }
.page-skeleton .skeleton-head { height: 22px; width: 42%; border-radius: var(--radius-sm); }
.page-skeleton .sk-row { display: grid; grid-template-columns: 56px 1fr 120px 64px; gap: 12px; align-items: center; }
.content-footer { animation: footer-in 180ms var(--ease-standard); }
@keyframes footer-in { from { opacity: 0 } to { opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .content-footer { animation: none } }

.result-skeleton { min-height: calc(100vh - 240px); }

/* ── 数据总览 / 评论库 / 广告 / 付费墙 / 榜单历史 / 事件 ── */
.explorer { display: grid; grid-template-columns: 240px 1fr; gap: var(--space-4); align-items: start; }
.explorer-side { padding: var(--space-2); max-height: 70vh; overflow: auto; }
.explorer-side .nav-item { justify-content: space-between; font-size: var(--text-sm); }
.explorer-count { color: var(--faint); font-size: 11px; }
.explorer-cols { font-size: 11px; color: var(--faint); padding: var(--space-3) var(--space-4) 0; word-break: break-all; }
.explorer-cell { font-size: 12px; color: var(--muted); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.explorer-json { margin: 0; padding: var(--space-4); background: var(--surface-2); font-size: 11.5px; overflow: auto; max-height: 40vh; }
.explorer-empty { padding: var(--space-6); color: var(--faint); text-align: center; }
.reviews-filters { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.review-row { padding: 10px var(--space-4); border-bottom: 1px solid var(--border); cursor: pointer; }
.review-row:last-child { border-bottom: 0; }
.review-row:hover { background: var(--surface-hover); }
.review-meta { display: flex; gap: var(--space-3); align-items: center; font-size: 11.5px; color: var(--faint); }
.review-app { color: var(--accent); text-decoration: none; font-size: 12px; }
.review-title { font-weight: 600; font-size: var(--text-sm); margin-top: 4px; }
.review-text { margin-top: 6px; font-size: var(--text-sm); color: var(--muted); white-space: pre-wrap; line-height: 1.6; }
.ads-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-4); }
.ad-card { padding: var(--space-4); cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.ad-page { font-size: 11.5px; color: var(--accent); }
.ad-title { font-weight: 600; font-size: var(--text-sm); }
.ad-body { font-size: var(--text-sm); color: var(--muted); line-height: 1.5; }
.ad-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.ad-detail { margin-top: var(--space-4); padding: var(--space-5); }
.ad-detail-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-3); }
.ad-media { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-3); }
.ad-media img, .ad-video img { max-width: 220px; border-radius: var(--radius-md); }
.ad-card-mini { font-size: 11.5px; color: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 8px; max-width: 220px; }
.ad-video { margin-top: var(--space-2); }
.paywall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--space-4); }
.paywall-card { display: flex; flex-direction: column; gap: 6px; }
.paywall-card img { width: 100%; border-radius: var(--radius-md); border: 1px solid var(--border); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.two-col .card { padding: var(--space-4); }
.timeline { display: flex; flex-direction: column; gap: 2px; margin-top: var(--space-3); }
.tl-row { display: grid; grid-template-columns: 90px 1fr; gap: var(--space-3); padding: 8px 0; border-bottom: 1px solid var(--border); }
.tl-date { font-size: 11.5px; color: var(--faint); }
.tl-body { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: var(--text-sm); }
.tl-detail { color: var(--muted); }
@media (max-width: 900px) {
  .explorer { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
}

.raw-block { display: flex; flex-direction: column; gap: 8px; }
.raw-shots { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.raw-shots img { height: 180px; border-radius: var(--radius-sm); border: 1px solid var(--border); }

.paywall-card { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 6px; width: 100%; }
.paywall-card img { width: 100%; height: auto; object-fit: contain; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-2); }
.paywall-name { font-size: var(--text-sm); font-weight: 600; color: var(--fg-strong); }
.paywall-meta { font-size: 11px; color: var(--faint); }
.paywall-date { font-size: 11px; color: var(--faint); }
.ad-thumb { width: 100%; height: 160px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 6px; background: var(--surface-2); }

.app-hero-icon { width: 64px; height: 64px; border-radius: var(--radius-lg); border: 1px solid var(--border); object-fit: cover; flex-shrink: 0; }
.app-hero { display: flex; gap: var(--space-4); align-items: center; }
.shot-gallery { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.shot-gallery img { width: 150px; height: 300px; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-2); }

.page-skeleton, .section-skeleton { width: 100%; display: grid; gap: 10px; padding: var(--space-2) 0; }
.page-skeleton .sk-row, .section-skeleton .sk-row, .result-skeleton .sk-row { width: 100%; }
.sk-list { width: 100%; }
.result-frame, .result-skeleton { width: 100%; }
.app-icon { flex-shrink: 0; object-fit: cover; border: 1px solid var(--border); background: var(--surface-2); display: block; }
.app-cell { color: inherit; text-decoration: none; }
.app-cell-btn { border: 0; background: none; padding: 0; font: inherit; text-align: left; cursor: pointer; width: 100%; }
.app-cell-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app-cell-name { font-weight: 600; color: var(--fg-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-cell-sub { font-size: var(--text-xs); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stars { display: inline-flex; align-items: center; gap: 6px; }
.stars-row { display: inline-flex; color: var(--warning); }
.stars-row .star-off { color: var(--border-strong); }
.stars-num { font-size: var(--text-xs); color: var(--muted); }
.stars-count { font-size: 11px; color: var(--faint); }
.stars-empty { color: var(--faint); font-size: var(--text-xs); }
.expandable { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; width: 100%; }
.expandable-body { font-size: var(--text-sm); color: var(--muted); line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.expandable-btn { border: 0; background: none; color: var(--accent); font-size: var(--text-xs); cursor: pointer; padding: 0; }
.shot-gallery > a { flex: 0 0 auto; display: block; }
.shot-gallery img { display: block; }
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-snippet { margin-top: 4px; }
.review-expanded { margin-top: 8px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-md); font-size: var(--text-sm); color: var(--muted); white-space: pre-wrap; line-height: 1.7; }
.review-empty-text { color: var(--faint); font-size: var(--text-sm); }
.target-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: var(--space-4); align-items: start; }
.target-card { padding: var(--space-4); display: flex; flex-direction: column; gap: 10px; }
.target-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.target-head-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.target-scores { display: flex; gap: 8px; flex-wrap: wrap; }
.score-pill { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 10px; border-radius: var(--radius-full); border: 1px solid var(--border); background: var(--surface-2); font-size: var(--text-xs); }
.score-pill b { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--fg-strong); }
.score-pill.value { border-color: color-mix(in oklch, var(--positive) 40%, transparent); }
.score-pill.copy { border-color: color-mix(in oklch, var(--accent) 40%, transparent); }
.target-reasons { margin: 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 4px; font-size: var(--text-sm); color: var(--muted); line-height: 1.5; }
.target-reasons li::marker { color: var(--faint); }
.target-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: var(--text-xs); color: var(--subtle); }
.target-scope { font-size: var(--text-sm); color: var(--muted); }
.target-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.target-evidence { border-top: 1px solid var(--border); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.evidence-row { display: flex; flex-direction: column; gap: 2px; font-size: var(--text-xs); color: var(--muted); }
.evidence-row b { color: var(--fg); font-size: var(--text-xs); }
.policy-card { padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); }
.policy-card:last-child { border-bottom: 0; }
.policy-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.policy-title { font-weight: 600; color: var(--fg-strong); font-size: var(--text-md); margin-top: 4px; }
.policy-points { margin: 8px 0 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: var(--text-sm); line-height: 1.6; }
.policy-text { margin-top: 10px; padding: 12px; background: var(--surface-2); border-radius: var(--radius-md); font-size: var(--text-sm); color: var(--muted); white-space: pre-wrap; line-height: 1.7; }
.policy-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.policy-diff { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.diff-label { font-size: var(--text-xs); color: var(--faint); text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.diff-box { padding: 10px 12px; border-radius: var(--radius-md); font-size: var(--text-sm); line-height: 1.7; white-space: pre-wrap; color: var(--muted); }
.diff-box.old { background: color-mix(in oklch, var(--negative) 10%, var(--surface)); border: 1px solid color-mix(in oklch, var(--negative) 25%, transparent); }
.diff-box.new { background: color-mix(in oklch, var(--positive) 10%, var(--surface)); border: 1px solid color-mix(in oklch, var(--positive) 25%, transparent); }
.diff-del { background: color-mix(in oklch, var(--negative) 22%, transparent); text-decoration: line-through; }
.diff-add { background: color-mix(in oklch, var(--positive) 22%, transparent); }
.load-more { display: flex; justify-content: center; padding: var(--space-4); }
.data-note { font-size: var(--text-xs); color: var(--faint); margin-top: 4px; }
.data-table-desc { font-size: var(--text-sm); color: var(--muted); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
@media (max-width: 900px) {
  .target-grid { grid-template-columns: 1fr; }
  .target-card { padding: var(--space-3); }
}

.rank-name-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rank-name-row > span:last-child { overflow: hidden; text-overflow: ellipsis; }

.paywall-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.paywall-name-row .app-icon {
  flex: 0 0 auto;
}

.paywall-name-row .paywall-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paywall-grid { align-items: start; }
.paywall-card-full { max-width: 460px; }
.paywall-card-full img { width: 100%; height: auto; }

.section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin: var(--space-5) 0 var(--space-3);
  color: var(--fg-strong);
}


.cat-cell { font-size: var(--text-sm); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


.matrix-detail-head { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-4); }
.matrix-detail-title { margin: 0; font-size: var(--text-2xl); font-family: var(--font-display); }
.matrix-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.matrix-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 14px; }
.matrix-stat-label { font-size: var(--text-xs); color: var(--muted); margin-bottom: 4px; }
.matrix-stat-value { font-size: var(--text-xl); font-weight: 700; color: var(--fg-strong); font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .matrix-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


.evidence-hint { font-size: var(--text-xs); color: var(--muted); margin-bottom: 8px; }
.evidence li { display: flex; gap: 4px; align-items: baseline; }
.evidence .ev-label { font-weight: 600; color: var(--fg-strong); white-space: nowrap; }


.raw-shots a, .ad-media a.ad-media-link { display: inline-block; line-height: 0; }
.raw-shots a img, .ad-media a.ad-media-link img { display: block; }


.raw-loading { display: flex; align-items: center; gap: 10px; padding: 18px 4px; color: var(--muted); font-size: var(--text-sm); }
.raw-loading-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border, #d8dee9); border-top-color: var(--accent, #5b8def); animation: raw-spin .8s linear infinite; }
@keyframes raw-spin { to { transform: rotate(360deg); } }
.raw-failed { display: flex; align-items: center; gap: 12px; padding: 16px 4px; color: var(--muted); font-size: var(--text-sm); }


.opp-row.row-click { cursor: pointer; }
.opp-row.row-click:hover { background: var(--surface-2, rgba(0, 0, 0, 0.03)); }
