/* A股热点事件库 —— 新闻生产者用的线索工具，编辑室纸墨风格 */
:root {
  --paper: #f3efe6;
  --paper-2: #e9e3d6;
  --ink: #1c1915;
  --ink-2: #5c574e;
  --ink-3: #8a8478;
  --card: #fffdf8;
  --edge: #ddd5c6;
  --rule: #9a3b22;
  --navy: #1e3d68;
  --navy-soft: #e7eef6;
  --rumor: #9a6410;
  --rumor-bg: #f8eed8;
  --news: #1e4a7a;
  --news-bg: #e6eef6;
  --ann: #5a4a36;
  --ann-bg: #efe8dc;
  --qa: #2c5e5c;
  --qa-bg: #e4f0ef;
  --confirm: #1c6b48;
  --confirm-bg: #ddeee5;
  --deny: #8b2c3e;
  --deny-bg: #f5e4e8;
  --heat: #8a3a16;
  --shadow: 0 1px 2px rgba(28, 25, 21, 0.04), 0 8px 20px rgba(28, 25, 21, 0.06);
  --font-sans: "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Noto Serif CJK SC", "Noto Serif SC", "Source Han Serif SC",
    "Songti SC", "SimSun", serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  background: #cfc8b8;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy); text-decoration: none; }
button, input { font-family: inherit; }
button { cursor: pointer; border: 0; background: none; color: inherit; }

.phone {
  width: 100%;
  max-width: 430px;
  min-height: 100%;
  margin: 0 auto;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  position: relative;
}
.phone.is-home {
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
}
@media (min-width: 500px) {
  body { display: flex; align-items: stretch; justify-content: center; }
  .phone {
    min-height: 100vh;
    box-shadow: 0 0 0 1px #b9b1a0, 0 20px 50px rgba(28,25,21,.18);
  }
}

.boot {
  padding: 48px 24px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}

/* ----- masthead ----- */
.masthead {
  padding: calc(10px + var(--safe-top)) 18px 12px;
  background: var(--paper);
  border-bottom: 1px solid var(--edge);
  flex-shrink: 0;
}
.masthead .kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border: 1.5px solid var(--rule);
  color: var(--rule);
  font-family: var(--font-serif);
  font-size: 11px;
  letter-spacing: 0;
  margin-right: 6px;
  transform: rotate(-8deg);
  font-weight: 700;
}
.masthead h1 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
}
.masthead .rule {
  height: 2px;
  background: var(--rule);
  margin: 8px 0 7px;
}
.masthead .tagline {
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: 0.04em;
}
.page-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(8px + var(--safe-top)) 12px 10px;
  border-bottom: 1px solid var(--edge);
  background: var(--paper);
  flex-shrink: 0;
}
.page-bar .back {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: var(--ink);
  border-radius: 8px;
}
.page-bar .back:active { background: var(--paper-2); }
.page-bar h2 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  flex: 1;
}

/* ----- home layout: top ticker, bottom search ----- */
.home {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.section-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 8px 18px 6px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-2);
  font-weight: 600;
}
.section-label .en {
  letter-spacing: 0.08em;
  font-weight: 400;
  color: var(--ink-3);
  font-size: 10px;
}

.ticker-wrap {
  flex: 1.15;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.ticker-mask {
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 16px), transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 16px), transparent 100%);
  position: relative;
}
.ticker-track {
  padding: 4px 14px 20px;
  will-change: transform;
}
.ticker-track.paused { transition: none; }

.search-pane {
  flex: 0 1 38%;
  min-height: 160px;
  max-height: 42%;
  display: flex;
  flex-direction: column;
  border-top: 2px solid var(--ink);
  background: var(--paper);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  position: relative;
  z-index: 2;
  overflow: hidden;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 10px;
  padding: 0 12px;
  box-shadow: var(--shadow);
}
.search-box .ico { color: var(--ink-3); font-size: 15px; }
.search-box input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  height: 42px;
  font-size: 15px;
  color: var(--ink);
}
.search-box input::placeholder { color: var(--ink-3); }
.search-hint {
  margin: 8px 2px 4px;
  font-size: 11px;
  color: var(--ink-3);
}
.search-hint b { color: var(--ink-2); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 12px;
  border: 1px solid var(--edge);
}
.chip:active { background: var(--navy-soft); color: var(--navy); }
.results {
  flex: 1;
  overflow: auto;
  padding-bottom: 8px;
}
.result-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px;
  border-bottom: 1px dashed var(--edge);
}
.result-row:active { background: rgba(28,25,21,.03); }
.result-row .code {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--navy);
  width: 52px;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}
.result-row .nm { flex: 1; font-weight: 600; font-size: 14px; }
.result-row .meta { font-size: 11px; color: var(--ink-3); text-align: right; }
.empty { color: var(--ink-3); font-size: 12px; padding: 16px 4px; text-align: center; }

/* ----- event card ----- */
.card {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 12px 13px 10px;
  margin: 0 0 10px;
  box-shadow: var(--shadow);
}
.card.tap:active { background: #faf6ed; }
.card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.when {
  font-size: 11px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  margin-right: auto;
}
.co {
  font-size: 11px;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.co b { font-weight: 650; color: var(--ink); margin-right: 4px; }
.tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 3px;
  font-size: 10px;
  letter-spacing: 0.06em;
  font-weight: 650;
}
.tag-传闻 { background: var(--rumor-bg); color: var(--rumor); }
.tag-新闻 { background: var(--news-bg); color: var(--news); }
.tag-公告 { background: var(--ann-bg); color: var(--ann); }
.tag-互动问答 { background: var(--qa-bg); color: var(--qa); }
.tag-官方确认 { background: var(--confirm-bg); color: var(--confirm); }
.tag-官方否认 { background: var(--deny-bg); color: var(--deny); }
.heat {
  font-size: 10px;
  color: var(--heat);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.card h3, .event-title {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.leads-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--edge);
  width: 100%;
  text-align: left;
  font-size: 12px;
  color: var(--navy);
  font-weight: 600;
  letter-spacing: 0.06em;
}
.leads-toggle .caret {
  margin-left: auto;
  color: var(--ink-3);
  transition: transform .2s;
  font-size: 11px;
}
.leads-toggle.open .caret { transform: rotate(180deg); }
.leads-toggle .n {
  display: inline-flex;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--navy-soft);
  color: var(--navy);
  font-size: 10px;
  align-items: center;
  justify-content: center;
}
.leads-body {
  display: none;
  padding: 4px 0 2px;
}
.leads-body.open { display: block; }

.lead-block { margin-top: 10px; }
.lead-block h4 {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  font-weight: 650;
  margin-bottom: 6px;
}
.chain-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: #f6f1e6;
  border-left: 2px solid var(--rule);
  border-radius: 0 8px 8px 0;
  color: inherit;
}
.chain-item:active { background: var(--paper-2); }
.chain-item .row1 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-3);
}
.chain-item .tt {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}
.chain-item .go {
  margin-left: auto;
  color: var(--navy);
  font-size: 11px;
}
.qs { padding-left: 18px; }
.qs li { margin: 4px 0; font-size: 13px; color: var(--ink-2); }
.concept, .co-chip {
  display: inline-flex;
  margin: 0 6px 6px 0;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--ann-bg);
  color: var(--ann);
  font-size: 12px;
}
.co-chip { background: var(--navy-soft); color: var(--navy); }
.official-box {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--deny-bg);
  color: var(--deny);
}
.official-box.确认 { background: var(--confirm-bg); color: var(--confirm); }
.official-box .hd {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.official-box .excerpt {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.official-box a { font-size: 12px; font-weight: 650; }

/* ----- event page ----- */
.page {
  flex: 1;
  overflow: auto;
  padding: 12px 14px calc(16px + var(--safe-bot));
}
.event-hero { margin-bottom: 4px; }
.event-hero .event-title { font-size: 20px; font-family: var(--font-serif); font-weight: 700; margin: 8px 0 10px; }
.sources { margin-top: 12px; }
.src {
  display: block;
  padding: 8px 0;
  border-bottom: 1px dashed var(--edge);
  font-size: 12.5px;
}
.src .s-name { color: var(--navy); font-weight: 600; }
.src .s-title { color: var(--ink-2); display: block; margin-top: 2px; }
.src .s-time { color: var(--ink-3); font-size: 11px; }

/* company page */
.co-head { padding: 4px 2px 12px; }
.co-head .code { font-size: 12px; color: var(--navy); letter-spacing: 0.08em; }
.co-head h3 { font-family: var(--font-serif); font-size: 24px; margin: 2px 0 4px; }
.co-head .py { font-size: 11px; color: var(--ink-3); letter-spacing: 0.08em; }
.co-head .stats { font-size: 12px; color: var(--ink-2); margin-top: 6px; }

/* footer */
.foot {
  flex-shrink: 0;
  padding: 8px 16px calc(10px + var(--safe-bot));
  text-align: center;
  border-top: 1px solid var(--edge);
  background: var(--paper);
}
.foot strong {
  display: block;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--rule);
  font-weight: 700;
}
.foot p { font-size: 10px; color: var(--ink-3); margin-top: 2px; line-height: 1.45; }

/* shot helpers */
html[data-shot] .ticker-track { transform: none !important; }
html[data-shot] .ticker-mask {
  /* 截图时仍裁切上半，把查找公司留在下半屏 */
  overflow: hidden;
}

.date-tabs { display: inline-flex; gap: 4px; margin-left: auto; margin-right: 8px; }
.date-tab {
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: transparent;
  color: var(--ink-3);
  font-weight: 600;
}
.date-tab.on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* 打赏支持（虚拟支付预览；真实支付仅在微信小程序） */
.tip-entry { margin-top: 8px; font-size: 12px; color: var(--ink-3); }
.tip-entry a { color: var(--navy); font-weight: 650; text-decoration: none; }
.tip-page { padding: 24px 22px 48px; }
.tip-headline { font-family: var(--font-serif); font-size: 22px; font-weight: 650; line-height: 1.45; color: var(--ink); margin: 8px 0 12px; }
.tip-vol { font-size: 13px; color: var(--ink-2); line-height: 1.6; margin-bottom: 8px; }
.tip-notice {
  margin: 16px 0;
  padding: 12px 14px;
  background: var(--rumor-bg);
  color: var(--rumor);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.55;
}
.tip-note { margin: 16px 0; font-size: 12px; color: var(--ink-3); }
.tip-items { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.tip-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 12px;
  font-size: 18px;
  font-weight: 650;
  color: var(--navy);
  box-shadow: var(--shadow);
}
.tip-item:active { background: var(--navy-soft); }
.tip-fen { font-size: 11px; color: var(--ink-3); font-weight: 500; letter-spacing: 0.04em; }
.tip-status { margin-top: 18px; font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.tip-mock {
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
}

/* 官方赞赏组件在网页里的预览占位（原生 <reward /> 仅微信小程序可渲染） */
.reward-slot {
  margin: 20px 4px 8px;
  padding: 4px 0 12px;
}
.reward-note {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.55;
  text-align: center;
  margin: 0 0 12px;
}
.reward-placeholder {
  border: 1px dashed #cfc6b4;
  border-radius: 14px;
  background: #faf7f0;
  padding: 16px 16px 14px;
}
.reward-ph-kicker {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #9a3b22;
  font-weight: 650;
  margin-bottom: 8px;
}
.reward-ph-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.reward-ph-body {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.6;
  margin: 0;
}
.reward-ph-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  background: #efe8da;
  padding: 0 4px;
  border-radius: 4px;
}

/* —— AI 解读、星级筛选、关注 —— */
.feed-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 0 4px 8px;
}
.star-tabs, .feed-toolbar-right { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.star-tab, .sort-tab {
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: transparent;
  color: var(--ink-3);
  font-weight: 600;
}
.star-tab.on, .sort-tab.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.follow-toggle {
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--navy);
  color: var(--navy);
  font-weight: 700;
  background: transparent;
}
.follow-toggle.on { background: var(--navy); color: #fff; }
.feed-kw-chip {
  font-size: 12px;
  color: var(--ink-2);
  padding: 0 8px 8px;
}
.kw-clear { margin-left: 8px; color: var(--navy); font-weight: 650; font-size: 12px; }

.ai-block {
  margin: 8px 0 6px;
  padding: 8px 10px;
  background: var(--navy-soft);
  border-radius: 8px;
  border: 1px solid #d5deea;
}
.ai-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.ai-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
}
.ai-stars { color: #b8860b; letter-spacing: 0.08em; font-size: 12px; }
.ai-insight { font-size: 13px; color: var(--ink); line-height: 1.55; }
.ai-kws { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ai-kw {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #c9d4e4;
  color: var(--navy);
  font-weight: 600;
}

.follow-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 8px; }
.follow-btn {
  font-size: 12px;
  font-weight: 650;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--navy);
  color: var(--navy);
  background: #fff;
}
.follow-btn.on { background: var(--navy); color: #fff; }

html[data-shot="stars"] .feed-toolbar,
html[data-shot="follow"] .feed-toolbar { display: flex; }
