/* 早间简报 · 移动端优先样式
   涨跌配色遵循 A 股习惯：红涨绿跌。 */

:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #16181d;
  --text-2: #5b6270;
  --text-3: #8b93a3;
  --line: #e6e8ec;
  --accent: #c8102e;
  --up: #d92b2b;
  --down: #0f9d58;
  --badge-bg: #fdecec;
  --badge-fg: #c8102e;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131417;
    --card: #1c1e23;
    --text: #eceef2;
    --text-2: #a2a9b8;
    --text-3: #757d8d;
    --line: #2b2e36;
    --accent: #ff6b7f;
    --up: #ff6b7f;
    --down: #3ddc84;
    --badge-bg: #3a1f24;
    --badge-fg: #ff9aa8;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 14px calc(40px + env(safe-area-inset-bottom));
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  max-width: 720px;
  margin-inline: auto;
}

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

/* ── 页头 ── */
header.top {
  padding: 22px 2px 14px;
}
header.top .day {
  font-size: 13px;
  color: var(--text-3);
  letter-spacing: .04em;
}
header.top h1 {
  margin: 6px 0 4px;
  font-size: 23px;
  line-height: 1.35;
  letter-spacing: -.01em;
}
header.top .sub {
  font-size: 13px;
  color: var(--text-3);
}

/* ── 区块标题 ── */
h2.sec {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 26px 2px 12px;
  font-size: 16px;
  font-weight: 700;
}
h2.sec .cnt {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
}

/* ── 新闻卡片 ── */
.news {
  display: block;
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 15px;
  margin-bottom: 9px;
  border: 1px solid var(--line);
}
.news:active { background: var(--bg); }
.news .row1 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}
.news .time {
  font-size: 12px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.news .lv {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--badge-bg);
  color: var(--badge-fg);
  line-height: 1.6;
}
.news .h {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 3px;
}
.news .s {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news .thumb {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  object-position: top;
  border-radius: 8px;
  margin-top: 9px;
  display: block;
}

/* ── 复盘统计 ── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 4px;
  text-align: center;
}
.stat b {
  display: block;
  font-size: 21px;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
.stat span { font-size: 11.5px; color: var(--text-3); }
.stat.up b { color: var(--up); }
.stat.down b { color: var(--down); }

.ladder {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 15px;
  margin-bottom: 16px;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.9;
}
.ladder b { color: var(--text); font-variant-numeric: tabular-nums; }
.ladder .rate { color: var(--accent); }

/* ── 题材卡片 ── */
.sector {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 15px;
  margin-bottom: 9px;
}
.sector:active { background: var(--bg); }
.sector .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sector .name { font-size: 16px; font-weight: 600; }
.sector .num {
  font-size: 12px;
  color: var(--badge-fg);
  background: var(--badge-bg);
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.sector .picks {
  margin-top: 5px;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.6;
}
.sector .picks .bd { color: var(--accent); }

/* ── 详情页 ── */
.back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 16px 0 6px;
  font-size: 14px;
  color: var(--text-2);
  padding: 6px 0;
}
article { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; }
article .meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-3);
  margin-bottom: 9px;
  font-variant-numeric: tabular-nums;
}
article h1 { margin: 0 0 12px; font-size: 20px; line-height: 1.45; letter-spacing: -.01em; }
article p { margin: 0 0 13px; font-size: 15.5px; line-height: 1.8; }
article p:last-child { margin-bottom: 0; }
article img {
  width: 100%;
  border-radius: 9px;
  margin: 4px 0 14px;
  display: block;
}

.note {
  margin: 16px 0 0;
  padding: 11px 13px;
  background: var(--badge-bg);
  border-radius: 9px;
  font-size: 13px;
  color: var(--badge-fg);
  line-height: 1.6;
}

/* ── 个股条 ── */
.stocklist { margin-top: 16px; }
.stocklist .t { font-size: 12.5px; color: var(--text-3); margin-bottom: 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-size: 12.5px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.chip .p { margin-left: 4px; }
.chip .p.up { color: var(--up); }
.chip .p.down { color: var(--down); }

/* ── 题材详情里的个股 ── */
.lu {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 15px;
  margin-bottom: 10px;
}
.lu .r1 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lu .nm { font-size: 16.5px; font-weight: 600; }
.lu .cd { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.lu .bd {
  font-size: 12px;
  color: var(--badge-fg);
  background: var(--badge-bg);
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: auto;
}
.lu .tags { margin-top: 6px; font-size: 13px; color: var(--text-2); }
.lu .reason {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── 归档 ── */
.arch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 15px;
  margin-bottom: 9px;
}
.arch .d { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.arch .m { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }

footer {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text-3);
  text-align: center;
  line-height: 1.9;
}
footer a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }

/* ── 新闻存档（site/news/）── */
.arcbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 7px;
  padding: 9px 0;
  margin-bottom: 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.arcbar button {
  flex: 1;
  font: inherit;
  font-size: 13px;
  padding: 7px 4px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text-2);
  cursor: pointer;
}
.arcbar button.on {
  background: var(--badge-bg);
  color: var(--badge-fg);
  border-color: transparent;
  font-weight: 600;
}

.arc {
  border-bottom: 1px solid var(--line);
  padding: 9px 2px;
  font-size: 14px;
  line-height: 1.6;
}
.arc .t {
  font-size: 12px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  margin-right: 7px;
}
.arc .lv {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--badge-bg);
  color: var(--badge-fg);
  margin-right: 6px;
}
.arc .h { color: var(--text); }
.arc .h.plain { color: var(--text-2); font-size: 13.5px; }
.arc summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 0;
}
.arc summary::-webkit-details-marker { display: none; }
.arc summary .h { font-weight: 600; }
.arc .body {
  margin: 8px 0 4px 0;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.arc .body p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-2);
}
.arc .body p:last-child { margin-bottom: 0; }
