/* cloudtrades. Dark monospace, dense, structured. */

:root {
  --bg:           #0a0a0a;
  --bg-elev:     #131313;
  --bg-card:     #161616;
  --bg-hover:    #1c1c1c;
  --border:      #222222;
  --border-2:    #2c2c2c;

  --text:        #ececec;
  --text-mid:    #b0b0b0;
  --text-muted:  #6e6e6e;
  --text-dim:    #444444;

  --accent:      #d4a14a;
  --accent-hi:   #f0b85a;
  --accent-dim:  #8c6a30;
  --win:         #5dd989;
  --loss:        #e96a6a;
  --info:        #5a8fc0;

  --radius:      6px;
  --radius-lg:   10px;
  --maxw:        1080px;

  --font-mono:   ui-monospace, "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  --font-disp:   "Space Grotesk", -apple-system, "Inter", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); font-family: var(--font-mono); font-size: 13.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }
button { font: inherit; cursor: pointer; }
::selection { background: var(--accent); color: var(--bg); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* Top ticker strip (above nav) */
.tickerstrip {
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
  overflow: hidden; white-space: nowrap;
  position: relative;
}
.tickerstrip .tape {
  display: inline-flex;
  animation: scroll 90s linear infinite;
  padding: 8px 0;
}
.tickerstrip .tape:hover { animation-play-state: paused; }
.tickerstrip .item {
  display: inline-flex; align-items: baseline; gap: 7px;
  padding: 0 18px; border-right: 1px solid var(--border);
  font-size: 11.5px;
}
.tickerstrip .item .sym { color: var(--text); font-weight: 600; }
.tickerstrip .item .px { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.tickerstrip .item .sc.h { color: var(--win); }
.tickerstrip .item .sc.l { color: var(--loss); }
.tickerstrip .item .sc.m { color: var(--text-mid); }
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Nav */
.site-nav {
  display: flex; align-items: center; gap: 2px;
  padding: 12px 22px; border-bottom: 1px solid var(--border);
  background: rgba(10,10,10,0.92); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.site-nav .brand {
  font-family: var(--font-disp);
  font-weight: 700; font-size: 16px;
  letter-spacing: -0.01em; color: var(--text);
  margin-right: 22px;
}
.site-nav .brand .dot { color: var(--accent); }
.site-nav a.tab {
  padding: 6px 11px; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -14px;
  font-size: 12.5px;
}
.site-nav a.tab:hover { color: var(--text); }
.site-nav a.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.site-nav .spacer { flex: 1; }
.site-nav .status {
  font-size: 11px; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}
.site-nav .status .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--win); box-shadow: 0 0 6px var(--win);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 600;
  border: 1px solid transparent; transition: all .15s ease;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-hi); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--bg-hover); border-color: var(--text-muted); color: var(--text); }
.btn-sm { padding: 6px 11px; font-size: 11.5px; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0 36px;
}
.hero h1 {
  font-family: var(--font-disp);
  font-size: clamp(30px, 3.3vw, 44px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 14px;
}
.hero h1 .accent { color: var(--accent); }
.hero p.lead {
  color: var(--text-mid);
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 22px;
  max-width: 470px;
}
.hero .ctas {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}

/* Hero right side: live preview card */
.live-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-elev) 100%);
  padding: 18px 20px;
  position: relative;
}
.live-card .meta-label {
  font-size: 10.5px; color: var(--text-muted);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.live-card .row { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.live-card .sym {
  font-family: var(--font-disp); font-weight: 700; font-size: 22px;
  letter-spacing: -0.02em;
}
.live-card .sec { color: var(--text-muted); font-size: 11.5px; }
.live-card .px {
  margin-left: auto; font-size: 22px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.live-card .scoremeta { font-size: 11px; color: var(--text-muted); }
.chart-wrap { margin-top: 12px; height: 96px; position: relative; }
.chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
.chart-wrap .path {
  fill: none; stroke: var(--accent); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(212,161,74,0.4));
  stroke-dasharray: 1200; stroke-dashoffset: 1200;
  animation: draw 2.0s cubic-bezier(.32,.72,.32,1) .15s forwards;
}
.chart-wrap .path-fill {
  fill: url(#grad-accent); opacity: 0;
  animation: fade 1.0s ease-out 1.6s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 0.36; } }

/* Stat row */
.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  border-top: 1px solid var(--border);
  padding-top: 18px; margin-top: 18px;
}
.stat-row .stat { display: flex; flex-direction: column; gap: 2px; }
.stat-row .num {
  font-family: var(--font-disp); font-size: 19px; font-weight: 700;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.stat-row .label { font-size: 10.5px; color: var(--text-muted); letter-spacing: 0.05em; text-transform: uppercase; }

/* Section structure */
.section { padding: 44px 0; border-top: 1px solid var(--border); }
.section:first-child { border-top: none; }
.section-head {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 22px; flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--font-disp); font-size: 22px;
  font-weight: 700; letter-spacing: -0.02em; color: var(--text);
}
.section-head .sub { color: var(--text-muted); font-size: 12.5px; }
.section-head a.more {
  margin-left: auto; font-size: 12px; color: var(--text-mid);
  border-bottom: 1px dashed var(--border-2); padding-bottom: 1px;
}
.section-head a.more:hover { color: var(--accent); border-color: var(--accent); }

/* Pick preview cards (top-3) */
.pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pick {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-card); padding: 16px 18px;
  transition: border-color .15s, transform .15s;
}
.pick:hover { border-color: var(--border-2); transform: translateY(-2px); }
.pick .head { display: flex; align-items: baseline; gap: 10px; }
.pick .head .sym { font-family: var(--font-disp); font-size: 19px; font-weight: 700; }
.pick .head .sec { color: var(--text-muted); font-size: 11px; }
.pick .head .score {
  margin-left: auto; padding: 2px 8px; border-radius: 4px;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.pick .head .score.h { background: rgba(93,217,137,0.15); color: var(--win); }
.pick .head .score.m { background: rgba(180,180,180,0.08); color: var(--text-mid); }
.pick .head .score.l { background: rgba(233,106,106,0.15); color: var(--loss); }
.pick .px-row { display: flex; align-items: baseline; gap: 12px; margin: 8px 0 12px; }
.pick .px { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pick .tgt { color: var(--win); font-size: 11.5px; }
.pick .stp { color: var(--loss); font-size: 11.5px; }
.pick .reasoning { color: var(--text-mid); font-size: 12px; line-height: 1.55; }
.pick .reasoning.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* Big stat block (backtest highlight) */
.bigstats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-card); padding: 22px 24px;
}
.bigstats .b { display: flex; flex-direction: column; gap: 4px; }
.bigstats .b .v {
  font-family: var(--font-disp); font-size: 30px; font-weight: 700;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.bigstats .b.win .v { color: var(--win); }
.bigstats .b.loss .v { color: var(--loss); }
.bigstats .b .lbl { font-size: 11px; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; }

/* How-it-works steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.step { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; }
.step .n {
  font-family: var(--font-disp); font-weight: 700; font-size: 13px;
  color: var(--accent); letter-spacing: 0.04em;
}
.step h3 { font-family: var(--font-disp); font-size: 15px; font-weight: 600; margin: 6px 0 4px; color: var(--text); }
.step p { color: var(--text-mid); font-size: 12.5px; line-height: 1.55; }

/* Factor showcase (with bars) */
.factor-bars { display: grid; gap: 6px; max-width: 600px; }
.factor-bars .row { display: grid; grid-template-columns: 120px 1fr 70px; gap: 12px; align-items: center; }
.factor-bars .name { color: var(--text-mid); font-size: 12px; }
.factor-bars .bar { position: relative; height: 6px; background: var(--bg-elev); border-radius: 3px; overflow: hidden; }
.factor-bars .bar > i {
  position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent);
  border-radius: 3px;
}
.factor-bars .pct { text-align: right; font-variant-numeric: tabular-nums; font-size: 11.5px; color: var(--text-mid); }

/* Comparison table */
.comp { width: 100%; border-collapse: collapse; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.comp th, .comp td { padding: 10px 14px; text-align: left; font-size: 12.5px; }
.comp thead th {
  background: var(--bg-elev); color: var(--text-muted);
  font-weight: 600; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.comp tbody tr { border-bottom: 1px solid var(--border); }
.comp tbody tr:last-child { border-bottom: none; }
.comp td.us { color: var(--win); font-weight: 600; }
.comp td.them { color: var(--text-muted); }

/* FAQ */
.faq details {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 0;
  margin-bottom: 8px;
}
.faq details[open] { border-color: var(--border-2); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 14px 18px; font-size: 13.5px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; justify-content: space-between;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-muted); font-size: 18px; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p {
  padding: 0 18px 14px; color: var(--text-mid); font-size: 12.5px; line-height: 1.6;
}

/* CTA block */
.cta-block {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elev) 100%);
  padding: 36px 32px; text-align: center;
}
.cta-block h3 { font-family: var(--font-disp); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.cta-block p { color: var(--text-mid); font-size: 13px; margin-bottom: 22px; max-width: 480px; margin-left: auto; margin-right: auto; }

/* Tables (used on dashboard/screener/dossier) */
table { border-collapse: collapse; width: 100%; }
th, td { padding: 7px 10px; text-align: left; white-space: nowrap; font-size: 12.5px; }
th {
  color: var(--text-muted); font-weight: normal; font-size: 10.5px;
  letter-spacing: 0.07em; text-transform: uppercase;
  border-bottom: 1px solid var(--border); cursor: pointer; user-select: none;
}
th:hover { color: var(--text); }
tbody tr { border-bottom: 1px solid var(--border); }
tbody tr:hover { background: var(--bg-hover); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td .badge {
  display: inline-block; padding: 2px 7px; border-radius: 3px;
  font-size: 10.5px; font-weight: 600;
}
.badge.long { background: rgba(93,217,137,0.13); color: var(--win); }
.badge.avoid { background: rgba(233,106,106,0.13); color: var(--loss); }

.score {
  font-variant-numeric: tabular-nums; font-weight: 600;
  padding: 2px 7px; border-radius: 3px; display: inline-block; min-width: 44px; text-align: right;
}
.score.high, .score.h { color: var(--win); background: rgba(93,217,137,0.10); }
.score.low, .score.l { color: var(--loss); background: rgba(233,106,106,0.10); }
.score.mid, .score.m { color: var(--text-mid); background: rgba(180,180,180,0.06); }

.reasoning { color: var(--text-mid); font-size: 11.5px; line-height: 1.5; white-space: normal; max-width: 520px; }

/* Skeleton (fallback only) */
.skel {
  background: linear-gradient(90deg, var(--bg-card) 0%, var(--bg-hover) 50%, var(--bg-card) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
  border-radius: 4px; height: 16px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Footer */
footer.site {
  margin-top: 60px; padding: 22px 0 32px;
  border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 11.5px;
}
footer.site .row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
footer.site nav { display: flex; gap: 16px; margin-left: auto; }
footer.site nav a { color: var(--text-muted); }
footer.site nav a:hover { color: var(--text); }

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 26px; padding-top: 32px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .pick-grid { grid-template-columns: 1fr; }
  .bigstats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .factor-bars .row { grid-template-columns: 100px 1fr 60px; }
}
