/* ===========================================================
   Groww H5 — 首页
   参考 core-pages-1.png：搜索框 → 两张指数卡 → Top movers 三卡
   → Your watchlist 三行。
   =========================================================== */

/* ---------- 指数卡 ---------- */
.gw-index-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 16px var(--gw-pad) 0;
}
.gw-index-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px 12px;
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-md);
  background: var(--gw-white);
  text-decoration: none;
  color: inherit;
}
.gw-index-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  min-height: 20px;
}
.gw-index-name {
  font-size: 12px;
  font-weight: var(--gw-fw-semi);
  color: var(--gw-ink-2);
  white-space: nowrap;
}
.gw-spark { width: 48px; height: 20px; flex: 0 0 auto; color: var(--gw-up); }
.gw-index-card.is-down .gw-spark { color: var(--gw-down); }
.gw-index-value {
  font-size: var(--gw-fs-index);
  font-weight: var(--gw-fw-bold);
  color: var(--gw-ink);
  letter-spacing: -0.3px;
  line-height: 1.25;
}
.gw-index-change {
  font-size: 13px;
  font-weight: var(--gw-fw-semi);
}
.gw-index-card.is-up .gw-index-change { color: var(--gw-up); }
.gw-index-card.is-down .gw-index-change { color: var(--gw-down); }

/* ---------- Top movers 三卡 ---------- */
.gw-mover-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 var(--gw-pad);
}
.gw-mover-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px;
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-md);
  background: var(--gw-white);
  text-decoration: none;
  color: inherit;
}
/* 图标位：参考图是公司 logo，这里用首字母圆角块占位 */
.gw-mover-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  margin-bottom: 2px;
}
.gw-mover-name {
  font-size: 12px;
  font-weight: var(--gw-fw-semi);
  color: var(--gw-ink);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gw-mover-price {
  font-size: 13px;
  font-weight: var(--gw-fw-med);
  color: var(--gw-ink);
}
.gw-mover-pct {
  font-size: 12px;
  font-weight: var(--gw-fw-semi);
}

/* ---------- 自选列表 ---------- */
.gw-watch-list {
  padding: 0 var(--gw-pad);
}
.gw-watch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  text-decoration: none;
  color: inherit;
}
.gw-watch-row + .gw-watch-row { border-top: 1px solid var(--gw-line-2); }
.gw-watch-name {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: var(--gw-fw-semi);
  color: var(--gw-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gw-watch-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.gw-watch-right strong {
  font-size: 15px;
  font-weight: var(--gw-fw-semi);
  color: var(--gw-ink);
}
.gw-watch-right em {
  font-style: normal;
  font-size: 12px;
  font-weight: var(--gw-fw-semi);
}

.gw-empty {
  padding: 16px var(--gw-pad);
  margin: 0;
  font-size: 13px;
  color: var(--gw-ink-3);
}

/* ── 首页资讯列表 ──────────────────────────────────
 * 一行一条：标题在上，来源与时间在下。
 * 与自选行同一套间距和分隔线，视觉上归为同一类列表。
 */
.gw-news-list {
  padding: 0 var(--gw-pad);
}

.gw-news-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 0;
  text-decoration: none;
  color: inherit;
}

.gw-news-row + .gw-news-row {
  border-top: 1px solid var(--gw-line-2);
}

.gw-news-title {
  font-size: 14px;
  line-height: 1.45;
  color: var(--gw-ink);
  /* 标题最多两行，避免长标题把首页撑得很高 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gw-news-meta {
  font-size: 11px;
  color: var(--gw-ink-3);
}
