/* ============================================================
   IPO TRACKER — Main Stylesheet
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #ede9fe;
  --accent: #f59e0b;
  --success: #22c55e;
  --danger: #ef4444;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface2: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.05);
  --shadow-hover: 0 4px 20px rgba(99,102,241,.18);
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* --- Google Font load --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ============================================================
   NAV
   ============================================================ */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.15rem; color: var(--text);
}
.nav-logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 1rem;
}
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-link {
  color: var(--text-2); font-weight: 500; font-size: 0.9rem;
  transition: color var(--transition);
}
.nav-link:hover { color: var(--primary); }

/* ── Dropdown nav ── */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
  display: flex; align-items: center; gap: 4px;
  color: var(--text-2); font-weight: 500; font-size: 0.9rem;
  background: none; border: none; padding: 4px 0; cursor: pointer;
  transition: color var(--transition);
}
.nav-dropdown-trigger:hover { color: var(--primary); }
.nav-dropdown-trigger svg { transition: transform .2s; }
.nav-dropdown.active .nav-dropdown-trigger { color: var(--primary); }
.nav-dropdown.active .nav-dropdown-trigger svg { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 6px;
  min-width: 190px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.nav-dropdown.active .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Small arrow pointer */
.nav-dropdown-menu::before {
  content: ''; position: absolute;
  top: -6px; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom: 6px solid var(--border);
  border-top: none;
}
.nav-dropdown-menu::after {
  content: ''; position: absolute;
  top: -5px; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom: 6px solid #fff;
  border-top: none;
}

.nav-dropdown-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-radius: 8px;
  color: var(--text-2); font-size: .85rem; font-weight: 500;
  transition: all .15s; white-space: nowrap; gap: 8px;
}
.nav-dropdown-item:hover { background: var(--primary-light); color: var(--primary); }
.nav-dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

.nd-badge {
  font-size: .65rem; font-weight: 700; padding: 2px 6px;
  border-radius: 4px; flex-shrink: 0;
}
.nd-soon { background: #fef9c3; color: #92400e; }
.nd-top  { background: #dcfce7; color: #166534; }

.nav-right { display: flex; align-items: center; gap: 1rem; }

/* Language switcher */
.lang-switcher { display: flex; align-items: center; gap: 3px; background: var(--surface2); border-radius: 100px; padding: 3px; }
.lang-btn {
  padding: 4px 8px; border-radius: 100px; border: none;
  background: transparent; font-size: 0.75rem; font-weight: 600;
  color: var(--text-2); transition: all var(--transition); cursor: pointer;
}
.lang-btn.active, .lang-btn:hover { background: var(--primary); color: white; }

.nav-subscribe-btn {
  padding: 8px 18px; border-radius: 100px; border: none;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white; font-weight: 600; font-size: 0.85rem;
  transition: all var(--transition); white-space: nowrap;
}
.nav-subscribe-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(99,102,241,.4); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4f46e5 100%);
  padding: 2rem 1.5rem 1.5rem;
  text-align: center; color: white;
}
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: 0.6rem; }
.hero p { font-size: 1.05rem; opacity: 0.8; max-width: 560px; margin: 0 auto 2rem; }

.hero-stats {
  display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap;
}
.hero-stat {
  background: rgba(255,255,255,.12); border-radius: 12px;
  padding: 1rem 1.8rem; min-width: 110px; text-align: center;
}
.hero-stat .stat-num { font-size: 1.8rem; font-weight: 800; display: block; }
.hero-stat .stat-text { font-size: 0.78rem; opacity: 0.75; text-transform: uppercase; letter-spacing: .05em; }

/* ============================================================
   TOOLBAR (tabs + search)
   ============================================================ */
.toolbar {
  max-width: 1200px; margin: 1.5rem auto 0; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}

.tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 4px; }
.tab-btn {
  padding: 8px 18px; border: none; border-radius: 8px; background: transparent;
  font-weight: 600; font-size: 0.87rem; color: var(--text-2);
  transition: all var(--transition);
}
.tab-btn.active { background: var(--primary); color: white; }
.tab-btn:hover:not(.active) { background: var(--surface2); }

.toolbar-right { display: flex; align-items: center; gap: 0.75rem; }

.search-wrap { position: relative; }
.search-wrap input {
  padding: 9px 14px 9px 36px; border: 1.5px solid var(--border);
  border-radius: 9px; background: var(--surface);
  font-size: 0.87rem; color: var(--text); width: 220px;
  transition: border-color var(--transition);
}
.search-wrap input:focus { outline: none; border-color: var(--primary); }
.search-icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none;
}

select#categoryFilter {
  padding: 9px 14px; border: 1.5px solid var(--border);
  border-radius: 9px; background: var(--surface);
  font-size: 0.87rem; color: var(--text);
  appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 30px; cursor: pointer;
}
select#categoryFilter:focus { outline: none; border-color: var(--primary); }

.count-badge {
  background: var(--primary-light); color: var(--primary);
  font-size: 0.78rem; font-weight: 700; padding: 4px 10px;
  border-radius: 100px; white-space: nowrap;
}

/* ============================================================
   IPO GRID
   ============================================================ */
.ipo-grid-wrap { max-width: 1200px; margin: 1.25rem auto 3rem; padding: 0 1.5rem; }

#ipoGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.1rem;
}

/* ============================================================
   IPO CARD
   ============================================================ */
.ipo-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  cursor: pointer; transition: all var(--transition);
  display: flex; flex-direction: column; gap: 1rem;
}
.ipo-card:hover { border-color: var(--primary); box-shadow: var(--shadow-hover); transform: translateY(-2px); }

/* ── Card Header ── */
.card-header { display: flex; align-items: flex-start; gap: 12px; }
.ipo-logo {
  width: 46px; height: 46px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem;
}
.card-title-wrap { flex: 1; min-width: 0; }
.card-title { font-size: 0.97rem; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sector-tag {
  display: inline-block; margin-top: 3px;
  background: var(--surface2); color: var(--text-2);
  font-size: 0.7rem; font-weight: 600; padding: 2px 8px; border-radius: 100px;
}

.badge {
  font-size: 0.68rem; font-weight: 700; padding: 3px 9px;
  border-radius: 100px; white-space: nowrap; flex-shrink: 0;
  letter-spacing: .03em; margin-top: 2px;
}
.badge-open { background: #dcfce7; color: #16a34a; }
.badge-upcoming { background: #fef3c7; color: #d97706; }
.badge-closed { background: #f1f5f9; color: #64748b; }

/* ── Price Row — 4 columns ── */
.card-price-row { display: flex; gap: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.price-stat { flex: 1; padding: 7px 7px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.price-stat + .price-stat { border-left: 1px solid var(--border); }
.ps-label { font-size: 0.67rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; font-weight: 500; }
.ps-val { font-size: 0.82rem; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── GMP + Sparkline block ── */
.card-gmp-block {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, #f8faff, #f0f4ff);
  border: 1px solid #e0e7ff; border-radius: 12px; padding: 10px 14px;
}
.gmp-left { min-width: 72px; }
.gmp-main-label { font-size: 0.67rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 600; margin-bottom: 2px; }
.gmp-main-val { font-size: 1.2rem; font-weight: 800; color: var(--text); line-height: 1.1; }
.gmp-pct { font-size: 0.8rem; font-weight: 700; margin-top: 1px; }
.gmp-pos { color: #16a34a; }
.gmp-neg { color: #ef4444; }

.gmp-spark { flex: 1; min-width: 0; padding: 0 4px; }

.gmp-right { min-width: 80px; text-align: right; }
.est-label { font-size: 0.67rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 600; margin-bottom: 2px; }
.est-val { font-size: 1.2rem; font-weight: 800; line-height: 1.1; }
.est-sub { font-size: 0.65rem; color: var(--text-3); margin-top: 1px; }
.ret-high { color: #16a34a; }
.ret-mid  { color: #d97706; }
.ret-low  { color: var(--text-2); }
.ret-neg  { color: #ef4444; }

/* ── Subscription bars ── */
.card-sub-section { display: flex; flex-direction: column; gap: 6px; }
.sub-section-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 600; display: flex; align-items: center; justify-content: space-between; }

.sub-overall { display: flex; align-items: baseline; gap: 6px; }
.sub-overall-num { font-size: 1.05rem; font-weight: 800; color: var(--text); }
.sub-overall-label { font-size: 0.72rem; color: var(--text-3); }

.sub-bars-group { display: flex; flex-direction: column; gap: 5px; }
.sub-row { display: flex; align-items: center; gap: 7px; }
.sub-cat-label { font-size: 0.72rem; font-weight: 700; color: var(--text-2); width: 28px; flex-shrink: 0; }
.sub-track { flex: 1; height: 8px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.sub-fill { height: 100%; border-radius: 4px; transition: width 0.7s cubic-bezier(.4,0,.2,1); }
.sub-cat-val { font-size: 0.78rem; font-weight: 700; width: 42px; text-align: right; flex-shrink: 0; }
.sub-upcoming { font-size: 0.82rem; color: var(--text-2); font-weight: 500; padding: 6px 0; }

/* ── Card title row (name + hot badge) ── */
.card-title-row { display: flex; align-items: center; gap: 6px; }
.card-tags { display: flex; align-items: center; gap: 5px; margin-top: 3px; flex-wrap: wrap; }

/* ── Hot badge ── */
.hot-badge {
  display: inline-block; font-size: 0.67rem; font-weight: 800;
  background: #fff7ed; color: #c2410c;
  border: 1px solid #fed7aa; border-radius: 100px;
  padding: 1px 7px; white-space: nowrap; flex-shrink: 0;
}
.card-hot { border-color: #fdba74 !important; }
.card-hot:hover { box-shadow: 0 4px 20px rgba(249,115,22,0.2) !important; }

/* ── Status-based card styles (All IPOs tab) ── */
.card-open {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 2px rgba(34,197,94,0.15);
}
.card-open:hover { box-shadow: 0 4px 20px rgba(34,197,94,0.28) !important; }
.card-upcoming {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 2px rgba(245,158,11,0.12);
}
.card-upcoming:hover { box-shadow: 0 4px 20px rgba(245,158,11,0.22) !important; }
.card-closed { opacity: 0.55; filter: grayscale(35%); }
.card-closed:hover { opacity: 0.85; filter: grayscale(0%); transition: all .25s; }

/* ── Category badge (Mainboard / SME) ── */
.category-badge {
  display: inline-block; font-size: 0.63rem; font-weight: 800;
  border-radius: 100px; padding: 1px 6px; white-space: nowrap; letter-spacing: .03em;
}
.category-badge.mainboard { background: #ede9fe; color: #6d28d9; border: 1px solid #ddd6fe; }
.category-badge.sme       { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }

/* ── Rating badge (CRISIL / CARE) ── */
.rating-badge {
  display: inline-block; font-size: 0.63rem; font-weight: 700;
  background: #fefce8; color: #854d0e; border: 1px solid #fde68a;
  border-radius: 100px; padding: 1px 6px; white-space: nowrap;
}

/* ── Subscription day progress ── */
.sub-day-progress  { display: flex; align-items: center; gap: 4px; }
.sub-day-label     { font-size: 0.63rem; font-weight: 700; color: var(--text-3); }
.sub-day-dots      { display: flex; gap: 3px; }
.sub-day-dot       { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.sub-day-dot.filled { background: var(--primary); }

/* ── Listing date in footer ── */
.listing-date-row  { display: flex; align-items: center; gap: 5px; margin-top: 3px; }
.listing-date-label { font-size: 0.63rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.listing-date-val  { font-size: 0.78rem; font-weight: 600; color: var(--text-2); }

/* ── Board tabs (All / Mainboard / SME) ── */
.board-tabs {
  display: flex; gap: 3px; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: 9px; padding: 3px;
}
.board-tab-btn {
  padding: 5px 12px; border: none; border-radius: 7px; background: transparent;
  font-size: 0.8rem; font-weight: 600; color: var(--text-2);
  transition: all var(--transition); white-space: nowrap;
}
.board-tab-btn.active { background: var(--primary); color: white; }
.board-tab-btn:hover:not(.active) { background: var(--surface2); }

/* ── Exchange badge ── */
.exchange-badge {
  display: inline-block; font-size: 0.67rem; font-weight: 700;
  background: #eff6ff; color: #1d4ed8;
  border: 1px solid #bfdbfe; border-radius: 100px;
  padding: 1px 7px; white-space: nowrap;
}

/* ── GMP trend arrow ── */
.gmp-trend-arrow { font-size: 1rem; font-weight: 900; vertical-align: middle; margin-left: 1px; }
.gmp-trend-arrow.up   { color: #16a34a; }
.gmp-trend-arrow.down { color: #dc2626; }

/* ── Countdown pill ── */
.countdown-pill {
  display: inline-block; font-size: 0.67rem; font-weight: 700;
  padding: 1px 7px; border-radius: 100px; white-space: nowrap;
}
.cd-urgent { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.cd-warn   { background: #fff7ed; color: #c2410c; border: 1px solid #fdba74; }
.cd-normal { background: var(--surface2); color: var(--text-2); border: 1px solid var(--border); }

/* ── Card footer ── */
.card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 4px; }
.date-block { display: flex; flex-direction: column; gap: 2px; }
.date-label { font-size: 0.67rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.date-val-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.date-val { font-size: 0.88rem; font-weight: 700; }

.view-btn {
  display: inline-flex; align-items: center;
  padding: 7px 14px; border-radius: 8px;
  background: var(--primary-light); color: var(--primary);
  font-size: 0.82rem; font-weight: 700;
  transition: all var(--transition);
}
.view-btn:hover { background: var(--primary); color: white; }

/* legacy compat */
.stat-label { font-size: 0.72rem; color: var(--text-3); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.return-high { color: #16a34a; }
.return-mid { color: #d97706; }

.empty-state { grid-column: 1 / -1; text-align: center; padding: 4rem 2rem; color: var(--text-2); }
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }

/* ============================================================
   SUBSCRIBE MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15,23,42,.55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-box {
  background: var(--surface); border-radius: 20px; width: 100%; max-width: 460px;
  padding: 2rem; position: relative;
  transform: translateY(16px); transition: transform 0.25s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
}
.modal-overlay.active .modal-box { transform: translateY(0); }

.modal-close {
  position: absolute; top: 14px; right: 16px;
  background: var(--surface2); border: none; border-radius: 8px;
  width: 30px; height: 30px; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.modal-close:hover { background: var(--border); }

.modal-icon { font-size: 2.5rem; text-align: center; margin-bottom: 0.75rem; }
.modal-box h2 { font-size: 1.3rem; text-align: center; margin-bottom: 0.4rem; }
.modal-box p { text-align: center; color: var(--text-2); font-size: 0.88rem; margin-bottom: 1.5rem; }

.form-group { margin-bottom: 1rem; }
.form-group input {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 0.9rem; font-family: inherit; color: var(--text);
  transition: border-color var(--transition);
}
.form-group input:focus { outline: none; border-color: var(--primary); }

.form-submit {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white; font-weight: 700; font-size: 0.95rem;
  border: none; border-radius: 10px;
  transition: all var(--transition);
}
.form-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,.4); }

#sub-success {
  display: none; text-align: center; padding: 2rem;
  color: #16a34a; font-size: 1.1rem; font-weight: 600;
}

/* ============================================================
   DETAIL PAGE
   ============================================================ */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-2); font-size: 0.88rem; font-weight: 600;
  padding: 6px 12px; border-radius: 8px;
  transition: all var(--transition); margin-bottom: 1.5rem;
}
.back-btn:hover { background: rgba(255,255,255,.15); color: white; }

.detail-hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4f46e5 100%);
  padding: 2rem 1.5rem 1.5rem; color: white;
}
.detail-hero-inner { display: flex; align-items: flex-start; gap: 1.25rem; margin-bottom: 1.5rem; }
.detail-logo {
  width: 60px; height: 60px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.2rem;
}
.detail-title-wrap h1 { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 800; }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.exchange-tag {
  background: rgba(255,255,255,.15); color: white;
  font-size: 0.72rem; font-weight: 600; padding: 3px 9px; border-radius: 100px;
}

.kpi-row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem; margin-bottom: 1.25rem;
}
.kpi-card {
  background: rgba(255,255,255,.1); border-radius: 12px;
  padding: 0.9rem 1rem; border: 1px solid rgba(255,255,255,.12);
}
.kpi-label { font-size: 0.7rem; opacity: 0.7; text-transform: uppercase; letter-spacing: .04em; display: block; margin-bottom: 4px; }
.kpi-value { font-size: 1rem; font-weight: 700; display: block; }
.gmp-pos { color: #4ade80; }
.return-high { color: #4ade80 !important; }
.return-mid { color: #fbbf24 !important; }

.apply-bar { display: flex; gap: 1rem; flex-wrap: wrap; }
.apply-btn {
  padding: 11px 24px; border-radius: 10px; border: none;
  background: white; color: var(--primary);
  font-weight: 700; font-size: 0.9rem;
  transition: all var(--transition);
}
.apply-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.subscribe-btn-outline {
  padding: 11px 20px; border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,.4); background: transparent;
  color: white; font-weight: 600; font-size: 0.88rem;
  transition: all var(--transition);
}
.subscribe-btn-outline:hover { background: rgba(255,255,255,.12); }

.detail-body { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }

.detail-section {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.25rem;
}
.detail-section h2 {
  font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem;
  padding-bottom: 0.6rem; border-bottom: 1.5px solid var(--border);
}

.about-text { color: var(--text-2); line-height: 1.75; margin-bottom: 1.25rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.two-col h4 { font-size: 0.88rem; font-weight: 700; margin-bottom: 0.6rem; color: var(--text); }
.icon-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.icon-list li { font-size: 0.87rem; color: var(--text-2); line-height: 1.5; }

.charts-row { display: grid; grid-template-columns: 1fr 1.5fr; gap: 1.25rem; margin-bottom: 1.25rem; }
.chart-box { margin-bottom: 0 !important; }

.sub-total-badge {
  display: inline-block; background: var(--primary-light); color: var(--primary);
  font-size: 0.85rem; font-weight: 700; padding: 5px 12px;
  border-radius: 100px; margin-bottom: 1rem;
}
.sub-legend { display: flex; gap: 1rem; margin-top: 1rem; font-size: 0.82rem; color: var(--text-2); flex-wrap: wrap; }
.leg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }

/* ── Company Quick Facts ── */
.quick-facts-row {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  margin: 12px 0 4px; padding: 10px 14px;
  background: rgba(255,255,255,.08); border-radius: 10px;
  font-size: 0.82rem; color: rgba(255,255,255,.85);
}
.qf-item strong { color: white; }

/* ── Two-column section layout ── */
.two-col-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 0; }
@media (max-width: 768px) { .two-col-sections { grid-template-columns: 1fr; } }

/* ── Issue Details ── */
.issue-details-grid { display: flex; flex-direction: column; gap: 0; }
.id-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.87rem; }
.id-row:last-child { border-bottom: none; }
.id-label { color: var(--text-2); font-weight: 500; }
.id-val { font-weight: 700; color: var(--text); }

/* ── Objects of Issue ── */
.objects-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.objects-list li { font-size: 0.87rem; color: var(--text-2); padding: 8px 10px; background: var(--surface2); border-radius: 8px; border-left: 3px solid var(--primary); }

/* ── Day-wise Subscription Table ── */
.day-sub-wrap { overflow-x: auto; }
.day-sub-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.day-sub-table th { background: var(--surface2); color: var(--text-2); font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: .04em; padding: 8px 12px; text-align: center; }
.day-sub-table td { padding: 9px 12px; text-align: center; border-bottom: 1px solid var(--border); color: var(--text); }
.day-sub-table tr:last-child td { border-bottom: none; font-weight: 700; }
.day-total { font-weight: 800; color: var(--primary); }
.upcoming-note { font-size: 0.85rem; color: var(--text-3); font-style: italic; padding: 12px 0; }

/* ── Share Reservation ── */
.sr-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.sr-row { display: flex; align-items: center; gap: 10px; }
.sr-label { font-size: 0.78rem; font-weight: 700; color: var(--text-2); width: 30px; }
.sr-track { flex: 1; height: 10px; background: var(--surface2); border-radius: 5px; overflow: hidden; }
.sr-fill { height: 100%; border-radius: 5px; }
.sr-pct { font-size: 0.82rem; font-weight: 700; width: 36px; text-align: right; }
.sr-note { font-size: 0.75rem; color: var(--text-3); margin-top: 6px; }

/* ── Anchor Investors ── */
.anchor-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.anchor-chip { display: inline-block; font-size: 0.8rem; font-weight: 600; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; border-radius: 8px; padding: 5px 12px; }

/* ── Promoter Holding ── */
.promoter-row { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.promoter-stat { text-align: center; }
.promoter-val { display: block; font-size: 1.6rem; font-weight: 800; color: var(--text); }
.promoter-val.post { color: #d97706; }
.promoter-lbl { font-size: 0.72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.promoter-arrow { font-size: 1.1rem; color: var(--text-3); }
.promoter-drop { font-size: 0.82rem; font-weight: 700; color: #ef4444; }
.promoter-bars { display: flex; flex-direction: column; gap: 8px; }
.pb-wrap { display: flex; align-items: center; gap: 8px; }
.pb-fill { height: 12px; border-radius: 6px; transition: width 0.6s ease; }
.pb-fill.pre { background: #6366f1; }
.pb-fill.post { background: #d97706; }
.pb-wrap span { font-size: 0.78rem; font-weight: 600; color: var(--text-2); white-space: nowrap; }

/* Timeline */
.timeline-wrap { display: flex; align-items: flex-start; gap: 0; flex-wrap: wrap; }
.timeline-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  flex: 1; min-width: 120px; text-align: center; position: relative;
}
.timeline-dot {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface2); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; z-index: 1;
}
.timeline-item.past .timeline-dot { background: #dcfce7; border-color: #22c55e; color: #16a34a; font-size: 1rem; }
.timeline-item.current .timeline-dot { background: var(--primary-light); border-color: var(--primary); }
.timeline-content { display: flex; flex-direction: column; gap: 2px; }
.tl-label { font-size: 0.78rem; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.tl-date { font-size: 0.9rem; font-weight: 700; }

.timeline-connector { flex: 0.5; height: 2px; background: var(--border); margin-top: 21px; }

/* Financials */
.fin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; }
.fin-card {
  background: var(--surface2); border-radius: 10px;
  padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 4px;
}
.fin-label { font-size: 0.7rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.fin-val { font-size: 1rem; font-weight: 700; }
.fin-val.pos { color: #16a34a; }
.fin-val.neg { color: var(--danger); }
.fin-val.small { font-size: 0.82rem; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: #0f172a; color: #94a3b8;
  padding: 2rem 1.5rem; text-align: center;
  font-size: 0.82rem; line-height: 1.8;
}
footer a { color: #6366f1; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { padding: 2.5rem 1rem 2rem; }
  .hero-stats { gap: 0.75rem; }
  .hero-stat { padding: 0.75rem 1.2rem; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .toolbar-right { flex-wrap: wrap; }
  .search-wrap input { width: 100%; }
  #ipoGrid { grid-template-columns: 1fr; }
  .charts-row { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .timeline-wrap { flex-direction: column; align-items: flex-start; }
  .timeline-item { flex-direction: row; text-align: left; }
  .timeline-connector { width: 2px; height: 20px; flex: 0; margin-top: 0; margin-left: 20px; }
  .apply-bar { flex-direction: column; }
  .apply-btn, .subscribe-btn-outline { text-align: center; }
}

@media (max-width: 480px) {
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .fin-grid { grid-template-columns: 1fr 1fr; }
  .tabs { flex-wrap: wrap; }
  .three-gauges { flex-direction: column; }
  .gauge-card-center { order: -1; }
  .gauge-card-side { border-right: none; border-left: none; border-bottom: 1.5px solid var(--border); }
  .card-main-row { flex-direction: column; }
  .card-gauge-wrap { max-width: 100%; }
}

/* ============================================================
   GAUGE — investing.com style semicircle meters
   ============================================================ */

/* Card mini gauge */
.card-main-row {
  display: flex; gap: 12px; align-items: flex-start;
}
.card-gauge-wrap {
  width: 148px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: #fafbff; border: 1px solid var(--border); border-radius: 12px;
  padding: 8px 6px 10px;
}
.gauge-label-top {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-3);
}
.gauge-chip {
  font-size: 0.75rem; font-weight: 800; padding: 3px 10px;
  border-radius: 100px; margin-top: 2px;
}
.sub-upcoming-note {
  font-size: 0.8rem; color: var(--text-2); padding: 6px 0;
  font-style: italic;
}

/* Detail page 3-gauge block */
.three-gauges {
  display: flex; gap: 0; align-items: stretch;
  border: 1.5px solid var(--border); border-radius: 14px; overflow: hidden;
  margin-bottom: 0.5rem; background: var(--surface);
}

/* Side gauge cards — smaller, subdued */
.gauge-card-side {
  flex: 0.85; padding: 1rem 0.75rem; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border-right: 1.5px solid var(--border);
  background: var(--surface2);
}
.gauge-card-side:last-child { border-right: none; border-left: 1.5px solid var(--border); }

/* Center gauge card — larger, prominent */
.gauge-card-center {
  flex: 1.4; padding: 1.5rem 1.25rem; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: linear-gradient(160deg, #f0f4ff 0%, #fafbff 100%);
  border-left: 1.5px solid #c7d2fe;
  border-right: 1.5px solid #c7d2fe;
  position: relative;
}

/* Crown label for center */
.gauge-center-crown {
  font-size: 0.78rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em; color: var(--primary);
  background: var(--primary-light); border-radius: 100px;
  padding: 3px 12px;
}

.gauge-title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-3);
}
.gauge-svg-wrap { width: 100%; }
.gauge-card-side .gauge-svg-wrap { max-width: 180px; }
.gauge-card-center .gauge-svg-wrap { max-width: 290px; }

.gauge-result {
  font-size: 0.82rem; font-weight: 800; padding: 4px 14px;
  border-radius: 100px; white-space: nowrap;
}
.gauge-result.large {
  font-size: 1.15rem; padding: 8px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
}
.gauge-sub {
  font-size: 0.72rem; color: var(--text-3);
  max-width: 150px; line-height: 1.4; text-align: center;
}
.gauge-card-center .gauge-sub { max-width: 200px; font-size: 0.78rem; }
.gauge-disclaimer {
  font-size: 0.72rem; color: var(--text-3); margin-top: 0.6rem;
  font-style: italic; border-top: 1px solid var(--border); padding-top: 0.5rem;
}
.signal-header { margin-bottom: 1.25rem; }
.signal-subtitle {
  font-size: 0.82rem; color: var(--text-2); margin: 0;
  padding: 6px 12px; background: #fefce8; border: 1px solid #fde047;
  border-radius: 8px; display: inline-block; margin-top: 4px;
}

/* ── Financials History Table ── */
.fn-subtitle { font-size: 0.78rem; font-weight: 500; color: var(--text-3); }
.fn-table-wrap { overflow-x: auto; margin-top: 0.75rem; }
.fn-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.82rem;
}
.fn-table thead tr { background: #f1f5f9; }
.fn-table th {
  padding: 8px 14px; text-align: right;
  font-weight: 700; color: var(--text-2); border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.fn-table th:first-child { text-align: left; }
.fn-table td {
  padding: 8px 14px; text-align: right;
  border-bottom: 1px solid var(--border); color: var(--text);
  white-space: nowrap;
}
.fn-table td.fn-label { text-align: left; color: var(--primary); font-weight: 500; }
.fn-table td.fn-neg { color: #dc2626; }
.fn-table tbody tr:hover { background: #f8fafc; }
.fn-note { font-size: 0.72rem; color: var(--text-3); text-align: right; margin-top: 4px; }

/* ── KPI two-column layout ── */
.kpi-two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
@media (max-width: 640px) { .kpi-two-col { grid-template-columns: 1fr; } }

/* ── Registrar Box ── */
.registrar-box {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1.1rem 1.4rem;
  display: inline-flex; flex-direction: column; gap: 0.55rem;
  min-width: 280px;
}
.registrar-name {
  font-size: 1rem; font-weight: 700; color: var(--primary);
  margin-bottom: 0.2rem;
}
.registrar-row {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.84rem; color: var(--text-2);
}
.reg-icon { font-size: 1rem; flex-shrink: 0; }
.registrar-row a { color: var(--primary); text-decoration: none; }
.registrar-row a:hover { text-decoration: underline; }

/* ── FAQ Accordion ── */
.faq-list { display: flex; flex-direction: column; gap: 0; margin-top: 0.5rem; }
.faq-item {
  border: 1px solid var(--border); border-radius: 0;
  overflow: hidden;
}
.faq-item:first-child { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.faq-item:last-child  { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.faq-item + .faq-item { border-top: none; }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 14px 18px;
  background: var(--surface); border: none; cursor: pointer;
  font-size: 0.88rem; font-weight: 600; color: var(--text); text-align: left;
  transition: background var(--transition);
}
.faq-q:hover { background: var(--surface2); }
.faq-item.open .faq-q { background: #16a34a; color: #fff; }
.faq-arrow { font-size: 0.85rem; flex-shrink: 0; }
.faq-a {
  padding: 14px 18px; font-size: 0.84rem; color: var(--text-2);
  line-height: 1.65; background: var(--surface); border-top: 1px solid var(--border);
}
.faq-a strong { color: var(--text); }

/* ── Company Gallery ── */
.company-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
}
@media (max-width: 640px) {
  .company-gallery { grid-template-columns: 1fr; }
}
.gallery-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface2);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), transform var(--transition);
}
.gallery-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

/* Gallery visual card (no external images — pure CSS) */
.gallery-visual {
  height: 160px; position: relative;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px; overflow: hidden;
}
.gv-icon { font-size: 2.8rem; line-height: 1; z-index: 1; }
.gv-label {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: #1e293b; opacity: 0.55; z-index: 1;
}
/* Decorative rings overlay */
.gv-ring {
  position: absolute; border-radius: 50%; border: 2px solid;
  width: 110px; height: 110px; top: -20px; right: -20px;
}
.gv-ring2 { width: 75px; height: 75px; top: 10px; right: 10px; }
/* Dots pattern */
.gv-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,.08) 1px, transparent 1px);
  background-size: 16px 16px;
}
/* Lines pattern */
.gv-lines {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    45deg, rgba(255,255,255,.08) 0px, rgba(255,255,255,.08) 1px,
    transparent 1px, transparent 12px
  );
}

.gallery-caption {
  font-size: 0.72rem; color: var(--text-3);
  padding: 6px 10px; line-height: 1.3;
}

/* ── Issue Details date divider ── */
.id-row-divider {
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

/* ── Founders & Leadership ── */
.founders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}
.founder-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  transition: box-shadow var(--transition);
}
.founder-card:hover { box-shadow: var(--shadow-hover); }
.founder-avatar-wrap { flex-shrink: 0; }
.founder-avatar {
  width: 68px; height: 68px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.founder-initials {
  font-size: 1.25rem; font-weight: 800;
  letter-spacing: 0.02em; z-index: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.founder-info { flex: 1; min-width: 0; }
.founder-name {
  font-size: 0.95rem; font-weight: 700; color: var(--text);
  margin-bottom: 2px;
}
.founder-role {
  font-size: 0.78rem; font-weight: 600; color: var(--primary);
  margin-bottom: 4px;
}
.founder-edu {
  font-size: 0.75rem; color: var(--text-2);
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 4px; padding: 2px 7px;
  display: inline-block; margin-bottom: 6px;
}
.founder-note {
  font-size: 0.74rem; color: var(--text-3);
  line-height: 1.4;
}

/* ============================================================
   GEN Z PROMO — Hero section
   ============================================================ */
.genz-promo {
  margin-top: 1.8rem;
  display: inline-flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,0.10);
  border: 1.5px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(14px);
  border-radius: 50px;
  padding: 10px 10px 10px 20px;
  color: #fff;
  max-width: 600px;
  animation: genz-glow 3s ease-in-out infinite;
}
@keyframes genz-glow {
  0%,100% { box-shadow: 0 0 0 0 rgba(251,191,36,0); }
  50%      { box-shadow: 0 0 20px 4px rgba(251,191,36,.18); }
}
.genz-fire {
  font-size: 1.4rem; flex-shrink: 0;
  animation: genz-bounce .9s ease-in-out infinite alternate;
}
@keyframes genz-bounce {
  from { transform: translateY(0) rotate(-5deg); }
  to   { transform: translateY(-5px) rotate(5deg); }
}
.genz-text { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.genz-headline { font-size: .92rem; font-weight: 600; line-height: 1.3; }
.genz-headline strong { color: #fbbf24; font-size: 1.1rem; }
.genz-sub { font-size: .72rem; opacity: .85; line-height: 1.5; }
.genz-btn {
  flex-shrink: 0;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #1a1a1a; font-weight: 800; font-size: .85rem;
  padding: 10px 20px; border-radius: 40px;
  text-decoration: none; white-space: nowrap;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 14px rgba(251,191,36,.45);
}
.genz-btn:hover { transform: scale(1.06); box-shadow: 0 6px 20px rgba(251,191,36,.55); }

@media (max-width: 580px) {
  .genz-promo { border-radius: 18px; flex-wrap: wrap; padding: 14px 16px; text-align: left; }
  .genz-btn { width: 100%; text-align: center; }
}

/* ============================================================
   ZERODHA REFERRAL BANNER
   ============================================================ */
.referral-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 2rem 1.5rem;
}
.referral-inner {
  max-width: 960px; margin: 0 auto;
  display: flex; align-items: center; gap: 1.5rem;
  flex-wrap: wrap;
}
.referral-logo-box {
  width: 56px; height: 56px; border-radius: 14px;
  background: #387ed1;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; font-weight: 900; color: #fff;
  flex-shrink: 0; letter-spacing: -1px;
  box-shadow: 0 4px 16px rgba(56,126,209,.4);
}
.referral-copy { flex: 1; min-width: 180px; }
.referral-copy h3 {
  color: #f1f5f9; font-size: 1.05rem; font-weight: 700;
  margin-bottom: .3rem;
}
.referral-copy p {
  color: #94a3b8; font-size: .875rem;
}
.referral-copy .referral-tag {
  display: inline-block; margin-top: .4rem;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: #4ade80;
  background: rgba(74,222,128,.1); border: 1px solid rgba(74,222,128,.25);
  border-radius: 4px; padding: 2px 8px;
}
.referral-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 12px;
  background: #387ed1; color: #fff;
  font-weight: 700; font-size: .95rem;
  text-decoration: none; white-space: nowrap;
  box-shadow: 0 4px 16px rgba(56,126,209,.35);
  transition: all .2s;
}
.referral-cta:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(56,126,209,.45);
}
.referral-cta svg { flex-shrink: 0; }

@media (max-width: 600px) {
  .referral-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .referral-cta { width: 100%; justify-content: center; }
}
