/* 股票日报归档 — 简洁现代中文可读 */
:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1a1d26;
  --muted: #5c6578;
  --border: #e2e6ef;
  --accent: #1a6fb5;
  --accent-soft: #e8f2fb;
  --tag-daily: #0d7a4f;
  --tag-analysis: #8a4b0f;
  --tag-vl: #5b3d9e;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 920px; margin: 0 auto; padding: 0.45rem 1rem 3rem; }
header.site {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0.4rem 0;
  margin-bottom: 0.25rem;
}
header.site .wrap {
  padding-bottom: 0; padding-top: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
header.site h1 { margin: 0; font-size: 1.35rem; font-weight: 700; line-height: 1.3; }
.brand { display: flex; align-items: center; gap: 0.65rem; }
header.site .brand + p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.9rem; }
.brand-logo {
  width: 32px; height: 32px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}
@media (min-width: 768px) {
  .brand-logo { width: 36px; height: 36px; }
}
@media (max-width: 640px) {
  .brand-logo { width: 28px; height: 28px; }
}

a.brand {
  color: inherit;
  text-decoration: none;
}
a.brand:hover { text-decoration: none; }
a.brand:hover h1 { color: var(--accent); }
@media (max-width: 480px) {
  .site-nav { gap: 0.2rem 0.45rem; font-size: 0.82rem; }
  .site-nav a { padding: 0.18rem 0.28rem; }
}
.nav-back {
  font-size: 0.9rem; margin: 0; display: inline-block;
  flex-shrink: 0; white-space: nowrap;
}
main .nav-back { margin-bottom: 1rem; display: block; text-align: right; }
.nav-back-icon {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  border-radius: 999px;
  line-height: 0;
  flex-shrink: 0;
  padding: 2px;
}
.nav-back-icon:hover {
  color: var(--accent);
  text-decoration: none;
  background: var(--accent-soft);
}
.nav-back-icon svg { display: block; }
.filters {
  display: flex; flex-wrap: nowrap; gap: 0.3rem;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 0.4rem 0.5rem; margin-bottom: 0.55rem;
  align-items: center;
}
.filters > select {
  display: block;
  flex: 1 1 0; min-width: 0;
  margin: 0;
}
.filters select {
  min-width: 72px; width: 100%; max-width: 100%;
  padding: 0.28rem 0.28rem;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 0.78rem; background: #fff; color: var(--text);
}
@media (min-width: 480px) {
  .filters { gap: 0.45rem; padding: 0.55rem 0.7rem; }
  .filters select { font-size: 0.88rem; padding: 0.35rem 0.45rem; min-width: 88px; }
}
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); background: var(--card); }
table.reports { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.reports th, table.reports td {
  padding: 0.7rem 0.85rem; text-align: left; border-bottom: 1px solid var(--border);
}
table.reports th {
  background: #f0f3f8; font-size: 0.8rem; color: var(--muted);
  font-weight: 600; white-space: nowrap;
}
table.reports tr:last-child td { border-bottom: none; }
table.reports tr:hover td { background: #fafbfd; }
table.reports tr.hidden { display: none; }
.tag {
  display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.tag-daily { background: #e6f7ef; color: var(--tag-daily); }
.tag-analysis { background: #fff3e6; color: var(--tag-analysis); }
.tag-valueline, .tag-valueline-overview { background: #f0eaf8; color: var(--tag-vl); }
.stock-chip {
  display: inline-block; background: var(--accent-soft); color: var(--accent);
  padding: 0.1rem 0.45rem; border-radius: 4px; font-size: 0.85rem; font-weight: 600;
}
.article {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 1.5rem 1.35rem; margin-top: 0.5rem;
}
.article h1 { font-size: 1.4rem; margin-top: 0; line-height: 1.35; }
.article h2 { font-size: 1.15rem; margin-top: 1.6rem; border-bottom: 1px solid var(--border); padding-bottom: 0.35rem; }
.article h3 { font-size: 1.05rem; }
.article table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9rem; overflow-x: auto; display: block; }
.article th, .article td { border: 1px solid var(--border); padding: 0.4rem 0.55rem; }
.article th { background: #f0f3f8; }
.article blockquote {
  margin: 1rem 0; padding: 0.6rem 1rem; border-left: 3px solid var(--accent);
  background: var(--accent-soft); color: var(--muted);
}
.article code { background: #f0f3f8; padding: 0.1rem 0.35rem; border-radius: 3px; font-size: 0.88em; }
.article pre { background: #1a1d26; color: #e8eaed; padding: 1rem; border-radius: 8px; overflow-x: auto; }
.article pre code { background: none; color: inherit; padding: 0; }
.meta-bar {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center;
  margin-bottom: 1rem; font-size: 0.9rem; color: var(--muted);
}
.pdf-box {
  background: var(--accent-soft); border: 1px solid #c5daf0; border-radius: 8px;
  padding: 1rem 1.15rem; margin: 1rem 0;
}
.pdf-box a.btn {
  display: inline-block; margin-top: 0.5rem; background: var(--accent); color: #fff;
  padding: 0.45rem 1rem; border-radius: 6px; font-weight: 600; text-decoration: none;
}
.pdf-box a.btn:hover { opacity: 0.92; text-decoration: none; }
.summary-pre {
  white-space: pre-wrap; font-family: inherit; background: #fafbfd;
  border: 1px solid var(--border); border-radius: 8px; padding: 1rem; font-size: 0.95rem;
}
footer.site {
  margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--muted); text-align: center;
}
.empty-hint { padding: 1.5rem; text-align: center; color: var(--muted); display: none; }
.empty-hint.show { display: block; }
@media (max-width: 640px) {
  .wrap { padding: 0.4rem 0.75rem 2.5rem; }
  header.site h1 { font-size: 1.2rem; }
  table.reports th:nth-child(2), table.reports td:nth-child(2) { display: none; }
  .article { padding: 1.1rem 0.9rem; }
  .article table { font-size: 0.82rem; }
}

.pager-bar {
  width: 100%;
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}
.pager.ant-pager {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  color: #595959;
  white-space: nowrap;
}
.pager.ant-pager > * {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  vertical-align: middle;
}
.pager-total { white-space: nowrap; color: #595959; }
.pager-arrow, .pager-num {
  box-sizing: border-box;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  margin: 0;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  background: #fff;
  color: #262626;
  font-size: 14px;
  line-height: 30px;
  text-align: center;
  cursor: pointer;
}
.pager-arrow:hover:not(:disabled), .pager-num:hover:not(.active) { border-color: #1890ff; color: #1890ff; }
.pager-num.active { background: #1890ff; border-color: #1890ff; color: #fff; }
.pager-arrow:disabled { opacity: 0.4; cursor: not-allowed; color: #bfbfbf; }
.pager-pages {
  display: inline-flex !important;
  flex-direction: row !important;
  gap: 8px;
  align-items: center;
}
.pager-ellipsis { padding: 0 4px; color: #8c8c8c; }
.pager-jump {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.pager-jump input {
  box-sizing: border-box;
  width: 50px;
  height: 32px;
  margin: 0;
  padding: 0 4px;
  text-align: center;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  font-size: 14px;
}

.pager-size {
  box-sizing: border-box;
  height: 32px;
  padding: 0 8px;
  margin: 0;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  background: #fff;
  color: #262626;
  font-size: 14px;
  flex-shrink: 0;
}


@media (max-width: 420px) {
  .filters { gap: 0.25rem; padding: 0.4rem 0.4rem; }
  .filters > select, .filters select {
    font-size: 0.74rem; padding: 0.25rem 0.2rem; min-width: 72px;
  }
}

/* —— 盯盘看板 —— */
.watchlist {
  margin: 0.35rem 0 0.85rem;
}
.watchlist-head {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
  justify-content: flex-start;
}
.watchlist-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.watchlist-sub {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.watchlist-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.watchlist-list-head {
  display: none;
}
a.wl-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 0.9rem 0.75rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
a.wl-card:hover {
  border-color: #b7d0e8;
  box-shadow: 0 2px 10px rgba(26, 111, 181, 0.08);
  text-decoration: none;
}
.wl-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}
.wl-name-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.wl-name {
  font-weight: 700;
  font-size: 1rem;
}
.wl-ticker {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
}
.wl-asof {
  font-size: 0.68rem;
  color: var(--muted);
  background: #f0f3f8;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.wl-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}
.wl-price {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.wl-chg {
  font-size: 0.88rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.chg-up { color: #d4380d; }  /* 上涨红 */
.chg-down { color: #0d7a4f; }  /* 下跌绿 */
.chg-flat { color: var(--muted); }
.wl-52w { margin-bottom: 0; }
.wl-52w-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.22rem;
}
.wl-52w-bar {
  position: relative;
  height: 6px;
  background: #e8ecf3;
  border-radius: 999px;
  overflow: visible;
}
.wl-52w-fill {
  height: 100%;
  background: linear-gradient(90deg, #a8c8e8, var(--accent));
  border-radius: 999px;
  max-width: 100%;
}
.wl-52w-marker {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  margin-top: -4px;
  background: var(--text);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
  pointer-events: none;
}
.wl-ratings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.wl-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  white-space: nowrap;
}
.rating-low {
  background: #f3f0f0;
  color: #8a6a6a;
}
.rating-mid {
  background: #f0f3f8;
  color: #5c6578;
}
.rating-high {
  background: #e6f4ea;
  color: #1b7a45;
}
.rating-na {
  background: #f0f3f8;
  color: #9aa3b5;
}
.wl-upside {
  font-size: 0.78rem;
  color: var(--muted);
}
.wl-upside .chg-up,
.wl-upside .chg-down,
.wl-upside .chg-flat {
  font-weight: 700;
  font-size: 0.85rem;
}
.wl-upside-hint {
  margin-left: 0.25rem;
  font-size: 0.68rem;
  color: #9aa3b5;
}
.watchlist-footnote {
  margin: 0.55rem 0 0;
  font-size: 0.68rem;
  color: #9aa3b5;
  line-height: 1.4;
}


/* —— Phase 2: 结论置顶 / 风险 / 同标的历史 —— */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 860px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
}
.conclusion-pin,
.risks-pin {
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin: 0.85rem 0 0.65rem;
  border: 1px solid var(--border);
}
.conclusion-pin {
  background: linear-gradient(180deg, #eef6fc 0%, #f7fbfe 100%);
  border-color: #c5daf0;
}
.risks-pin {
  background: #fff8f3;
  border-color: #f0d8c4;
  margin-top: 0.5rem;
}
.pin-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: none;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.45rem;
}
.conclusion-pin .pin-label {
  background: var(--accent);
  color: #fff;
}
.risks-pin .pin-label {
  background: #c05621;
  color: #fff;
}
.conclusion-pin .pin-body {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
}
.conclusion-pin .pin-body p {
  margin: 0.35rem 0;
}
.conclusion-pin .pin-body p:first-child { margin-top: 0; }
.conclusion-pin .pin-body p:last-child { margin-bottom: 0; }
.conclusion-pin .pin-body ul,
.conclusion-pin .pin-body ol {
  margin: 0.35rem 0 0.15rem 1.1rem;
  padding: 0;
}
.risks-pin ul {
  margin: 0.25rem 0 0 1.1rem;
  padding: 0;
  font-size: 0.9rem;
  color: #5a4030;
}
.risks-pin li { margin: 0.2rem 0; }

.history-nav {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 0.9rem 0.75rem;
  position: sticky;
  top: 0.75rem;
}
.history-nav-title {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.hn-stock {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.08rem 0.4rem;
  border-radius: 4px;
}
.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hn-item {
  margin: 0;
  padding: 0.45rem 0;
  border-bottom: 1px solid #eef1f6;
  font-size: 0.82rem;
  line-height: 1.4;
}
.hn-item:last-child { border-bottom: none; }
.hn-item a {
  display: block;
  color: inherit;
  text-decoration: none;
}
.hn-item a:hover .hn-title { color: var(--accent); text-decoration: underline; }
.hn-item .tag {
  margin-left: 0.25rem;
  font-size: 0.68rem;
  vertical-align: middle;
}
.hn-date {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.75rem;
  margin-right: 0.15rem;
}
.hn-title {
  display: block;
  margin-top: 0.2rem;
  color: var(--text);
  font-weight: 500;
}
.hn-active {
  background: #f5f8fc;
  margin: 0 -0.45rem;
  padding: 0.45rem 0.45rem;
  border-radius: 6px;
  border-bottom-color: transparent;
}
.hn-active .hn-title { color: var(--muted); font-weight: 600; }
.hn-now {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  color: var(--accent);
  font-weight: 700;
}
.history-all {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
}
.history-all a { font-weight: 600; }

@media (max-width: 860px) {
  .history-nav { position: static; order: 2; }
  .article-layout .article { order: 1; }
}

/* —— Phase 3: 站点导航 / 对比视图 —— */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 0.85rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  font-weight: 600;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
}
.site-nav a:hover {
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}
.site-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}

.watchlist-head {
  position: relative;
}
.watchlist-compare-link {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}
.watchlist-compare-link:hover {
  text-decoration: none;
  opacity: 0.9;
}

/* Market sections on watchlist */
.wl-market {
  margin: 0.85rem 0 0.35rem;
}
.wl-market:first-of-type {
  margin-top: 0.35rem;
}
.wl-market-title {
  margin: 0 0 0.4rem;
  padding: 0.15rem 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

/* Row cards: one stock per horizontal line */
.wl-card.wl-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.wl-card.wl-row:hover {
  border-color: #b7d0e8;
  box-shadow: 0 2px 10px rgba(26, 111, 181, 0.08);
}
.wl-card.wl-row .wl-card-main {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.65rem 0.9rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  flex-wrap: nowrap;
  cursor: pointer;
}
.wl-card.wl-row .wl-card-main:hover { text-decoration: none; }
.wl-card.wl-row a.wl-card-main:hover .wl-name { color: var(--accent); }
.wl-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  min-width: 0;
}
.wl-col-name {
  flex: 0 0 7.5rem;
  flex-direction: row;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.wl-col-price {
  flex: 0 0 7.5rem;
  flex-direction: row;
  align-items: baseline;
  gap: 0.45rem;
}
.wl-col-52w {
  flex: 1 1 9rem;
  max-width: 14rem;
  min-width: 7rem;
}
.wl-col-ratings {
  flex: 0 1 auto;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.28rem;
  align-items: center;
}
.wl-col-upside {
  flex: 0 0 5.5rem;
  align-items: flex-start;
}
.wl-upside-label {
  font-size: 0.68rem;
  color: var(--muted);
}
.wl-upside-val {
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.wl-col-asof {
  flex: 0 0 auto;
  margin-left: auto;
}
.wl-card.wl-row a.wl-add-compare {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 3.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: #f5f8fc;
  border-left: 1px solid var(--border);
  border-top: none;
  padding: 0 0.35rem;
  text-decoration: none;
  writing-mode: horizontal-tb;
}
.wl-card.wl-row a.wl-add-compare:hover {
  background: var(--accent-soft);
  text-decoration: none;
}
.wl-card.wl-row .wl-price {
  font-size: 1.05rem;
}
.wl-card.wl-row .wl-52w-label {
  margin-bottom: 0.15rem;
}
.wl-card.wl-row .wl-52w,
.wl-card.wl-row .wl-price-row,
.wl-card.wl-row .wl-ratings,
.wl-card.wl-row .wl-upside {
  margin-bottom: 0;
}
@media (max-width: 900px) {
  .wl-card.wl-row .wl-card-main {
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
  }
  .wl-col-name { flex-basis: 100%; }
  .wl-col-asof { margin-left: 0; }
  .wl-col-52w { flex: 1 1 100%; max-width: none; }
}


.compare-page { max-width: 1100px; }
.compare-head { margin: 0.35rem 0 0.85rem; }
.compare-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}
.compare-sub {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.compare-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}
.compare-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.compare-chip:hover {
  border-color: #b7d0e8;
  background: #f5f8fc;
}
.compare-chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.compare-chip .cc-ticker {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
}
.compare-chip.active .cc-ticker { color: var(--accent); opacity: 0.85; }
.compare-hint {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.compare-hint.warn {
  color: #a15c1a;
  background: #fff6eb;
  border: 1px solid #f0d8c4;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
}
.compare-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  -webkit-overflow-scrolling: touch;
}
table.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 560px;
}
table.compare-table th,
table.compare-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.compare-table thead th {
  background: #f0f3f8;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}
table.compare-table th.metric-col,
table.compare-table td.metric-col,
table.compare-table tbody th.metric-col {
  position: sticky;
  left: 0;
  background: #f7f9fc;
  z-index: 2;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  min-width: 88px;
  border-right: 1px solid var(--border);
}
table.compare-table thead th.metric-col {
  z-index: 3;
  background: #e8edf5;
}
table.compare-table tbody tr:last-child td,
table.compare-table tbody tr:last-child th { border-bottom: none; }
table.compare-table tbody tr:hover td { background: #fafbfd; }
table.compare-table tbody tr:hover th.metric-col { background: #eef2f8; }

.cmp-col-head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 120px;
}
.cmp-name { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.cmp-ticker {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  width: fit-content;
}
.cmp-asof { font-size: 0.68rem; color: var(--muted); }
.cmp-price { font-size: 1.05rem; }
.cmp-52w { display: flex; flex-direction: column; gap: 0.25rem; font-variant-numeric: tabular-nums; }
.cmp-52w-bar {
  height: 5px;
  background: #e8ecf3;
  border-radius: 999px;
  overflow: hidden;
  max-width: 120px;
}
.cmp-52w-fill {
  height: 100%;
  background: linear-gradient(90deg, #a8c8e8, var(--accent));
  border-radius: 999px;
}
.cmp-snip {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
  max-width: 220px;
}
.cmp-report-link { font-weight: 600; font-size: 0.85rem; white-space: nowrap; }

@media (max-width: 640px) {
  .compare-page { padding-left: 0.75rem; padding-right: 0.75rem; }
  .compare-chip { font-size: 0.8rem; padding: 0.3rem 0.6rem; }
  table.compare-table { font-size: 0.82rem; }
  .cmp-snip { max-width: 160px; -webkit-line-clamp: 4; }
}


/* 盯盘：不展示日期；移动端行卡 */
.wl-asof, .wl-col-asof { display: none !important; }

@media (max-width: 900px) {
  .wl-card.wl-row {
    border-radius: 12px;
  }
  .wl-card.wl-row .wl-card-main {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name ratings"
      "price upside"
      "bar bar";
    gap: 0.35rem 0.55rem;
    padding: 0.7rem 0.8rem;
    align-items: start;
    justify-items: stretch;
  }
  .wl-col-name {
    grid-area: name;
    flex-basis: auto;
    justify-content: flex-start;
    align-items: baseline;
    text-align: left;
  }
  .wl-col-price {
    grid-area: price;
    flex: none;
    justify-content: flex-start;
    align-items: baseline;
    text-align: left;
  }
  .wl-col-upside {
    grid-area: upside;
    align-items: flex-end;
    text-align: right;
    flex: none;
    justify-self: end;
  }
  .wl-col-upside .wl-upside-label { display: none; }
  .wl-col-52w {
    grid-area: bar;
    flex: none;
    max-width: none;
    min-width: 0;
    width: 100%;
  }
  .wl-col-ratings {
    grid-area: ratings;
    flex: none;
    justify-self: end;
    justify-content: flex-end;
    align-items: flex-start;
    text-align: right;
    max-width: 100%;
  }
  .wl-card.wl-row .wl-name,
  .wl-card.wl-row .wl-price,
  .wl-card.wl-row .wl-chg {
    text-align: left;
  }
  .wl-card.wl-row .wl-price { font-size: 1.15rem; }
  .wl-card.wl-row a.wl-add-compare {
    flex: 0 0 2.6rem;
    font-size: 0.7rem;
  }
  .wl-market-title {
    font-size: 0.85rem;
    margin: 0.85rem 0 0.4rem;
  }
}

/* —— 盯盘搜索加入 —— */
.wl-search {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0.35rem 0 0;
  padding: 0.55rem 0.65rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.wl-search-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.wl-search-input {
  flex: 1 1 10rem;
  min-width: 0;
  padding: 0.45rem 0.7rem;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  outline: none;
}
.wl-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.wl-search-btn {
  flex: 0 0 auto;
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.wl-search-btn:hover { opacity: 0.92; }
.wl-search-btn:disabled,
.wl-search.is-pending .wl-search-btn {
  opacity: 0.55;
  cursor: not-allowed;
}
.wl-search-toast {
  flex: 1 1 100%;
  margin: 0.15rem 0 0;
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
  line-height: 1.45;
  border-radius: 8px;
  border: 1px solid transparent;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.wl-search-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.wl-search-toast.is-error {
  color: #a8071a;
  background: #fff1f0;
  border-color: #ffa39e;
}
.wl-search-toast.is-success {
  color: #135200;
  background: #f6ffed;
  border-color: #b7eb8f;
}
.wl-search-toast.is-info {
  color: #094c7a;
  background: var(--accent-soft);
  border-color: #91d5ff;
}
/* Error / not-found tips: fixed at top of viewport */
.wl-search-toast.is-error.is-visible {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  z-index: 1000;
  margin: 0;
  box-shadow: 0 8px 24px rgba(26, 29, 38, 0.18);
}
@media (min-width: 561px) {
  .wl-search-toast.is-error.is-visible {
    left: 50%;
    right: auto;
    width: min(28rem, calc(100vw - 1.5rem));
    transform: translateX(-50%);
  }
}
@media (max-width: 560px) {
  .wl-search-toast.is-success.is-visible,
  .wl-search-toast.is-info.is-visible {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 1rem;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(26, 29, 38, 0.18);
    margin: 0;
  }
  .wl-search-label { display: none; }
}

/* --- watch search suggest / remove / queue (v30) --- */
.wl-search-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}
.wl-search-wrap .wl-search-input {
  width: 100%;
  box-sizing: border-box;
}
.wl-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 35, 60, 0.12);
  max-height: 240px;
  overflow-y: auto;
}
.wl-suggest-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  font-size: 0.88rem;
}
.wl-suggest-item:hover,
.wl-suggest-item.is-active {
  background: var(--accent-soft);
}
.wl-suggest-name { font-weight: 600; }
.wl-suggest-meta {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}
.wl-card.wl-row button.wl-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 3.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #a61d24;
  background: #fff7f7;
  border: none;
  border-left: 1px solid var(--border);
  padding: 0 0.35rem;
  cursor: pointer;
  font-family: inherit;
}
.wl-card.wl-row button.wl-remove:hover {
  background: #ffe8e6;
}
.wl-card.wl-row button.wl-remove:disabled {
  opacity: 0.5;
  cursor: wait;
}
.wl-queue {
  margin: 0.55rem 0 0.15rem;
  padding: 0.45rem 0.55rem;
  background: #f5f8fc;
  border: 1px dashed #c5d6ea;
  border-radius: 8px;
  font-size: 0.8rem;
}
.wl-queue-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.wl-queue-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.wl-queue-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #d0dde9;
  color: #3a5670;
  font-size: 0.75rem;
}
.wl-queue-done {
  margin-top: 0.35rem;
  color: var(--muted);
}
.wl-queue-refresh {
  margin-left: 0.35rem;
  font-weight: 600;
  color: var(--accent);
}
@media (max-width: 900px) {
  .wl-card.wl-row button.wl-remove {
    flex: 0 0 2.6rem;
    font-size: 0.7rem;
  }
  .wl-suggest {
    max-height: 200px;
  }
}

.wl-card.wl-row .wl-name {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}
.wl-card.wl-row a.wl-card-main:active .wl-name {
  color: var(--accent);
}
.wl-report-link {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.28rem 0.45rem;
  border-radius: 4px;
  text-decoration: none;
  margin-left: 0;
  align-self: center;
  flex-shrink: 0;
}
.wl-report-link:hover { text-decoration: underline; }

.stock-detail { max-width: 720px; }
.stock-detail-back {
  display: inline-block;
  margin-bottom: 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.stock-detail-back:hover { text-decoration: underline; }
.stock-detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1rem;
}
.stock-detail-header h2 { margin: 0; font-size: 1.45rem; }
.stock-detail-ticker {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
}
.stock-detail-market { font-size: 0.78rem; color: var(--muted); }
.stock-metrics {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.stock-metrics th,
.stock-metrics td {
  padding: 0.65rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.stock-metrics tr:last-child th,
.stock-metrics tr:last-child td { border-bottom: none; }
.stock-metrics th {
  width: 38%;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.88rem;
  background: #f7f9fc;
}
.stock-metrics td { font-weight: 600; font-size: 0.95rem; }
.stock-prefs {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.stock-prefs h3 { margin: 0 0 0.75rem; font-size: 1rem; }
.stock-prefs-list { display: flex; flex-direction: column; gap: 0.65rem; }
.stock-pref-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
}
.stock-pref-item input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
}
.stock-detail-meta { font-size: 0.75rem; color: var(--muted); margin-top: 0.5rem; }
.stock-detail-toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: #1a1a1a;
  color: #fff;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  opacity: 0;
  transition: transform 0.25s, opacity 0.25s;
  z-index: 40;
  max-width: 90vw;
}
.stock-detail-toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.stock-detail-toast.is-error { background: #a61b1b; }
.stock-detail-toast.is-success { background: #0d7a4f; }
@media (max-width: 600px) {
  .stock-metrics th { width: 42%; }
  .stock-detail-header h2 { font-size: 1.25rem; }
}

.stock-reports {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #e5eaf0);
}
.stock-reports h3 { margin: 0 0 0.75rem; font-size: 1rem; }
.stock-reports-empty { margin: 0; font-size: 0.88rem; color: var(--muted); }
.stock-reports-ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.stock-report-item { margin: 0; }
.stock-report-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border, #e5eaf0);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: #fff;
}
.stock-report-link:hover {
  border-color: #b7d0e8;
  box-shadow: 0 2px 8px rgba(26, 111, 181, 0.08);
}
.stock-report-date {
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}
.stock-report-title {
  flex: 1 1 12rem;
  font-size: 0.92rem;
  font-weight: 600;
  min-width: 0;
}
.tag-morningstar { background: #fff4e5; color: #b35c00; }

/* red underline highlights */
.hl-red {
  text-decoration: underline;
  text-decoration-color: #e11d48;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  color: inherit;
}
.hl-menu {
  position: fixed;
  z-index: 9999;
  display: none;
  flex-direction: column;
  gap: 0;
  min-width: 8.5rem;
  padding: 0.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(26, 35, 50, 0.12);
  font-size: 0.88rem;
}
.hl-menu.show { display: flex; }
.hl-menu button {
  font: inherit;
  text-align: left;
  padding: 0.45rem 0.7rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.hl-menu button:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
