:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface2: #263348;
  --border: #334155;
  --green: #10b981;
  --green-dim: #065f46;
  --red: #ef4444;
  --yellow: #f59e0b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* NAV */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
  white-space: nowrap;
}
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.nav-links a {
  color: var(--muted);
  font-size: 0.875rem;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.15s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  background: var(--surface2);
  text-decoration: none;
}

/* HERO */
.hero {
  text-align: center;
  padding: 72px 24px 48px;
  max-width: 700px;
  margin: 0 auto;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.1; }
.hero h1 span { color: var(--green); }
.hero p { color: var(--muted); margin-top: 16px; font-size: 1.1rem; }

/* TOOL GRID */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  cursor: pointer;
  transition: all 0.2s;
  display: block;
  text-decoration: none;
  color: var(--text);
}
.tool-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--text);
}
.tool-card .icon { font-size: 2rem; margin-bottom: 12px; }
.tool-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.tool-card p { color: var(--muted); font-size: 0.875rem; }
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tag-trading { background: #1e3a5f; color: #60a5fa; }
.tag-finance { background: var(--green-dim); color: var(--green); }

/* SECTION LABEL */
.section-label {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* TOOL PAGE */
.tool-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.tool-page h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.tool-page .subtitle { color: var(--muted); margin-bottom: 40px; font-size: 1rem; }

/* CARD */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
}
.card h2 { font-size: 1rem; font-weight: 700; margin-bottom: 20px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* FORM */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 0.8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
input, select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 14px;
  font-size: 1rem;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
}
input:focus, select:focus { border-color: var(--green); }
select option { background: var(--bg); }

/* BUTTON */
.btn {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 8px;
}
.btn:hover { opacity: 0.85; }
.btn-full { width: 100%; }

/* RESULTS */
.results { display: none; }
.results.show { display: block; }

.status-banner {
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  font-size: 1.3rem;
  font-weight: 800;
  text-align: center;
}
.status-pass { background: #052e16; border: 2px solid var(--green); color: var(--green); }
.status-danger { background: #451a03; border: 2px solid var(--yellow); color: var(--yellow); }
.status-fail { background: #450a0a; border: 2px solid var(--red); color: var(--red); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat {
  background: var(--surface2);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}
.stat .val { font-size: 1.5rem; font-weight: 800; }
.stat .lbl { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }
.val-green { color: var(--green); }
.val-red { color: var(--red); }
.val-yellow { color: var(--yellow); }

/* PROGRESS BAR */
.progress-wrap { margin-bottom: 16px; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; }
.progress-bar { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; transition: width 0.4s; }
.fill-green { background: var(--green); }
.fill-yellow { background: var(--yellow); }
.fill-red { background: var(--red); }

/* CHART */
canvas { max-width: 100%; }

/* AFFILIATE */
.affiliate-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 24px;
}
.affiliate-section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; }
.firm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.firm-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.firm-btn:hover { border-color: var(--green); color: var(--green); text-decoration: none; }
.firm-btn .arrow { color: var(--muted); }

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .nav-links { display: none; }
  .hero { padding: 40px 16px 32px; }
  .tool-grid { padding: 0 16px 60px; }
  .tool-page { padding: 24px 16px 60px; }
  .form-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── AD SLOTS ────────────────────────────────────────────────────────────── */
.ad-slot{margin:24px auto;max-width:900px;padding:0 20px;text-align:center;}
.ad-slot .ad-label{font-size:.62rem;color:var(--muted);text-transform:uppercase;letter-spacing:1px;margin-bottom:6px;}
.temp-ad{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 20px;border-radius:12px;text-decoration:none;transition:filter .2s;flex-wrap:wrap;}
.temp-ad:hover{filter:brightness(1.12);}
.temp-ad .ad-left{display:flex;align-items:center;gap:14px;text-align:left;}
.temp-ad .ad-icon{font-size:1.8rem;flex-shrink:0;}
.temp-ad .ad-title{font-size:.88rem;font-weight:700;color:var(--text);margin-bottom:3px;}
.temp-ad .ad-desc{font-size:.74rem;color:var(--muted);line-height:1.45;}
.temp-ad .ad-cta{padding:9px 20px;border-radius:8px;font-size:.8rem;font-weight:700;white-space:nowrap;flex-shrink:0;}
@media(max-width:600px){
  .ad-slot{padding:0 12px;}
  .temp-ad{padding:12px 14px;gap:10px;}
  .temp-ad .ad-title{font-size:.82rem;}
  .temp-ad .ad-desc{font-size:.7rem;}
  .temp-ad .ad-cta{width:100%;text-align:center;padding:8px;}
}
