/* Stock Analyzer — public site (landing + report history). Dark theme. */
:root {
  --bg: #0f1216;
  --bg-2: #161a21;
  --bg-3: #1d222b;
  --border: #262d38;
  --border-soft: #1f242d;
  --text: #e8ebf0;
  --text-2: #aab3c0;
  --muted: #6c7583;
  --accent: #5e9cea;
  --accent-2: #7c5cff;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --radius: 14px;
  --radius-sm: 9px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 22px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px);
  background: rgba(15, 18, 22, 0.82); border-bottom: 1px solid var(--border-soft);
}
.nav .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.brand svg { width: 26px; height: 26px; }
.nav .links { margin-left: auto; display: flex; gap: 22px; font-size: 14px; }
.nav .links a { color: var(--text-2); }
.nav .links a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero { padding: 72px 0 48px; text-align: center; }
.hero .eyebrow {
  display: inline-block; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); background: rgba(94,156,234,0.1); border: 1px solid rgba(94,156,234,0.25);
  padding: 5px 12px; border-radius: 20px; margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 48px); font-weight: 800; letter-spacing: -0.03em;
  margin: 0 0 16px; line-height: 1.1;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: 18px; color: var(--text-2); max-width: 620px; margin: 0 auto 28px; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 24px; border-radius: var(--radius-sm); font-weight: 600;
  font-size: 15px; cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #0b0e13; }
.btn-primary:hover { filter: brightness(1.08); text-decoration: none; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); text-decoration: none; }

/* Sections */
section { padding: 52px 0; border-top: 1px solid var(--border-soft); }
.section-head { margin-bottom: 32px; }
.section-head h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 8px; }
.section-head p { color: var(--text-2); margin: 0; max-width: 640px; }
.kicker { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* Workflow diagram (minimalist flow) */
.flow { overflow-x: auto; margin: 4px 0 34px; padding-bottom: 4px; }
.flow svg { min-width: 680px; width: 100%; height: auto; display: block; }
.flow text { font-family: 'Inter', -apple-system, sans-serif; }

/* Workflow steps */
.steps { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
.step {
  background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 20px; display: flex; gap: 16px;
}
.step .n {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(94,156,234,0.12); color: var(--accent); font-weight: 800; font-size: 15px;
}
.step h3 { margin: 2px 0 4px; font-size: 16px; }
.step p { margin: 0; color: var(--text-2); font-size: 14px; }

/* Data source cards */
.sources { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .sources { grid-template-columns: 1fr 1fr; } }
.source {
  background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 24px;
}
.source .head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.source .head .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; }
.source.ibkr .ic { background: rgba(211,73,52,0.14); }
.source.finviz .ic { background: rgba(52,211,153,0.14); }
.source h3 { margin: 0; font-size: 19px; }
.source .sub { color: var(--muted); font-size: 13px; }
.source .how {
  font-size: 13px; color: var(--text-2); background: var(--bg-3); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: 12px 14px; margin: 14px 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.source .how b { color: var(--text); font-family: var(--_f, inherit); }
.source ul { margin: 12px 0 0; padding-left: 18px; color: var(--text-2); font-size: 14px; }
.source li { margin-bottom: 7px; }
.source li b { color: var(--text); }
.note { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* Scorecard mini */
.crit-list { display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 8px; }
@media (min-width: 640px) { .crit-list { grid-template-columns: 1fr 1fr; } }
.crit-mini { display: flex; align-items: center; gap: 10px; background: var(--bg-2);
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 9px 12px; font-size: 14px; }
.crit-mini .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.crit-mini .dot.q { background: var(--green); } .crit-mini .dot.v { background: var(--amber); }
.crit-mini .t { color: var(--muted); margin-left: auto; font-size: 12px; }

/* Report history gallery */
.gallery { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.report-card {
  display: block; background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 18px; transition: border-color 0.15s, transform 0.15s;
}
.report-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.report-card .top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.report-card .tk { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.report-card .score { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.report-card .verdict { color: var(--text-2); font-size: 14px; min-height: 40px; }
.report-card .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px;
  font-size: 12px; color: var(--muted); }
.report-card .fw { background: var(--bg-3); border: 1px solid var(--border-soft); border-radius: 20px;
  padding: 2px 9px; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; grid-column: 1 / -1; }

/* Footer */
footer { border-top: 1px solid var(--border-soft); padding: 32px 0 60px; color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.disclaimer-box {
  background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  padding: 12px 16px; font-size: 13px; color: var(--muted); margin-top: 20px;
}
