/* ── Screener Shared Styles ──
   Used by all pages under /screener/ (hub + 14 sub-pages).
   Generated pages link to this file via <link rel="stylesheet" href="/css/screener.css">.
   CSS variables match blog.html / calendar.html for site-wide consistency.
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-0: #090b10;
  --bg-1: #0d1017;
  --bg-2: #141820;
  --bg-3: #1a1f2b;
  --bg-4: #222838;
  --border: #1e2433;
  --border-hover: #2a3244;
  --text-0: #f0f2f5;
  --text-1: #c9d1d9;
  --text-2: #8b949e;
  --text-3: #484f58;
  --text-4: #484f58;
  --green: #2ea043;
  --green-bright: #3fb950;
  --green-dim: #1a3a2a;
  --red: #da3633;
  --red-bright: #f85149;
  --amber: #d29922;
  --amber-bright: #e3b341;
  --blue: #388bfd;
  --blue-dim: #1a2a3a;
  --purple: #8b5cf6;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --font: var(--font-sans);
  --mono: var(--font-mono);
  --green-b: #3fb950;

  /* Semantic aliases */
  --success: var(--green-bright);
  --danger: var(--red-bright);
  --warning: var(--amber-bright);
  --info: var(--blue);

  /* Border-radius scale */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadow / elevation scale */
  --shadow-1: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-2: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-3: 0 8px 32px rgba(0,0,0,0.5);

  /* Transition timing */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

body {
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Light Theme ── */
.scd-light-pending, html:has(body.light) { background: #f5f5f5; }
body.light {
  --bg-0: #f5f5f5; --bg-1: #ffffff; --bg-2: #f9f9f9; --bg-3: #eeeeee; --bg-4: #e0e0e0;
  --text-0: #1a1a1a; --text-1: #333333; --text-2: #666666; --text-3: #999999; --text-4: #bbbbbb;
  --border: rgba(0,0,0,0.12); --border-hover: rgba(0,0,0,0.2);
  --green-dim: #e6f4ea; --blue-dim: #e8f0fe;
}
body.light .site-nav { background: rgba(255,255,255,0.92); }
body.light .nav-mobile-menu { background: rgba(255,255,255,0.98); }
body.light .nav-dropdown-menu { background: var(--bg-1); border-color: var(--border); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
body.light .nav-hamburger span { background: var(--text-1); }
body.light footer { background: var(--bg-1); }
body.light .gate-overlay { background: linear-gradient(to bottom, rgba(245,245,245,0.2) 0%, rgba(245,245,245,0.95) 30%, #f5f5f5 100%); }
body.light .gate-card { background: var(--bg-1); border-color: var(--border); }
body.light .gate-input { background: var(--bg-2); border-color: var(--border); color: var(--text-0); }
body.light .signup-banner { border-color: rgba(46,160,67,0.15); }

/* ── Nav ── */
.site-nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  background: rgba(9,11,16,0.92); backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: #0d1117; border: 1.5px solid rgba(0,230,118,0.4);
  display: flex; align-items: center; justify-content: center;
}
.nav-mark svg { width: 15px; height: 15px; color: var(--green-bright, #00e676); }
.nav-title { font-size: 15px; font-weight: 700; color: var(--text-0); letter-spacing: -0.3px; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  font-size: 13px; color: var(--text-2); text-decoration: none; font-weight: 500;
  padding: 6px 10px; border-radius: 6px; transition: all 0.15s;
  background: none; border: none; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 4px;
}
.nav-link:hover { color: var(--text-0); background: var(--bg-2); }
.nav-link.active { color: var(--green-bright); }
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none; position: absolute; top: 100%; right: 0;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 6px; min-width: 160px; padding-top: 12px;
  box-shadow: var(--shadow-2);
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block; padding: 8px 14px; font-size: 13px; color: var(--text-2);
  text-decoration: none; border-radius: 6px; transition: all 0.15s;
}
.nav-dropdown-menu a:hover { color: var(--text-0); background: var(--bg-2); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-social { font-size: 13px; color: var(--text-2); text-decoration: none; font-weight: 500; transition: color 0.15s; }
.nav-social:hover { color: var(--text-0); }
.nav-social.discord { color: #5865F2; font-weight: 600; }
.nav-cta {
  padding: 8px 20px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: linear-gradient(135deg, #2ea043 0%, #388bfd 100%); color: white; border: none; cursor: pointer;
  font-family: var(--font); transition: all 0.2s; text-decoration: none;
  box-shadow: 0 4px 15px rgba(46, 160, 67, 0.2);
}
.nav-cta:hover { filter: brightness(1.1); transform: translateY(-1px); }
.nav-theme-btn {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px; transition: all 0.15s; flex-shrink: 0;
}
.nav-theme-btn:hover { border-color: var(--border-hover); }
.nav-hamburger {
  display: none; width: 36px; height: 36px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-hamburger span {
  display: block; width: 20px; height: 2px; background: var(--text-1);
  margin: 5px auto; transition: all 0.3s; border-radius: 1px;
}
.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); }
.nav-mobile-menu {
  display: none; position: fixed; top: 57px; left: 0; right: 0;
  background: rgba(9,11,16,0.98); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); padding: 16px 24px;
  flex-direction: column; gap: 0; z-index: 99;
  max-height: calc(100vh - 57px); overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
  font-size: 15px; color: var(--text-1); text-decoration: none; font-weight: 500;
  padding: 14px 0; border-bottom: 1px solid var(--border); transition: color 0.15s;
}
.nav-mobile-menu a:last-child { border-bottom: none; }
.nav-mobile-menu a:hover { color: var(--text-0); }
.nav-mobile-menu .nav-cta {
  text-align: center; margin-top: 8px; padding: 14px 20px; border-radius: 8px;
  border-bottom: none; color: white;
}
.nav-mobile-menu .discord-link { color: #5865F2; font-weight: 600; }
.menu-more-toggle { font-size:15px;color:var(--text-2);font-weight:500;padding:14px 0;border-bottom:1px solid var(--border);cursor:pointer;display:flex;align-items:center;justify-content:space-between;user-select:none; }
.menu-more-toggle:hover { color:var(--text-1); }
.menu-more-chevron { font-size:11px;transition:transform .25s ease; }
.menu-more-toggle.open .menu-more-chevron { transform:rotate(90deg); }
.menu-more-items { max-height:0;overflow:hidden;transition:max-height .3s ease;padding-left:14px; }
.menu-more-items.open { max-height:300px; }
.menu-more-items a { display:block;font-size:13px !important;color:var(--text-2) !important;padding:10px 0 !important;border-bottom:1px solid rgba(255,255,255,0.04) !important; }
.menu-more-items a:last-child { border-bottom:none !important; }
.menu-more-items a:hover { color:var(--text-1) !important; }

/* ── Ambient background ── */
.glow {
  position: fixed; top: -200px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 700px;
  background: radial-gradient(ellipse, rgba(46,160,67,0.05) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* ── Layout ── */
.container { max-width: 1000px; margin: 0 auto; padding: 40px 24px; }
.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; z-index: 9999; }
.skip-link:focus {
  position: fixed; top: 10px; left: 10px; width: auto; height: auto;
  padding: 10px 20px; background: var(--green); color: white; border-radius: 6px;
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.breadcrumb { padding: 0 24px; max-width: 1000px; margin: 73px auto 0; }
.breadcrumb ol { list-style: none; display: flex; gap: 8px; font-size: 12px; color: var(--text-3); }
.breadcrumb a { color: var(--text-3); text-decoration: none; }
.breadcrumb a:hover { color: var(--text-0); }
.breadcrumb li + li::before { content: "\203A"; margin-right: 8px; color: var(--text-4); }

/* ── Typography ── */
h1 { color: var(--text-0); font-size: clamp(22px, 3.5vw, 32px); font-weight: 800; letter-spacing: -1px; margin-bottom: 8px; }
.grad {
  background: linear-gradient(135deg, var(--green-b) 0%, #2dd4bf 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
h2 { color: var(--text-0); font-size: 18px; font-weight: 700; margin: 32px 0 12px; }
.subtitle { color: var(--text-3); font-size: 14px; margin-bottom: 24px; }
.intro { color: var(--text-2); font-size: 15px; line-height: 1.7; margin-bottom: 28px; max-width: 750px; }

/* ── Hub Page Cards ── */
h1.hub-h1 { font-size: clamp(24px, 4vw, 36px); }
h2.hub-h2 { font-size: 20px; margin: 40px 0 16px; }
.subtitle.hub-sub { margin-bottom: 32px; }
.intro.hub-intro { margin-bottom: 32px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 16px; }
.card {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px;
  padding: 20px; text-decoration: none; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: var(--green); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.card-title { color: var(--text-0); font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.card-count { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--green); margin-bottom: 4px; }
.card-desc { font-size: 12px; color: var(--text-3); }

/* ── Featured Catalyst Card ── */
.card-featured {
  background: linear-gradient(135deg, rgba(56,139,253,0.06), rgba(139,92,246,0.06));
  border-color: var(--blue);
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 20px; padding: 24px;
}
.card-featured:hover { border-color: var(--purple); }
.card-featured .card-icon { font-size: 32px; flex-shrink: 0; }
.card-featured .card-title { font-size: 18px; }
.card-featured .card-count { color: var(--blue); }

/* ── Sub-page Stats ── */
.stats { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.stat-box {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 18px; flex: 1; min-width: 100px; text-align: center;
}
.stat-val { font-family: var(--font-mono); font-size: 22px; font-weight: 700; color: var(--text-0); }
.stat-val.green { color: var(--green); }
.stat-val.amber { color: var(--amber); }
.stat-val.blue { color: var(--blue); }
.stat-label { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }

/* ── Table ── */
.table-wrap { overflow-x: auto; margin: 20px 0; }
table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 8px; min-width: 600px;
}
th {
  padding: 10px 12px; text-align: left; font-size: 10px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border);
}
tr { border-bottom: 1px solid var(--bg-1); }
tr:last-child { border: none; }
tr:hover { background: var(--bg-2); }

/* ── CTA ── */
.cta {
  display: inline-block; background: var(--green); color: white;
  padding: 12px 28px; border-radius: 8px; text-decoration: none;
  font-weight: 600; font-size: 14px; margin-top: 16px;
}
.cta:hover { background: var(--green-bright); }

/* ── Related / Sector Links ── */
.related {
  margin-top: 40px; padding: 24px;
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 8px;
}
.related h2 { font-size: 14px; color: var(--text-0); margin: 0 0 16px; font-weight: 700; }
.related a {
  display: inline-block; padding: 6px 14px; margin: 4px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text-1); text-decoration: none; font-size: 13px;
}
.related a:hover { border-color: var(--green); color: var(--text-0); }

/* ── FAQ ── */
.faq { margin: 40px 0; }
.faq details { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq summary {
  cursor: pointer; color: var(--text-0); font-weight: 600; font-size: 15px;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq summary::after { content: "+"; color: var(--text-3); font-size: 18px; }
.faq details[open] summary::after { content: "\2212"; }
.faq p { color: var(--text-2); font-size: 14px; line-height: 1.7; margin-top: 12px; padding-right: 24px; }

/* ── Signup Banner ── */
.signup-banner {
  background: linear-gradient(135deg, rgba(46,160,67,0.08), rgba(56,139,253,0.08));
  border: 1px solid rgba(46,160,67,0.2); border-radius: 12px;
  padding: 24px; margin-bottom: 32px; text-align: center;
}
.signup-banner .banner-title { font-size: 16px; font-weight: 700; color: var(--text-0); margin-bottom: 6px; }
.signup-banner .banner-sub { font-size: 13px; color: var(--text-2); margin-bottom: 16px; }
.signup-banner form {
  display: flex; gap: 8px; max-width: 480px; margin: 0 auto;
  flex-wrap: wrap; justify-content: center;
}
.signup-banner input {
  flex: 1; min-width: 120px; padding: 10px 14px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-0); font-size: 14px; font-family: inherit; outline: none;
}
.signup-banner input:focus { border-color: var(--green); }
.signup-banner input[type="email"] { flex: 2; min-width: 180px; }
.signup-banner button {
  padding: 10px 20px; border: none; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: white; cursor: pointer;
  font-family: inherit; background: linear-gradient(135deg, #2ea043, #388bfd);
  white-space: nowrap; box-shadow: 0 4px 15px rgba(46, 160, 67, 0.25);
  transition: filter 0.2s, transform 0.2s;
}
.signup-banner button:hover { filter: brightness(1.1); transform: translateY(-1px); }
.signup-banner .banner-checks {
  display: flex; gap: 16px; justify-content: center; margin-top: 12px;
  font-size: 11px; color: var(--text-3);
}

/* ── Auth Gate ── */
.gate-wrap { position: relative; }
.gate-wrap.gated .gate-content { max-height: 340px; overflow: hidden; filter: blur(6px); pointer-events: none; user-select: none; }
.gate-overlay {
  display: none; position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  padding-top: 20px; min-height: 400px;
  background: linear-gradient(to bottom, rgba(10,13,20,0.2) 0%, rgba(10,13,20,0.95) 30%, var(--bg-0) 100%);
  justify-content: center; align-items: flex-start;
}
.gate-wrap.gated .gate-overlay { display: flex; }
.gate-card {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: 16px;
  padding: 40px 32px; max-width: 400px; width: 90%; text-align: center; margin-top: 40px;
}
.gate-card h2 { font-size: 20px; font-weight: 700; color: var(--text-0); margin: 0 0 6px; }
.gate-card p { font-size: 13px; color: var(--text-3); line-height: 1.5; margin: 0 0 24px; }
.gate-input {
  width: 100%; padding: 10px 14px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-0); font-size: 14px; margin-bottom: 10px; box-sizing: border-box;
}
.gate-input:focus { border-color: var(--green); outline: none; }
.gate-btn {
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, #2ea043, #238636); border: none; border-radius: 8px;
  color: white; font-weight: 700; font-size: 14px; cursor: pointer; margin-top: 4px;
}
.gate-btn:hover { filter: brightness(1.1); }
.gate-toggle { color: var(--green); cursor: pointer; font-size: 12px; margin-top: 16px; }
.gate-fine { font-size: 11px; color: var(--text-4); margin-top: 14px; }

/* ── Footer ── */
footer { margin-top: 60px; border-top: 1px solid var(--border); background: var(--bg-1); }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 48px 24px 24px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-bottom: 32px; }
.footer-col-title {
  font-size: 11px; font-weight: 700; color: var(--text-0); text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 12px;
}
.footer-link { display: block; font-size: 13px; color: var(--text-2); text-decoration: none; padding: 4px 0; }
.footer-link:hover { color: var(--text-0); }
.footer-screener-links {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  padding: 16px 0; margin-bottom: 16px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.footer-screener-link {
  font-size: 11px; color: var(--text-4); text-decoration: none;
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 4px;
}
.footer-screener-link:hover { color: var(--text-2); border-color: var(--border-hover); }
.footer-disclaimer {
  font-size: 11px; color: var(--text-4); line-height: 1.5;
  max-width: 800px; margin: 0 auto 12px; text-align: center;
}
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--text-4);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .logo-sub-inline { display: none; }
  .nav-hamburger { display: block; }
  .nav-links, .nav-right { display: none !important; }
  .nav-inner { padding: 12px 16px; }
  .stats { flex-wrap: wrap; }
  .stat-box { min-width: calc(50% - 8px); }
  table { font-size: 12px; }
  h1 { font-size: 22px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 4px; text-align: center; }
  .card-featured { flex-direction: column; text-align: center; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr 1fr; }
}
