/* ============================================================
   IPO Screener & Stock Screener — showcase pages
   (shared styles, matches barkat-ci3 dark + gold theme)
   ============================================================ */

.ts-page [hidden] { display: none !important; }

/* ── Page background (mirrors .page-shariah_screener) ─────── */
.page-ipo_screener,
.page-stock_screener,
.page-portfolio_screener {
  background:
    radial-gradient(circle at 78% 10%, rgba(196, 167, 71, 0.08), transparent 34%),
    linear-gradient(180deg, #070b15 0%, #05070f 100%);
}

.page-ipo_screener .investor-hero,
.page-stock_screener .investor-hero,
.page-portfolio_screener .investor-hero {
  position: relative;
  overflow: hidden;
  padding: 3.1rem 4.2% 2.4rem;
  background: linear-gradient(180deg, #0b1020 0%, #080c18 100%);
  border-top: 1px solid rgba(196, 167, 71, 0.2);
  border-bottom: 1px solid rgba(196, 167, 71, 0.12);
}

.page-ipo_screener .investor-hero::before,
.page-stock_screener .investor-hero::before,
.page-portfolio_screener .investor-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 34%),
    linear-gradient(180deg, rgba(196, 167, 71, 0.04), transparent 45%);
  pointer-events: none;
}

.page-ipo_screener .investor-hero .hero-shell,
.page-stock_screener .investor-hero .hero-shell,
.page-portfolio_screener .investor-hero .hero-shell {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  padding: 1.4rem 0.9rem 1rem;
}

.page-ipo_screener .investor-hero h1,
.page-stock_screener .investor-hero h1,
.page-portfolio_screener .investor-hero h1 {
  font-size: clamp(30px, 4.6vw, 44px);
  font-weight: 700;
  margin: 0.6rem 0 0.9rem;
  background: linear-gradient(135deg, #fff 25%, #c4a747 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.06;
}

.page-ipo_screener .investor-hero .hero-sub,
.page-stock_screener .investor-hero .hero-sub,
.page-portfolio_screener .investor-hero .hero-sub {
  font-size: 0.92rem;
  color: var(--barkat-text-muted, #d7def0);
  max-width: 660px;
  margin: 0 auto;
  line-height: 1.62;
}

/* eyebrow + pill shared with shariah screener look */
.ts-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: rgba(196, 167, 71, 0.12);
  border: 1px solid rgba(196, 167, 71, 0.28);
  color: var(--barkat-primary-soft, #ead98c);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ts-free-pill {
  display: inline-block;
  margin-top: 0.85rem;
  padding: 0.32rem 0.9rem;
  border: 1px solid rgba(196, 167, 71, 0.45);
  border-radius: 999px;
  background: rgba(196, 167, 71, 0.1);
  color: var(--barkat-primary-strong, #f5e7a8);
  font-size: 0.8rem;
  font-weight: 600;
}

.ts-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.35rem;
}

.ts-page .title-amp {
  background: linear-gradient(135deg, #f5e7a8 0%, #c4a747 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Primary CTA button (self-contained — the theme's .investor-product-btn
   is scoped to .page-investors, so it is recreated here for these pages) */
.ts-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  white-space: nowrap;
  min-height: 50px;
  padding: 0 1.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #d4b356 0%, #b8943a 100%);
  border: 1px solid rgba(255, 235, 170, 0.35);
  box-shadow: 0 10px 24px rgba(196, 167, 71, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: #0a0e1a;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  line-height: 1.2;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.ts-btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 14px 30px rgba(196, 167, 71, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: #0a0e1a;
}

.ts-hero-actions .ts-hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  min-height: 50px;
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  border: 1px solid rgba(196, 167, 71, 0.4);
  background: rgba(255, 255, 255, 0.04);
  color: #f1d98f;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ts-hero-actions .ts-hero-secondary:hover {
  background: rgba(196, 167, 71, 0.12);
  border-color: rgba(196, 167, 71, 0.7);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ── Live usage panel (community counters) ────────────────── */
.ts-usage {
  margin-top: 1.4rem;
  padding: 1.15rem 1.4rem 1.3rem;
  position: relative;
}

.ts-usage::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.4rem;
  right: 1.4rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 167, 71, 0.65), transparent);
}

.ts-usage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.95rem;
}

.ts-usage-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ts-usage-title > i {
  flex: 0 0 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(196, 167, 71, 0.22), rgba(196, 167, 71, 0.08));
  border: 1px solid rgba(196, 167, 71, 0.35);
  color: var(--barkat-primary, #c4a747);
  font-size: 0.95rem;
}

.ts-usage-title h2 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.ts-usage-title p {
  margin: 0.12rem 0 0;
  font-size: 0.72rem;
  color: var(--barkat-text-dim, #9ba3b5);
  line-height: 1.45;
}

.ts-usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.7rem;
}

.ts-usage-item {
  padding: 0.75rem 0.95rem;
  border: 1px solid rgba(196, 167, 71, 0.16);
  border-radius: 14px;
  background: rgba(10, 14, 26, 0.55);
}

.ts-usage-label {
  display: block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--barkat-primary-soft, #ead98c);
  margin-bottom: 0.32rem;
}

.ts-usage-value {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.05;
  color: #ffffff;
}

.ts-usage-note {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--barkat-text-dim, #9ba3b5);
}

/* ── Section headings inside the page ─────────────────────── */
.ts-section {
  margin-top: 2.1rem;
}

.ts-section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 1.3rem;
}

.ts-section-head h2 {
  margin: 0 0 0.45rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.16;
}

.ts-section-head p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--barkat-text-muted, #d7def0);
}

/* ── Feature chips (what the screener reviews) ────────────── */
.ts-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem;
  padding: 1.4rem;
}

.ts-feature {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(196, 167, 71, 0.14);
  border-radius: 12px;
  background: rgba(10, 14, 26, 0.5);
  font-size: 0.83rem;
  line-height: 1.35;
  color: var(--barkat-text-muted, #d7def0);
}

.ts-feature i {
  flex: 0 0 auto;
  width: 20px;
  text-align: center;
  color: var(--barkat-primary, #c4a747);
  font-size: 0.8rem;
}

/* ── Sample / preview mock (static "product screenshot") ───── */
.ts-demo {
  margin-top: 1.4rem;
  position: relative;
  padding: 1.5rem;
}

.ts-demo-tag {
  position: absolute;
  top: -0.85rem;
  left: 1.5rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #c4a747, #ead98c);
  color: #0a0e1a;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.ts-demo-window {
  border: 1px solid rgba(196, 167, 71, 0.24);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(18, 24, 46, 0.96), rgba(9, 14, 27, 0.98));
  overflow: hidden;
}

.ts-demo-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(196, 167, 71, 0.16);
  background: rgba(10, 14, 26, 0.6);
}

.ts-demo-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(196, 167, 71, 0.35);
}

.ts-demo-bar span {
  margin-left: auto;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--barkat-text-dim, #9ba3b5);
}

.ts-demo-input {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px dashed rgba(196, 167, 71, 0.18);
}

.ts-demo-input i {
  color: var(--barkat-text-dim, #9ba3b5);
  font-size: 0.85rem;
}

.ts-demo-input strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.03em;
}

.ts-demo-input em {
  font-style: normal;
  margin-left: auto;
  padding: 0.28rem 0.9rem;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(196, 167, 71, 0.85), rgba(212, 179, 86, 0.95));
  color: #0a0e1a;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.ts-demo-body {
  padding: 1.2rem 1.1rem 1.35rem;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.1rem;
}

.ts-demo-verdict {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem;
  border: 1px solid rgba(76, 217, 100, 0.35);
  border-radius: 14px;
  background: rgba(76, 217, 100, 0.07);
}

.ts-demo-badge {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ts-demo-badge--green { color: #12331f; background: var(--barkat-success, #4cd964); }
.ts-demo-badge--gold { color: #0a0e1a; background: linear-gradient(135deg, #c4a747, #ead98c); }
.ts-demo-badge--red { color: #331212; background: var(--barkat-danger, #ff6b6b); }

.ts-demo-verdict h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
}

.ts-demo-verdict p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--barkat-text-muted, #d7def0);
}

.ts-demo-kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6rem;
  width: 100%;
}

.ts-demo-kv div {
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(196, 167, 71, 0.14);
  border-radius: 10px;
  background: rgba(10, 14, 26, 0.55);
}

.ts-demo-kv dt {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--barkat-text-dim, #9ba3b5);
}

.ts-demo-kv dd {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--barkat-primary-strong, #f5e7a8);
}

.ts-demo-report {
  min-width: 0;
}

.ts-demo-report h4 {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--barkat-primary-soft, #ead98c);
}

.ts-demo-report .ts-demo-line {
  display: block;
  height: 9px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
}

.ts-demo-report .ts-demo-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(196, 167, 71, 0.5), rgba(196, 167, 71, 0.12));
  border-radius: 999px;
}

.ts-demo-report .ts-demo-line--short { width: 62%; }
.ts-demo-report .ts-demo-line--mid { width: 86%; }
.ts-demo-report .ts-demo-line--gold::after { background: linear-gradient(90deg, rgba(240, 217, 138, 0.9), rgba(240, 217, 138, 0.25)); }

.ts-demo-note {
  margin: 1rem 0 0;
  font-size: 0.74rem;
  line-height: 1.5;
  text-align: center;
  color: var(--barkat-text-dim, #9ba3b5);
}

.ts-demo-note a {
  color: var(--barkat-primary-soft, #ead98c);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── How it works steps ───────────────────────────────────── */
.ts-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.ts-step {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.1rem 1.2rem;
  background: linear-gradient(135deg, rgba(18, 24, 46, 0.8), rgba(14, 19, 37, 0.8));
  border: 1px solid rgba(196, 167, 71, 0.14);
  border-radius: 18px;
}

.ts-step-num {
  flex: 0 0 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(196, 167, 71, 0.14);
  border: 1px solid rgba(196, 167, 71, 0.4);
  color: var(--barkat-primary-strong, #f5e7a8);
  font-weight: 800;
  font-size: 0.9rem;
}

.ts-step h3 {
  margin: 0 0 0.25rem;
  font-size: 0.98rem;
  color: #ffffff;
}

.ts-step p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--barkat-text-muted, #d7def0);
}

/* ── Conversion CTA band ──────────────────────────────────── */
.ts-cta {
  margin-top: 2.1rem;
  padding: 1.8rem 1.6rem;
  text-align: center;
  position: relative;
}

.ts-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.6rem;
  right: 1.6rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 167, 71, 0.65), transparent);
}

.ts-cta h3 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}

.ts-cta p {
  margin: 0 auto 1.1rem;
  max-width: 640px;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--barkat-text-muted, #d7def0);
}

.ts-cta .ts-btn-primary { min-height: 50px; }

/* ── Methodology / disclosure spacing ─────────────────────── */
.ts-methodology { margin-top: 2.1rem; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .ts-demo-body { grid-template-columns: 1fr; }
  .ts-steps { grid-template-columns: 1fr; }
  .page-ipo_screener .investor-hero,
  .page-stock_screener .investor-hero,
  .page-portfolio_screener .investor-hero { padding: 2.6rem 4.2% 2rem; }
}

@media (max-width: 575.98px) {
  .page-ipo_screener .investor-hero h1,
  .page-stock_screener .investor-hero h1,
  .page-portfolio_screener .investor-hero h1 { font-size: clamp(26px, 7.5vw, 34px); }
  .ts-usage { padding: 1rem 1rem 1.15rem; }
  .ts-usage::before { left: 1rem; right: 1rem; }
  .ts-demo { padding: 1.2rem 1rem; }
  .ts-demo-input { flex-wrap: wrap; }
  .ts-demo-input em { margin-left: 0; }
  .ts-demo-tag { left: 1rem; }
  .ts-hero-actions .ts-btn-primary,
  .ts-hero-actions .ts-hero-secondary,
  .ts-cta .ts-btn-primary { width: 100%; }
}
