/* ============================================================
   Timory 设计系统 · 批次一
   气质：研究档案(dossier) × 数据终端 × 编辑部
   品牌：炭黑 #1f2329 + 珊瑚橙渐变 #ff6b6b→#ffa94d
   ============================================================ */

:root {
  /* 纸面与墨色 */
  --paper: #f7f5f0;
  --paper-2: #eeebe2;
  --card: #fffefb;
  --ink: #1f2329;
  --ink-2: #474d57;
  --ink-3: #7a808b;
  --hairline: #e2ded3;
  --hairline-dark: #3a4049;

  /* 炭黑面板 */
  --charcoal: #1f2329;
  --charcoal-2: #272c35;
  --paper-on-dark: #eceae3;
  --muted-on-dark: #9ba1ab;

  /* 品牌珊瑚橙 */
  --coral: #ff6b6b;
  --amber: #ffa94d;
  --accent: #d84f3f;          /* 文字级珊瑚,保证对比度 */
  --accent-deep: #b93f31;
  --brand-grad: linear-gradient(135deg, #ff6b6b, #ffa94d);

  /* 语义色(克制) */
  --heat: #c04a2e;            /* 升温 */
  --heat-bg: #f8e9e2;
  --fade: #75808f;            /* 衰减 */
  --fade-bg: #eceef1;
  --pay: #8f6a1c;             /* 付费 */
  --pay-bg: #f6eed9;
  --comp: #8c3a3a;            /* 竞品 */
  --comp-bg: #f4e6e4;
  --new: #2f6f8f;             /* 新晋 */
  --new-bg: #e4eef3;

  /* 状态机 */
  --st-cand: #767d88;
  --st-cand-bg: #ecedef;
  --st-valid: #a06f14;
  --st-valid-bg: #f6ecd4;
  --st-high: #2e6e52;
  --st-high-bg: #e2efe7;
  --st-arch: #9aa0a9;

  --ff-display: "Source Serif 4", "Noto Serif SC", "Songti SC", serif;
  --ff-body: "Noto Sans SC", -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ff-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

html { -webkit-font-smoothing: antialiased; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--ff-body); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
a { color: inherit; }

/* ---------- 排版 ---------- */
.serif { font-family: var(--ff-display); }
.mono { font-family: var(--ff-mono); }
.kicker {
  font-family: var(--ff-mono);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 500;
}
.kicker-accent { color: var(--accent); }
.h-display { font-family: var(--ff-display); font-weight: 700; font-size: 46px; line-height: 1.22; letter-spacing: 0.01em; margin: 0; text-wrap: pretty; }
.h-1 { font-family: var(--ff-display); font-weight: 700; font-size: 32px; line-height: 1.3; margin: 0; text-wrap: pretty; }
.h-2 { font-family: var(--ff-display); font-weight: 600; font-size: 23px; line-height: 1.35; margin: 0; text-wrap: pretty; }
.h-3 { font-weight: 700; font-size: 16px; line-height: 1.4; margin: 0; }
.body-l { font-size: 17px; line-height: 1.8; color: var(--ink-2); }
.body-m { font-size: 14.5px; line-height: 1.75; color: var(--ink-2); }
.body-s { font-size: 13px; line-height: 1.65; color: var(--ink-3); }
.num { font-family: var(--ff-mono); font-variant-numeric: tabular-nums; }

/* ---------- 结构 ---------- */
.shell { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.hairline-t { border-top: 1px solid var(--hairline); }
.hairline-b { border-bottom: 1px solid var(--hairline); }
.section-pad { padding: 72px 0; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,245,240,0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner { max-width: 1120px; margin: 0 auto; padding: 0 32px; height: 60px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--brand-grad);
  position: relative; flex-shrink: 0;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 6px 6px 6px 6px;
  border-radius: 2px; background: var(--charcoal);
}
.brand-name { font-family: var(--ff-display); font-weight: 700; font-size: 18px; letter-spacing: 0.01em; }
.nav-link { font-size: 13.5px; color: var(--ink-2); text-decoration: none; padding: 6px 2px; }
.nav-link:hover { color: var(--ink); }
.nav-link.on { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--coral); }

/* 语言切换器 */
.lang-sw { display: flex; border: 1px solid var(--hairline); border-radius: 999px; overflow: hidden; font-family: var(--ff-mono); font-size: 11px; }
.lang-opt { padding: 4px 10px; color: var(--ink-3); background: transparent; }
.lang-opt.on { background: var(--charcoal); color: var(--paper-on-dark); }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; font-size: 14.5px; font-weight: 600; text-decoration: none; cursor: pointer; border: none; line-height: 1; }
.btn-primary { background: var(--charcoal); color: #fff; padding: 14px 26px; }
.btn-primary:hover { background: #30363f; }
.btn-coral { background: var(--brand-grad); color: #35180d; padding: 14px 26px; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); padding: 13px 24px; }
.btn-ghost-soft { background: transparent; color: var(--ink-2); border: 1px solid var(--hairline); padding: 10px 18px; font-weight: 500; }
.btn-s { padding: 9px 16px; font-size: 13px; }
.btn-on-dark { background: var(--paper-on-dark); color: var(--charcoal); padding: 14px 26px; }

/* ---------- 徽标与标签 ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 4px; padding: 3px 9px; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-cand { color: var(--st-cand); background: var(--st-cand-bg); }
.badge-valid { color: var(--st-valid); background: var(--st-valid-bg); }
.badge-high { color: var(--st-high); background: var(--st-high-bg); }
.badge-fade { color: var(--fade); background: var(--fade-bg); }
.badge-arch { color: var(--st-arch); background: var(--fade-bg); }

.delta { display: inline-flex; align-items: center; gap: 5px; font-family: var(--ff-mono); font-size: 11px; font-weight: 500; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.delta-heat { color: var(--heat); background: var(--heat-bg); }
.delta-new { color: var(--new); background: var(--new-bg); }
.delta-pay { color: var(--pay); background: var(--pay-bg); }
.delta-fade { color: var(--fade); background: var(--fade-bg); }

/* provenance 标签 */
.prov { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 3px; border: 1px solid transparent; white-space: nowrap; }
.prov-first { color: var(--st-high); border-color: #bcd7c9; background: #eef5f0; }
.prov-spend { color: var(--pay); border-color: #e3cf9e; background: var(--pay-bg); }
.prov-wtp { color: var(--pay); border-color: #e3cf9e; background: var(--pay-bg); }
.prov-feat { color: var(--new); border-color: #bcd2de; background: var(--new-bg); }
.prov-second { color: var(--ink-3); border-color: var(--hairline); background: var(--paper-2); }
.prov-expert { color: var(--ink-3); border-color: var(--hairline); background: var(--paper-2); }
.prov-promo { color: var(--comp); border-color: #dfc0bc; background: var(--comp-bg); }

/* 信号类型 chip */
.sig { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.sig .sq { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.sq-pain { background: #c04a2e; }
.sq-need { background: #2f6f8f; }
.sq-comp { background: #8c3a3a; }
.sq-pay { background: #d99a2b; }
.sq-gap { background: #6b5b95; }

/* ---------- 卡片 ---------- */
.card { background: var(--card); border: 1px solid var(--hairline); border-radius: 10px; }
.card-pad { padding: 22px; }

/* 商机摘要卡 */
.opp-card { background: var(--card); border: 1px solid var(--hairline); border-radius: 10px; padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; position: relative; transition: box-shadow .18s ease, border-color .18s ease; }
.opp-card:hover { box-shadow: 0 3px 16px rgba(31,35,41,0.08); border-color: #d4cfc2; }
.opp-card.is-watch { border-left: 3px solid var(--amber); }
.opp-card.is-dismiss { opacity: 0.55; }
.opp-title { font-family: var(--ff-display); font-weight: 700; font-size: 17.5px; line-height: 1.4; margin: 0; }
.opp-line { font-size: 13.5px; line-height: 1.65; color: var(--ink-2); margin: 0; }
.opp-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.score-big { font-family: var(--ff-mono); font-weight: 600; font-size: 20px; color: var(--ink); }
.score-cap { font-family: var(--ff-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- 证据条目 ---------- */
.ev { border: 1px solid var(--hairline); border-radius: 8px; background: var(--card); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.ev-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ev-quote-en { font-family: var(--ff-display); font-style: italic; font-size: 15.5px; line-height: 1.65; color: var(--ink); margin: 0; padding-left: 14px; border-left: 2px solid var(--coral); }
.ev-quote-zh { font-size: 13.5px; line-height: 1.7; color: var(--ink-2); margin: 0; padding-left: 16px; }
.ev-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.ev-src { font-family: var(--ff-mono); font-size: 11px; color: var(--ink-2); background: var(--paper-2); padding: 2px 8px; border-radius: 3px; }
.quote-tag { font-family: var(--ff-mono); font-size: 10px; color: var(--ink-3); border: 1px solid var(--hairline); border-radius: 4px; padding: 1px 6px; vertical-align: middle; white-space: nowrap; }
.ev-link { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 12px; }
.ev-link:hover { text-decoration: underline; }
.ev-report { margin-left: auto; font-size: 11.5px; color: var(--ink-3); text-decoration: none; }
.ev-report:hover { color: var(--accent); }
.stars { font-size: 11px; letter-spacing: 2px; color: #d99a2b; white-space: nowrap; }

/* 锁定证据(门禁) */
.ev-locked { position: relative; overflow: hidden; }
.ev-locked .ev-quote-en, .ev-locked .ev-quote-zh, .ev-locked .ev-foot { filter: blur(5px); user-select: none; pointer-events: none; }
.ev-lock-veil { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, rgba(255,254,251,0.2), rgba(255,254,251,0.88)); }

/* ---------- 评分卡(六因子) ---------- */
.factor-row { display: grid; grid-template-columns: 64px 1fr 52px; align-items: center; gap: 12px; }
.factor-label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; text-align: right; }
.factor-track { height: 7px; border-radius: 4px; background: var(--paper-2); overflow: hidden; }
.factor-fill { display: block; height: 100%; border-radius: 4px; background: var(--charcoal); }
.factor-fill.f-pay { background: linear-gradient(90deg, #e8a04c, #d99a2b); }
.factor-fill.f-trend { background: #c04a2e; }
.factor-val { font-family: var(--ff-mono); font-size: 12px; color: var(--ink-2); text-align: right; }
.factor-note { font-family: var(--ff-mono); font-size: 11px; color: var(--ink-3); background: var(--paper-2); border-radius: 5px; padding: 8px 12px; line-height: 1.7; }

/* ---------- 趋势图 ---------- */
.spark { display: flex; align-items: flex-end; gap: 4px; height: 64px; }
.spark-col { flex: 1; border-radius: 2px 2px 0 0; background: #cfc9bb; min-height: 3px; }
.spark-col.hot { background: var(--heat); }
.spark-axis { display: flex; justify-content: space-between; font-family: var(--ff-mono); font-size: 10px; color: var(--ink-3); }

/* ---------- 表格式榜单行 ---------- */
.ledger-row { display: grid; grid-template-columns: 44px 1fr 210px 120px 110px; gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--hairline); text-decoration: none; }
.ledger-row:hover { background: rgba(255,255,255,0.6); }
.ledger-rank { font-family: var(--ff-mono); font-size: 15px; color: var(--ink-3); }

/* ---------- 暗面板 ---------- */
.dark-panel { background: var(--charcoal); color: var(--paper-on-dark); }
.dark-panel .kicker { color: var(--muted-on-dark); }
.dark-panel .hairline-t { border-color: var(--hairline-dark); }
.on-dark-muted { color: var(--muted-on-dark); }

/* ---------- 反馈状态 ---------- */
.notice { display: flex; gap: 10px; align-items: flex-start; border-radius: 8px; padding: 12px 16px; font-size: 13px; line-height: 1.6; }
.notice-delay { background: var(--pay-bg); color: var(--pay); border: 1px solid #e8d9ae; }
.notice-fail { background: var(--comp-bg); color: var(--comp); border: 1px solid #e0c3bf; }
.notice-info { background: var(--new-bg); color: var(--new); border: 1px solid #c8d9e2; }
.empty-state { text-align: center; padding: 56px 24px; color: var(--ink-3); }

/* ---------- 页脚 ---------- */
.footer { background: var(--charcoal); color: var(--muted-on-dark); }
.footer a { color: var(--muted-on-dark); text-decoration: none; font-size: 13px; }
.footer a:hover { color: var(--paper-on-dark); }

/* ---------- 移动端菜单(纯 CSS details) ---------- */
.nav-mmenu { position: relative; }
.nav-mmenu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 13.5px; color: var(--ink-2); border: 1px solid var(--hairline); border-radius: 8px; background: var(--card); }
.nav-mmenu > summary::-webkit-details-marker { display: none; }
.nav-mmenu[open] > summary { border-color: var(--charcoal); color: var(--ink); }
.nav-mpanel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; padding: 6px; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--hairline); border-radius: 10px; box-shadow: 0 14px 40px rgba(31,35,41,.14); z-index: 60; }
.nav-mpanel a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; font-size: 14px; color: var(--ink-2); text-decoration: none; border-radius: 6px; }
.nav-mpanel a:hover { background: var(--paper-2); color: var(--ink); }

/* ---------- 移动端 ---------- */
@media (max-width: 768px) {
  .shell { padding: 0 18px; }
  .nav-inner { padding: 0 18px; gap: 14px; }
  .h-display { font-size: 30px; }
  .h-1 { font-size: 24px; }
  .section-pad { padding: 48px 0; }
  .hide-m { display: none !important; }
  .ledger-row { grid-template-columns: 1fr; gap: 8px; }
  .factor-row { grid-template-columns: 56px 1fr 48px; }
  /* 触控目标 ≥44px(只扩点击区,不放大字号) */
  .nav-link, .lang-opt, .footer a, .ev-link { min-height: 44px; display: inline-flex; align-items: center; }
  .fchip { min-height: 44px; }
  .btn { min-height: 44px; }
}
@media (min-width: 769px) { .only-m { display: none !important; } }
