/* ===========================================================
   Groww H5 — IPOs 两页 / ETFs / Gold（ipo-etf-gold-1/2/3/4）
   =========================================================== */

/* ---------- IPOs 列表 ---------- */
.gw-ipos { padding-bottom: 24px; }
.gw-ipo-chips { padding-top: 2px; padding-bottom: 14px; }
.gw-ipo-list { padding: 0 var(--gw-pad); display: flex; flex-direction: column; gap: 12px; }

.gw-ipo-card {
  padding: 14px;
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
  background: #fff;
}
.gw-ipo-card header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.gw-ipo-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: var(--gw-fw-bold);
  color: #24506e;
}
.gw-ipo-names { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.gw-ipo-names strong {
  font-size: 15.5px;
  font-weight: var(--gw-fw-bold);
  color: var(--gw-ink);
  line-height: 1.25;
}
.gw-ipo-names em { font-style: normal; font-size: 12px; color: var(--gw-ink-3); }

.gw-ipo-sub {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--gw-green-soft);
}
.gw-ipo-sub b { font-size: 13px; font-weight: var(--gw-fw-bold); color: var(--gw-green); }
.gw-ipo-sub em { font-style: normal; font-size: 10.5px; color: var(--gw-green); }

/* 三列信息 */
.gw-ipo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.gw-ipo-grid > div { display: flex; flex-direction: column; gap: 5px; }
.gw-ipo-grid span { font-size: 11.5px; color: var(--gw-ink-3); }
.gw-ipo-grid b { font-size: 13px; font-weight: var(--gw-fw-semi); color: var(--gw-ink); }

.gw-ipo-card footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--gw-line-2);
}
.gw-ipo-rhp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: none;
  background: none;
  font-size: 13px;
  color: var(--gw-ink-2);
}
.gw-ipo-rhp .gw-icon { width: 17px; height: 17px; }
.gw-ipo-details {
  flex: 1;
  font-size: 13px;
  font-weight: var(--gw-fw-semi);
  color: var(--gw-green);
  text-decoration: none;
}
.gw-ipo-apply {
  height: 34px;
  padding: 0 18px;
  border: none;
  border-radius: 8px;
  background: var(--gw-blue);
  color: #fff;
  font-size: 13.5px;
  font-weight: var(--gw-fw-semi);
}

/* ---------- IPO 详情 ---------- */
.gw-ipo-detail { padding-bottom: 96px; }

.gw-ipo-title { display: flex; align-items: flex-start; gap: 12px; padding: 4px var(--gw-pad) 0; }
.gw-ipo-title .gw-ipo-logo { width: 48px; height: 48px; border-radius: 12px; }
.gw-ipo-title-names { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.gw-ipo-title-names strong { font-size: 17px; font-weight: var(--gw-fw-bold); color: var(--gw-ink); line-height: 1.25; }
.gw-ipo-title-names em { font-style: normal; font-size: 12.5px; color: var(--gw-ink-3); }

/* Price band / Lot size 两栏，中间竖线 */
.gw-ipo-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 16px var(--gw-pad) 0;
}
.gw-ipo-two > div { display: flex; flex-direction: column; gap: 7px; padding: 0 14px 0 0; }
.gw-ipo-two > div + div { border-left: 1px solid var(--gw-line); padding-left: 16px; }
.gw-ipo-two span { font-size: 12.5px; color: var(--gw-ink-3); }
.gw-ipo-two b { font-size: 20px; font-weight: var(--gw-fw-bold); color: var(--gw-ink); letter-spacing: -0.3px; }

.gw-ipo-h2 {
  margin: 20px var(--gw-pad) 0;
  font-size: 15.5px;
  font-weight: var(--gw-fw-bold);
  color: var(--gw-ink);
}
.gw-sub-asof { font-style: normal; font-size: 12px; font-weight: var(--gw-fw-med); color: var(--gw-ink-3); }

/* 时间轴：四节点 + 连接线 */
.gw-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 14px 0 0;
  padding: 0 var(--gw-pad);
  list-style: none;
}
.gw-tl-node {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
/* 节点之间的灰线（第一个节点左侧不画，最后一个右侧不画） */
.gw-tl-node::before {
  content: '';
  position: absolute;
  top: 9px;
  left: 0;
  right: 50%;
  height: 2px;
  background: var(--gw-line);
}
.gw-tl-node::after {
  content: '';
  position: absolute;
  top: 9px;
  left: 50%;
  right: 0;
  height: 2px;
  background: var(--gw-line);
}
.gw-tl-node:first-child::before { display: none; }
.gw-tl-node:last-child::after { display: none; }
.gw-tl-node.is-done::after,
.gw-tl-node.is-current::before,
.gw-tl-node.is-done::before { background: var(--gw-green); }

.gw-tl-dot {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--gw-line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
}
.gw-tl-node.is-done .gw-tl-dot {
  border-color: var(--gw-green);
  background: var(--gw-green);
}
.gw-tl-node.is-current .gw-tl-dot { border-color: var(--gw-green); }
.gw-tl-node.is-current .gw-tl-dot i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gw-green);
}
.gw-tl-node b {
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: var(--gw-fw-med);
  color: var(--gw-ink);
}
.gw-tl-node em { font-style: normal; font-size: 11px; color: var(--gw-ink-3); line-height: 1.4; }

/* Subscription 表 */
.gw-sub-table {
  width: calc(100% - var(--gw-pad) * 2);
  margin: 10px var(--gw-pad) 0;
  border-collapse: collapse;
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-md);
  overflow: hidden;
  table-layout: fixed;
}
.gw-sub-table th {
  padding: 9px 12px;
  font-size: 11.5px;
  font-weight: var(--gw-fw-med);
  color: var(--gw-ink-3);
  text-align: right;
  background: #fafbfc;
}
.gw-sub-table th:first-child { text-align: left; }
.gw-sub-table td {
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--gw-ink);
  text-align: right;
  border-top: 1px solid var(--gw-line-2);
}
.gw-sub-table td:first-child { text-align: left; }
.gw-sub-table tr.is-overall td { background: var(--gw-green-soft); font-weight: var(--gw-fw-semi); }
.gw-sub-chip {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--gw-green-soft);
  color: var(--gw-green);
  font-size: 12px;
  font-weight: var(--gw-fw-bold);
}
.gw-sub-table tr.is-overall .gw-sub-chip { background: #d3f0e4; }
.gw-sub-na { color: var(--gw-ink-3); }
.gw-sub-empty { text-align: center !important; color: var(--gw-ink-3); font-size: 13px; }

.gw-ipo-about {
  margin: 8px var(--gw-pad) 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--gw-ink-2);
}

/* 底部 Apply：不能 position:fixed（会脱离 430px 容器撑满整个视口），
   改成 sticky 贴在页面底部、宽度跟随容器。 */
.gw-ipo-applybar {
  position: sticky;
  bottom: 0;
  margin-top: 18px;
  padding: 10px var(--gw-pad) calc(var(--gw-tabbar-h) + 10px);
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 22%);
  z-index: 20;
}
.gw-ipo-applybig {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 10px;
  background: var(--gw-blue);
  color: #fff;
  font-size: 16px;
  font-weight: var(--gw-fw-semi);
}
.gw-ipo-applybig.is-applied { background: var(--gw-green); }

/* ---------- ETFs ---------- */
.gw-etfs { padding-bottom: 24px; }

.gw-etf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--gw-header-h);
  padding: 0 var(--gw-pad);
}
.gw-etf-chips { padding-top: 14px; padding-bottom: 12px; }

.gw-etf-table { padding: 0 var(--gw-pad); }
.gw-etf-headrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px 48px 46px 42px 36px;
  gap: 4px;
  padding: 8px 0;
  border-bottom: 1px solid var(--gw-line);
  font-size: 10px;
  color: var(--gw-ink-3);
  line-height: 1.25;
}
.gw-etf-headrow span { display: block; }
.gw-etf-h { text-align: right; }
.gw-etf-h i, .gw-etf-h-name i { font-style: normal; opacity: .6; }
.gw-etf-h-name { text-align: left; }

.gw-etf-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px 48px 46px 42px 36px;
  gap: 4px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--gw-line-2);
  text-decoration: none;
  color: inherit;
}
/* 第一格 = logo + 名称竖排，避免用负 margin 叠位 */
.gw-etf-cell {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
}
.gw-etf-row .gw-ipo-logo { width: 28px; height: 28px; font-size: 9px; border-radius: 7px; }
.gw-etf-names {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.gw-etf-names strong {
  font-size: 12.5px;
  font-weight: var(--gw-fw-bold);
  color: var(--gw-ink);
  line-height: 1.2;
  /* 参考图里 ETF 名最多两行，超出打省略号，避免有的行三行、有的两行导致行高抖动 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* 参考图名称最多两行，超了省略，避免把行撑高 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gw-etf-names em {
  font-style: normal;
  font-size: 10px;
  color: var(--gw-ink-3);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gw-etf-num { text-align: right; }
.gw-etf-num b { font-size: 11px; font-weight: var(--gw-fw-semi); color: var(--gw-ink); }
.gw-etf-num.gw-up b { color: var(--gw-up); }
.gw-etf-num.gw-down b { color: var(--gw-down); }

.gw-etf-buy {
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--gw-green);
  border-radius: 7px;
  background: var(--gw-green-soft);
  color: var(--gw-green);
  font-size: 11.5px;
  font-weight: var(--gw-fw-semi);
}

.gw-etf-headrow .gw-etf-h-name { grid-column: 1; }

/* Compare ETFs 卡 */
.gw-etf-compare {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px var(--gw-pad) 0;
  padding: 16px;
  border-radius: var(--gw-r-lg);
  background: linear-gradient(135deg, #e9f7f1 0%, #eef3fe 100%);
}
.gw-etf-compare-text { flex: 1; min-width: 0; }
.gw-etf-compare-text h2 { margin: 0 0 6px; font-size: 17px; font-weight: var(--gw-fw-bold); color: var(--gw-ink); }
.gw-etf-compare-text p { margin: 0 0 12px; font-size: 12.5px; line-height: 1.45; color: var(--gw-ink-2); }
.gw-etf-compare-btn {
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--gw-blue);
  border-radius: 9px;
  background: #fff;
  color: var(--gw-blue);
  font-size: 13px;
  font-weight: var(--gw-fw-semi);
}
.gw-etf-compare-art { width: 100px; flex: 0 0 auto; }
.gw-etf-compare-art svg { width: 100%; height: auto; display: block; }

/* ---------- Gold ---------- */
/* 固定底栏（圆点+CTA+5 tab）会盖住内容，底部留够高度 */
.gw-gold { padding-bottom: calc(var(--gw-tabbar-h) + 118px); }

.gw-gold-hero {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px var(--gw-pad) 0;
}
.gw-gold-hero h1 {
  margin: 0 0 6px;
  font-size: 25px;
  font-weight: var(--gw-fw-bold);
  color: var(--gw-ink);
  letter-spacing: -0.5px;
}
.gw-gold-hero p { margin: 0; font-size: 13px; color: var(--gw-ink-2); }
.gw-gold-hero-art { width: 96px; flex: 0 0 auto; margin-left: auto; }
.gw-gold-hero-art svg { width: 100%; height: auto; display: block; }

.gw-gold-entries {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 18px var(--gw-pad) 0;
}
.gw-gold-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-width: 0;
  padding: 16px 8px;
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
  background: #fff;
  text-align: center;
}
.gw-gold-entry-icon { color: var(--gw-blue); display: flex; }
.gw-gold-entry-icon .gw-icon { width: 26px; height: 26px; }
.gw-gold-entry strong {
  font-size: 13px;
  font-weight: var(--gw-fw-bold);
  color: var(--gw-ink);
  line-height: 1.25;
  white-space: nowrap;
}
.gw-gold-entry em {
  font-style: normal;
  font-size: 11px;
  line-height: 1.4;
  color: var(--gw-ink-3);
}

.gw-gold-price {
  margin: 16px var(--gw-pad) 0;
  padding: 14px;
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
}
.gw-gold-price header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--gw-ink-3);
}
.gw-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--gw-green-soft);
  color: var(--gw-green);
  font-size: 11px;
  font-weight: var(--gw-fw-semi);
}
.gw-live i { width: 5px; height: 5px; border-radius: 50%; background: var(--gw-green); }

.gw-gold-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 8px;
}
.gw-gold-price-row strong {
  font-size: 27px;
  font-weight: var(--gw-fw-bold);
  color: var(--gw-ink);
  letter-spacing: -0.5px;
}
.gw-gold-price-row > span { font-size: 13.5px; font-weight: var(--gw-fw-semi); }
.gw-gold-spark { width: 96px; height: 40px; margin-left: auto; align-self: flex-end; }

.gw-gold-learn {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px var(--gw-pad) 0;
  padding: 14px;
  border: 1px solid var(--gw-line);
  border-radius: var(--gw-r-lg);
}
.gw-gold-learn-icon { width: 62px; flex: 0 0 auto; background: #eef6ff; border-radius: 10px; padding: 6px; }
.gw-gold-learn-icon svg { width: 100%; height: auto; display: block; }
.gw-gold-learn-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.gw-gold-learn-text strong { font-size: 14.5px; font-weight: var(--gw-fw-bold); color: var(--gw-ink); }
.gw-gold-learn-text em { font-style: normal; font-size: 12px; line-height: 1.45; color: var(--gw-ink-2); }

/* 参考图里圆点 + Explore options 固定在底栏上方，一起贴底 */
.gw-gold-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 0 10px;
}
/* 430px 容器内的固定底栏：left/right 用容器自身的 50% 定位，不会撑满视口 */
.gw-gold-footer {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: var(--gw-app-w, 430px);
  max-width: 100vw;
  transform: translateX(-50%);
  z-index: 15;
  padding-bottom: calc(var(--gw-tabbar-h) + 8px);
  background: #fff;
}
.gw-gold-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gw-line);
}
.gw-gold-dots i.is-on { background: var(--gw-green); }

.gw-gold-cta { padding: 0 var(--gw-pad) 8px; }
.gw-gold-explore {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 10px;
  background: var(--gw-green);
  color: #fff;
  font-size: 15.5px;
  font-weight: var(--gw-fw-semi);
}

/* IPO 详情：发行规模/登记机构/板块，以及 Strengths / Risks 两栏 */
/* 第二组有 Issue size / Registrar / Sector 三项，沿用两列栅格会让
   Sector 掉到第二行、分隔线也跟着错位。这里单独声明三列。 */
.gw-ipo-meta {
  grid-template-columns: 1fr 1fr 1fr;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gw-line);
}
/* 三项时字号收一点，避免 ₹8,981.12 Cr 这类长值撑破列宽 */
.gw-ipo-meta b { font-size: 16px; }
.gw-ipo-meta span { font-size: 12px; }
/* Sector 是文字值（如 Agro Chemicals），三列下容易折行；
   Registrar 的 LINK 又很短。给 Sector 更多宽度、允许正常断行但不割裂单词。 */
.gw-ipo-meta { grid-template-columns: 1.15fr 0.85fr 1.2fr; }
.gw-ipo-meta > div > b { overflow-wrap: break-word; word-break: keep-all; }
.gw-ipo-pc {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 var(--gw-pad) 8px;
}
.gw-ipo-pros, .gw-ipo-cons {
  border-radius: 12px;
  padding: 12px 14px;
}
.gw-ipo-pros { background: #eefaf4; }
.gw-ipo-cons { background: #fdf3f1; }
.gw-ipo-pros h3, .gw-ipo-cons h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: var(--gw-fw-bold);
}
.gw-ipo-pros h3 { color: #0a8f6a; }
.gw-ipo-cons h3 { color: #c9463a; }
.gw-ipo-pros ul, .gw-ipo-cons ul {
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gw-ipo-pros li, .gw-ipo-cons li {
  font-size: 12px;
  line-height: 1.5;
  color: var(--gw-ink-2);
}

/* 认购表全为「—」时的说明文字：避免看起来像数据缺失 */
.gw-sub-note {
  margin: 10px var(--gw-pad) 0;
  font-size: 12px;
  line-height: 18px;
  color: var(--gw-ink-3);
}
