/* ==========================================================================
   FX Breaking News — Main Stylesheet
   Sections:
   1. Reset & Variables
   2. Layout (page-shell, sidebar, app)
   3. Header & Navigation
   4. Category Pills & Market Selects
   5. Feed & News Cards
   6. Calendar Cards
   7. Newsletter Section
   8. Trading Section (Brokers & Funding Firms)  ← NEW
   9. Ad Cards
   10. Utilities & Animations
   ========================================================================== */


/* ── 1. Reset & Variables ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #0c0d0f;
  --surface:      #141518;
  --surface2:     #1c1e22;
  --border:       rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.14);
  --text:         #f0f0ee;
  --muted:        #6e7075;
  --accent:       #c8f135;
  --accent-dim:   rgba(200,241,53,0.12);
  --red:          #ff5a5a;
  --red-dim:      rgba(255,90,90,0.12);
  --green:        #4dcd8f;
  --green-dim:    rgba(77,205,143,0.12);
  --purple:       #a78bfa;
  --purple-dim:   rgba(167,139,250,0.12);
  --orange:       #ffaa32;
  --orange-dim:   rgba(255,170,50,0.12);
  --blue:         #60a5fa;
  --blue-dim:     rgba(96,165,250,0.12);
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}


/* ── 2. Layout ─────────────────────────────────────────────────────────── */
.page-shell {
  display: flex;
  min-height: 100vh;
  justify-content: center;
  gap: 24px;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.sidebar-ads {
  display: none;
  width: 220px;
  flex-shrink: 0;
  gap: 12px;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 16px 0;
}

@media (min-width: 1024px) {
  .sidebar-ads { display: flex; }
}

.sidebar-ad {
  background: var(--surface);
  border: 1px solid rgba(200,241,53,0.18);
  border-radius: 14px;
  padding: 18px 16px;
  position: relative;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-ad::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(200,241,53,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.sidebar-ad-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  font-family: 'Syne', sans-serif;
}

.sidebar-ad-logo {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 15px; font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}

.sidebar-ad-title {
  font-family: 'Syne', sans-serif;
  font-size: 13px; font-weight: 700;
  color: var(--text); line-height: 1.45; margin-bottom: 8px;
}

.sidebar-ad-sub {
  font-size: 11px; color: var(--muted);
  line-height: 1.6; font-weight: 300; flex: 1;
}

.sidebar-ad-bottom { margin-top: 16px; }

.sidebar-ad-cta {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  font-family: 'Syne', sans-serif;
  color: var(--bg); background: var(--accent);
  padding: 8px 16px; border-radius: 20px;
  letter-spacing: 0.03em; cursor: pointer;
  border: none; text-decoration: none;
  transition: opacity 0.15s;
}
.sidebar-ad-cta:hover { opacity: 0.85; }

.app {
  max-width: 720px; width: 100%;
  min-height: 100vh;
  display: flex; flex-direction: column; flex: 1;
}

@media (max-width: 480px) {
  .app { max-width: 100%; width: 100%; }
  .page-shell { padding: 0; }
}


/* ── 3. Header ─────────────────────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(12,13,15,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 14px 16px 0;
}

.header-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}

.brand {
  font-family: 'Syne', sans-serif;
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.02em; color: var(--text);
}
.brand span { color: var(--accent); }

.live-dot {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--muted);
  font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
}
.live-dot::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%; background: var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}


/* ── 4. Category Pills & Market Selects ────────────────────────────────── */
.markets-row { margin-bottom: 10px; }

.markets-label {
  font-size: 10px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  font-family: 'Syne', sans-serif; margin-bottom: 5px;
}

.select-wrap { position: relative; }

.market-select, .pair-select {
  width: 100%; height: 44px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
  font-family: 'Syne', sans-serif;
  font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
  padding: 0 40px 0 14px; appearance: none;
  cursor: pointer; transition: border-color 0.2s; outline: none;
}
.market-select:focus, .pair-select:focus { border-color: var(--accent); }

.select-arrow {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  pointer-events: none; color: var(--muted);
}

.pair-section {
  margin-bottom: 10px; display: none;
  animation: fadeUp 0.2s ease both;
}
.pair-section.visible { display: block; }

.pair-label {
  font-size: 10px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  font-family: 'Syne', sans-serif; margin-bottom: 5px;
}

.category-row {
  display: flex; align-items: center; gap: 8px; padding-bottom: 14px;
}

.category-scroll {
  display: flex; gap: 7px;
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; flex: 1;
}
.category-scroll::-webkit-scrollbar { display: none; }

.refresh-btn {
  flex-shrink: 0; width: 32px; height: 32px;
  border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color 0.18s, color 0.18s, transform 0.3s;
}
.refresh-btn:hover { border-color: var(--border-hover); color: var(--text); }
.refresh-btn.spinning svg { animation: spin 0.6s linear; }

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.cat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap; flex-shrink: 0;
  height: 32px; padding: 0 13px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted);
  font-family: 'Syne', sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: 0.02em; cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.12s;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.cat-pill:active { transform: scale(0.95); }
.cat-pill .pill-icon { font-size: 13px; line-height: 1; }
.cat-pill.active { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.cat-pill:not(.active):hover {
  border-color: var(--border-hover); color: var(--text); background: var(--surface2);
}

/* Calendar date bar */
.cal-date-bar {
  display: none; overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
  padding: 10px 16px 14px; gap: 8px;
  scroll-snap-type: x mandatory;
  border-bottom: 1px solid var(--border);
}
.cal-date-bar::-webkit-scrollbar { display: none; }
.cal-date-bar.visible { display: flex; }

/* Trading sub-tab bar — same styling as cal-date-bar */
.trading-tab-bar {
  display: none; overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
  padding: 10px 16px 14px; gap: 8px;
  scroll-snap-type: x mandatory;
  border-bottom: 1px solid var(--border);
}
.trading-tab-bar::-webkit-scrollbar { display: none; }
.trading-tab-bar.visible { display: flex; }

.date-tab {
  flex-shrink: 0; height: 34px; padding: 0 15px;
  border-radius: 20px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted);
  font-family: 'Syne', sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: 0.02em; cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  white-space: nowrap; scroll-snap-align: center;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.date-tab:hover:not(.active) {
  border-color: var(--border-hover); color: var(--text); background: var(--surface2);
}
.date-tab.active { background: var(--accent); border-color: var(--accent); color: var(--bg); }


/* ── 5. Feed & News Cards ──────────────────────────────────────────────── */
.feed {
  flex: 1; padding: 12px 16px 32px;
  display: flex; flex-direction: column; gap: 10px;
}

.feed-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0 2px;
}

.feed-label {
  font-size: 11px; font-weight: 500; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}

.count-badge {
  font-size: 11px; font-weight: 600; color: var(--accent);
  background: var(--accent-dim); padding: 2px 8px; border-radius: 20px;
}

.news-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px; cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  animation: fadeUp 0.3s ease both; overflow: hidden;
}
.news-card:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.news-card.expanded {
  border-color: rgba(200,241,53,0.3);
  box-shadow: 0 4px 24px rgba(200,241,53,0.06);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-meta {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 9px; flex-wrap: wrap;
}

.source {
  font-size: 11px; font-weight: 600; color: var(--accent);
  background: var(--accent-dim); padding: 3px 9px;
  border-radius: 20px; font-family: 'Syne', sans-serif; letter-spacing: 0.02em;
}

.tag {
  font-size: 11px; color: var(--muted);
  background: var(--surface2); border: 1px solid var(--border);
  padding: 3px 9px; border-radius: 20px;
}

.time { font-size: 11px; color: var(--muted); margin-left: auto; }

.card-title {
  font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 600;
  line-height: 1.45; color: var(--text); margin-bottom: 6px; letter-spacing: -0.01em;
}

.card-snippet-collapsed {
  font-size: 12.5px; color: var(--muted); line-height: 1.5; font-weight: 300;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.card-detail {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.25s ease;
  opacity: 0; margin-top: 0;
}
.card-detail.open { max-height: 500px; opacity: 1; margin-top: 12px; }

.card-detail-inner {
  border-top: 1px solid var(--border); padding-top: 12px;
  display: flex; flex-direction: column; gap: 10px;
}

.detail-section-label {
  font-size: 10px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.1em;
  font-family: 'Syne', sans-serif; margin-bottom: 3px;
}

.detail-body {
  font-size: 12.5px; color: var(--text); line-height: 1.7; font-weight: 300;
}

.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

.detail-tag {
  font-size: 10px; padding: 3px 9px; border-radius: 20px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--muted); font-family: 'Syne', sans-serif; font-weight: 600;
}

.card-expand-icon {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 10px; margin-left: 6px;
  transition: transform 0.25s ease, border-color 0.2s, color 0.2s; flex-shrink: 0;
}
.news-card.expanded .card-expand-icon,
.cal-card.expanded .card-expand-icon {
  transform: rotate(180deg); border-color: var(--accent); color: var(--accent);
}

.card-footer { display: flex; align-items: center; gap: 7px; margin-top: 10px; }

.news-card.expanded .card-snippet-collapsed { display: none; }

.sentiment {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: 20px; font-family: 'Syne', sans-serif; letter-spacing: 0.02em;
}
.bull { background: var(--green-dim); color: var(--green); }
.bear { background: var(--red-dim);   color: var(--red); }
.neu  { background: var(--surface2);  color: var(--muted); border: 1px solid var(--border); }

.pair-chip {
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: 20px; background: var(--purple-dim); color: var(--purple);
  font-family: 'Syne', sans-serif; letter-spacing: 0.02em; margin-left: auto;
}

.detail-read-more {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; color: var(--accent);
  text-decoration: none; font-family: 'Syne', sans-serif;
  letter-spacing: 0.02em; padding: 3px 0;
}
.detail-read-more:hover { opacity: 0.8; }


/* ── 6. Calendar Cards ─────────────────────────────────────────────────── */
.cal-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px; cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  animation: fadeUp 0.3s ease both;
  display: flex; flex-direction: column; gap: 0; overflow: hidden;
}
.cal-card-top { display: flex; gap: 12px; align-items: flex-start; }
.cal-card:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.cal-card.expanded {
  border-color: rgba(200,241,53,0.3);
  box-shadow: 0 4px 24px rgba(200,241,53,0.06);
}

.cal-detail-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 4px;
}

.cal-detail-cell {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 9px; padding: 10px 12px;
}

.cal-detail-cell-label {
  font-size: 9px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.1em;
  font-family: 'Syne', sans-serif; margin-bottom: 4px;
}

.cal-detail-cell-value {
  font-size: 14px; font-weight: 700; color: var(--text); font-family: 'Syne', sans-serif;
}
.cal-detail-cell-value.positive { color: var(--green); }
.cal-detail-cell-value.negative { color: var(--red); }

.actual-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9px; font-weight: 700; font-family: 'Syne', sans-serif;
  letter-spacing: 0.06em; padding: 2px 7px; border-radius: 20px;
  margin-left: 6px; vertical-align: middle;
}
.actual-badge.beat { background: var(--green-dim); color: var(--green); }
.actual-badge.miss { background: var(--red-dim); color: var(--red); }
.actual-badge.inline { background: var(--surface2); color: var(--muted); border: 1px solid var(--border); }

.actual-pending { font-size: 11px; color: var(--muted); font-style: italic; }
.cal-detail-cell.actual-cell { border-color: rgba(200,241,53,0.15); }

.cal-date-block {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--accent-dim); border: 1px solid rgba(200,241,53,0.2); flex-shrink: 0;
}
.cal-day { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; color: var(--accent); line-height: 1; }
.cal-mon { font-size: 9px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.7; }

.cal-info { flex: 1; min-width: 0; }
.cal-title {
  font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 600;
  color: var(--text); line-height: 1.4; margin-bottom: 4px; letter-spacing: -0.01em;
}
.cal-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cal-time-tag { font-size: 11px; color: var(--muted); font-weight: 400; }
.cal-impact {
  font-size: 10px; font-weight: 700; font-family: 'Syne', sans-serif;
  letter-spacing: 0.04em; padding: 2px 8px; border-radius: 20px;
}
.impact-high { background: var(--red-dim); color: var(--red); }
.impact-med  { background: var(--orange-dim); color: var(--orange); }
.impact-low  { background: var(--green-dim); color: var(--green); }
.cal-prev { font-size: 11px; color: var(--muted); margin-top: 5px; font-weight: 300; }
.cal-prev strong { color: var(--text); font-weight: 500; }


/* ── 7. Newsletter Section ─────────────────────────────────────────────── */
.newsletter-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px; animation: fadeUp 0.3s ease both;
  transition: border-color 0.2s, transform 0.15s;
}
.newsletter-card:hover { border-color: var(--border-hover); transform: translateY(-1px); }

.newsletter-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }

.newsletter-icon {
  width: 44px; height: 44px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0; border: 1px solid var(--border); background: var(--surface2);
}

.newsletter-info { flex: 1; min-width: 0; }
.newsletter-title {
  font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 700;
  color: var(--text); letter-spacing: -0.01em; margin-bottom: 2px;
}
.newsletter-market {
  font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-dim);
  padding: 2px 8px; border-radius: 20px; font-family: 'Syne', sans-serif; display: inline-block;
}

.newsletter-desc { font-size: 12.5px; color: var(--muted); line-height: 1.6; font-weight: 300; margin-bottom: 14px; }
.newsletter-freq { font-size: 11px; color: var(--muted); margin-bottom: 14px; display: flex; align-items: center; gap: 5px; }
.newsletter-freq-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); display: inline-block; flex-shrink: 0; }

.newsletter-actions { display: flex; flex-direction: column; gap: 8px; }

.subscribe-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 20px; border-radius: 20px; border: none; background: var(--accent);
  color: var(--bg); font-family: 'Syne', sans-serif; font-size: 12px; font-weight: 700;
  letter-spacing: 0.03em; cursor: pointer;
  transition: opacity 0.15s, transform 0.12s; align-self: flex-start;
}
.subscribe-btn:hover { opacity: 0.85; }
.subscribe-btn:active { transform: scale(0.96); }

.subscribe-form { display: none; flex-direction: column; gap: 8px; animation: fadeUp 0.2s ease both; }
.subscribe-form.visible { display: flex; }

.sub-input-row { display: flex; gap: 8px; }
@media (max-width: 480px) { .sub-input-row { flex-direction: column; } }

.sub-input {
  flex: 1; height: 38px; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 9px; color: var(--text); font-family: 'DM Sans', sans-serif;
  font-size: 13px; padding: 0 12px; outline: none; transition: border-color 0.2s;
}
.sub-input::placeholder { color: var(--muted); }
.sub-input:focus { border-color: var(--accent); }

.sub-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.sub-confirm-btn {
  height: 36px; padding: 0 18px; border-radius: 20px; border: none;
  background: var(--accent); color: var(--bg); font-family: 'Syne', sans-serif;
  font-size: 12px; font-weight: 700; cursor: pointer;
  transition: opacity 0.15s; letter-spacing: 0.03em;
}
.sub-confirm-btn:hover { opacity: 0.85; }

.sub-cancel-btn {
  height: 36px; padding: 0 14px; border-radius: 20px;
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  font-family: 'Syne', sans-serif; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.sub-cancel-btn:hover { border-color: var(--border-hover); color: var(--text); }

.sub-success { display: none; align-items: center; gap: 7px; font-size: 12.5px; color: var(--green); font-weight: 500; padding: 6px 0; }
.sub-success.visible { display: flex; }

.sub-success-icon {
  width: 22px; height: 22px; border-radius: 50%; background: var(--green-dim);
  display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0;
}

.subscribe-all-card {
  background: linear-gradient(135deg, rgba(200,241,53,0.08) 0%, rgba(200,241,53,0.03) 100%);
  border: 1px solid rgba(200,241,53,0.28); border-radius: 16px; padding: 20px 18px 18px;
  animation: fadeUp 0.3s ease both; position: relative; overflow: hidden; margin-bottom: 2px;
}
.subscribe-all-card::before {
  content: ''; position: absolute; top: -30px; right: -30px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(200,241,53,0.07); pointer-events: none;
}

.subscribe-all-title { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; letter-spacing: -0.01em; }
.subscribe-all-sub { font-size: 12px; color: var(--muted); font-weight: 300; line-height: 1.6; margin-bottom: 14px; }
.subscribe-all-markets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

.sub-all-chip {
  font-size: 10px; font-weight: 600; font-family: 'Syne', sans-serif;
  padding: 3px 9px; border-radius: 20px; background: var(--accent-dim);
  color: var(--accent); border: 1px solid rgba(200,241,53,0.2);
}

.subscribe-all-form { display: none; flex-direction: column; gap: 8px; }
.subscribe-all-form.visible { display: flex; }

.subscribe-all-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 22px; border-radius: 20px; border: none;
  background: var(--accent); color: var(--bg);
  font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700;
  letter-spacing: 0.02em; cursor: pointer;
  transition: opacity 0.15s, transform 0.12s; align-self: flex-start;
}
.subscribe-all-btn:hover { opacity: 0.85; }
.subscribe-all-btn:active { transform: scale(0.97); }

.sub-all-success { display: none; align-items: center; gap: 8px; font-size: 13px; color: var(--green); font-weight: 500; padding: 4px 0; }
.sub-all-success.visible { display: flex; }

.sub-all-success-icon {
  width: 24px; height: 24px; border-radius: 50%; background: var(--green-dim);
  display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0;
}


/* ── 8. Trading Section — Brokers & Funding Firms ──────────────────────── */

/* --- Search & Filter bar --- */
.trading-search-bar {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 4px; animation: fadeUp 0.25s ease both;
}

.trading-search-input-wrap {
  position: relative; display: flex; align-items: center;
}

.trading-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 14px; pointer-events: none;
}

.trading-search-input {
  width: 100%; height: 40px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
  font-family: 'DM Sans', sans-serif;
  /* 16px prevents iOS/Android auto-zoom when input is focused */
  font-size: 16px;
  padding: 0 12px 0 36px; outline: none;
  transition: border-color 0.2s;
  /* Suppress double-tap zoom on mobile */
  touch-action: manipulation;
}
.trading-search-input::placeholder { color: var(--muted); font-size: 14px; }
.trading-search-input:focus { border-color: var(--accent); }

/* Also guard all other inputs site-wide from triggering zoom */
.market-select, .pair-select,
.sub-input {
  font-size: 16px !important;
  touch-action: manipulation;
}
/* Restore visual size after overriding for selects */
@media (min-width: 481px) {
  .market-select, .pair-select { font-size: 14px !important; }
  .sub-input { font-size: 13px !important; }
  .trading-search-input { font-size: 13px !important; }
}

.trading-filter-row {
  display: flex; flex-wrap: wrap; gap: 6px;
}

/* Filter pill — reuses cat-pill style with slight modification */
.filter-pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 28px; padding: 0 11px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--muted);
  font-family: 'Syne', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: 0.02em; cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.12s;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.filter-pill:active { transform: scale(0.95); }
.filter-pill.active { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.filter-pill:not(.active):hover {
  border-color: var(--border-hover); color: var(--text); background: var(--surface2);
}

/* --- Intro banner for Trading section --- */
.trading-intro-banner {
  background: linear-gradient(135deg, rgba(200,241,53,0.08) 0%, rgba(200,241,53,0.03) 100%);
  border: 1px solid rgba(200,241,53,0.22);
  border-radius: 16px; padding: 18px 18px 16px;
  animation: fadeUp 0.3s ease both; position: relative; overflow: hidden;
  margin-bottom: 2px;
}
.trading-intro-banner::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(200,241,53,0.06); pointer-events: none;
}
.trading-intro-title {
  font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700;
  color: var(--text); margin-bottom: 5px; letter-spacing: -0.01em;
}
.trading-intro-sub {
  font-size: 12px; color: var(--muted); font-weight: 300; line-height: 1.65;
}

/* --- Cards Grid --- */
.trading-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  animation: fadeUp 0.3s ease both;
}

@media (max-width: 540px) {
  .trading-grid { grid-template-columns: 1fr; }
}

/* --- Individual Broker / Funding Card --- */
.trading-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color 0.22s, transform 0.18s, box-shadow 0.22s;
  animation: fadeUp 0.3s ease both; position: relative; overflow: hidden;
}
.trading-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(145deg, rgba(255,255,255,0.02) 0%, transparent 55%);
  pointer-events: none;
}
.trading-card:hover {
  border-color: rgba(200,241,53,0.28);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0,0,0,0.35), 0 0 0 1px rgba(200,241,53,0.08);
}

/* Highlighted / featured card */
.trading-card.featured {
  border-color: rgba(200,241,53,0.32);
  background: linear-gradient(145deg, rgba(200,241,53,0.06) 0%, var(--surface) 50%);
}

/* --- Card Top Row: logo + name --- */
.tc-header {
  display: flex; align-items: center; gap: 11px;
}

.tc-logo {
  width: 46px; height: 46px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 700;
  color: var(--text); flex-shrink: 0; overflow: hidden;
  transition: border-color 0.2s;
}
.tc-logo img {
  width: 100%; height: 100%; object-fit: contain;
}
.trading-card:hover .tc-logo { border-color: rgba(200,241,53,0.3); }

.tc-name-wrap { flex: 1; min-width: 0; }

.tc-name {
  font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 700;
  color: var(--text); letter-spacing: -0.01em; line-height: 1.3; margin-bottom: 4px;
}

.tc-tags { display: flex; flex-wrap: wrap; gap: 4px; }

.tc-tag {
  font-size: 9px; font-weight: 700; font-family: 'Syne', sans-serif;
  letter-spacing: 0.05em; padding: 2px 7px; border-radius: 20px;
  text-transform: uppercase;
}

/* Tag colour variants */
.tc-tag.forex    { background: var(--blue-dim);   color: var(--blue); }
.tc-tag.crypto   { background: var(--orange-dim); color: var(--orange); }
.tc-tag.stocks   { background: var(--purple-dim); color: var(--purple); }
.tc-tag.futures  { background: var(--green-dim);  color: var(--green); }
.tc-tag.cfds     { background: rgba(255,90,90,0.1); color: var(--red); }
.tc-tag.commodities { background: rgba(200,241,53,0.12); color: var(--accent); }

/* Highlighted badge */
.tc-badge {
  font-size: 9px; font-weight: 700; font-family: 'Syne', sans-serif;
  letter-spacing: 0.06em; padding: 2px 8px; border-radius: 20px;
  background: var(--accent); color: var(--bg);
  white-space: nowrap;
}

/* --- Description --- */
.tc-desc {
  font-size: 12px; color: var(--muted); line-height: 1.65;
  font-weight: 300; flex: 1;
}

/* --- Rating Row --- */
.tc-rating-row {
  display: flex; align-items: center; gap: 6px;
}

.tc-stars {
  display: flex; gap: 2px;
}
.tc-star {
  font-size: 10px; color: var(--muted);
}
.tc-star.filled { color: var(--orange); }

.tc-rating-label {
  font-size: 10px; font-weight: 600; color: var(--muted);
  font-family: 'Syne', sans-serif;
}

/* Min deposit / challenge fee chip */
.tc-detail-chip {
  margin-left: auto; font-size: 10px; font-weight: 600;
  font-family: 'Syne', sans-serif; color: var(--muted);
  background: var(--surface2); border: 1px solid var(--border);
  padding: 2px 8px; border-radius: 20px; white-space: nowrap;
}

/* --- CTA Button --- */
.tc-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; width: 100%; border-radius: 10px; border: none;
  font-family: 'Syne', sans-serif; font-size: 12px; font-weight: 700;
  letter-spacing: 0.04em; cursor: pointer; text-decoration: none;
  transition: opacity 0.18s, transform 0.13s;
}
.tc-btn:active { transform: scale(0.97); }

/* Primary button (accent) */
.tc-btn.primary {
  background: var(--accent); color: var(--bg);
}
.tc-btn.primary:hover { opacity: 0.88; }

/* Outline button variant */
.tc-btn.outline {
  background: transparent; color: var(--accent);
  border: 1px solid rgba(200,241,53,0.35);
}
.tc-btn.outline:hover {
  background: var(--accent-dim); border-color: var(--accent);
}

/* Funding / green variant */
.tc-btn.funded {
  background: var(--green); color: #0c0d0f;
}
.tc-btn.funded:hover { opacity: 0.88; }

/* Empty state for filtered results */
.trading-empty {
  text-align: center; padding: 48px 24px;
  color: var(--muted); font-size: 13px;
  animation: fadeUp 0.3s ease both;
}
.trading-empty-icon { font-size: 32px; margin-bottom: 12px; opacity: 0.4; }


/* ── 9. Ad Cards ───────────────────────────────────────────────────────── */
.ad-card {
  background: var(--surface); border: 1px solid rgba(200,241,53,0.18);
  border-radius: 14px; padding: 14px; animation: fadeUp 0.3s ease both;
  position: relative; overflow: hidden;
}
.ad-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(200,241,53,0.04) 0%, transparent 60%);
  pointer-events: none;
}
@media (min-width: 1024px) { .ad-card { display: none; } }

.ad-label {
  font-size: 10px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px;
  font-family: 'Syne', sans-serif;
}
.ad-inner { display: flex; align-items: center; gap: 12px; }
.ad-logo {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; color: var(--accent);
}
.ad-body { flex: 1; min-width: 0; }
.ad-title { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.4; margin-bottom: 3px; }
.ad-sub { font-size: 11.5px; color: var(--muted); line-height: 1.5; font-weight: 300; }
.ad-cta {
  display: inline-block; margin-top: 10px; font-size: 11px; font-weight: 600;
  font-family: 'Syne', sans-serif; color: var(--bg); background: var(--accent);
  padding: 5px 14px; border-radius: 20px; letter-spacing: 0.02em;
  cursor: pointer; border: none; text-decoration: none;
}


/* ── 10. Utilities & Animations ────────────────────────────────────────── */
.empty {
  text-align: center; padding: 48px 24px;
  color: var(--muted); font-size: 13px;
}
.empty-icon { font-size: 32px; margin-bottom: 12px; opacity: 0.4; }