/* A tiny, dependency-free stylesheet for the project demo page. */
:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #1a1d29;
  --muted: #5b6172;
  --accent: #4f46e5;
  --accent-2: #0ea5e9;
  --buy: #22c55e;
  --sell: #ef4444;
  --hold: #94a3b8;
  --line: #38bdf8;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 8px 24px rgba(16, 24, 40, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

.hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 72px 24px 32px;
  text-align: center;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 12px;
}

.hero h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 28px;
}

main {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.card h2 {
  font-size: 1.4rem;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.explain {
  color: #2b2f3a;
  margin: 0 0 14px;
}

.caption {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 14px 0 0;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.05s ease, background 0.2s ease;
}
.btn:hover {
  background: #4338ca;
}
.btn:active {
  transform: translateY(1px);
}
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-ghost:hover {
  background: rgba(79, 70, 229, 0.08);
}

/* inline legend dots */
.dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  vertical-align: middle;
  margin: 0 1px;
}
.dot-buy {
  background: var(--buy);
}
.dot-sell {
  background: var(--sell);
}
.dot-hold {
  background: var(--hold);
}

/* The market demo */
.market {
  background: #0b1020;
  border-radius: 12px;
  padding: 14px;
  margin-top: 8px;
}
#price,
#agents {
  display: block;
  width: 100%;
}
#price {
  height: 180px;
}
#agents {
  height: 120px;
  margin-top: 10px;
}
.readout {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 12px;
  color: #c7d2fe;
  font-variant-numeric: tabular-nums;
}
.readout .rlabel {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7c89b8;
}
.readout span:last-child {
  font-size: 1.15rem;
  font-weight: 700;
}

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px 20px;
  align-items: center;
  margin-top: 18px;
}
.controls label {
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}
.controls input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

/* scoreboard */
.scoreboard {
  display: flex;
  gap: 16px;
  margin: 18px 0;
  flex-wrap: wrap;
}
.score {
  flex: 1 1 160px;
  background: #eef0f8;
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}
.score .num {
  display: block;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
}
.score-zero .num {
  color: var(--sell);
}
.score .lbl {
  color: var(--muted);
  font-size: 0.9rem;
}

.takeaways {
  margin: 6px 0 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.takeaways li {
  background: #eef0f8;
  border-radius: 10px;
  padding: 12px 14px;
}

footer {
  max-width: 820px;
  margin: 40px auto;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}
footer a {
  color: var(--accent);
  font-weight: 600;
}

/* tabs */
.tabs {
  display: flex;
  gap: 6px;
  justify-content: center;
  max-width: 820px;
  margin: 0 auto 18px;
  padding: 0 24px;
  border-bottom: 1px solid #e4e7f0;
}
.tab {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.tab:hover {
  color: var(--ink);
}
.tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.panel.is-hidden {
  display: none;
}

/* technical deep-dive */
.tech h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.tech .tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(79, 70, 229, 0.1);
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.tech .why {
  display: block;
  margin-top: 10px;
  padding: 10px 14px;
  border-left: 3px solid var(--accent-2);
  background: #f0f9ff;
  border-radius: 0 8px 8px 0;
  color: #15324a;
  font-size: 0.95rem;
}
.tech .why b {
  color: var(--accent);
}
.tech code {
  background: #eef0f8;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.88em;
}

@media (max-width: 520px) {
  .hero {
    padding-top: 48px;
  }
  .tab {
    padding: 12px 10px;
    font-size: 0.92rem;
  }
}
