/* ---------- Demo widget ---------- */
.demo {
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.demo__tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.demo__tab {
  flex: 1;
  padding: 16px;
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-weight: 700;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
}
.demo__tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--accent-soft);
}
.demo__panel { display: none; padding: 28px; }
.demo__panel.is-active { display: block; }

.demo__hint {
  color: var(--text-faint);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.demo__chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.demo__chip {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
}
.demo__chip:hover { border-color: var(--accent); }
.demo__chip.is-active { background: var(--accent); border-color: var(--accent); color: #06251c; }

.demo__form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.demo__form select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 14px;
  font: inherit;
}

.demo__result { min-height: 90px; }
.demo__placeholder {
  color: var(--text-faint);
  font-size: 0.9rem;
  padding: 24px 0;
}

.demo__disclaimer {
  text-align: center;
  color: var(--text-faint);
  font-size: 0.78rem;
  margin-top: 18px;
}

/* ---------- Stock result card ---------- */
.demo-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
}
.demo-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.demo-card__top strong { font-size: 1.05rem; }
.demo-card__row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.92rem;
}
.demo-card__row--sub { color: var(--text-faint); font-size: 0.85rem; }

.demo-gauge {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  margin: 6px 0;
}
.demo-gauge__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.demo-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}
.demo-badge--buy { background: rgba(51, 214, 168, 0.16); color: var(--accent); }
.demo-badge--caution { background: rgba(232, 194, 106, 0.16); color: var(--gold); }
.demo-badge--hold { background: rgba(180, 150, 110, 0.18); color: #c9a876; }
.demo-badge--sell { background: rgba(224, 90, 90, 0.16); color: #e05a5a; }

/* ---------- Auction result table ---------- */
.demo-table-wrap { overflow-x: auto; }
.demo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  white-space: nowrap;
}
.demo-table th, .demo-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.demo-table th {
  color: var(--text-faint);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.demo-table td { color: var(--text-dim); }

@media (max-width: 520px) {
  .demo__panel { padding: 20px; }
}
