:root {
  --bg: #f4efe7;
  --ink: #1f2328;
  --muted: #6a6f76;
  --card: rgba(255, 250, 242, 0.9);
  --line: rgba(31, 35, 40, 0.08);
  --buy: #1d7a43;
  --sell: #b83f2f;
  --hold: #8a6a1f;
  --shadow: 0 16px 40px rgba(76, 59, 34, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(214, 174, 96, 0.35), transparent 28%),
    radial-gradient(circle at bottom right, rgba(56, 112, 90, 0.25), transparent 24%),
    linear-gradient(180deg, #f6f2ea 0%, var(--bg) 100%);
}

.app {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 0.95;
}

.subtext {
  max-width: 640px;
  color: var(--muted);
  font-size: 17px;
}

.hero-card,
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero-card {
  padding: 22px;
  display: grid;
  gap: 14px;
}

.hero-stat span,
.metric span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.hero-stat strong,
.metric strong {
  font-size: 22px;
}

.filters {
  display: flex;
  gap: 10px;
  margin: 26px 0 18px;
  flex-wrap: wrap;
}

.filter-btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.65);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: #fff5df;
  transform: translateY(-1px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  padding: 18px;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.card:hover {
  transform: translateY(-4px) rotate(-0.2deg);
  box-shadow: 0 20px 48px rgba(76, 59, 34, 0.16);
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.symbol {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.name {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
}

.badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 8px 12px;
}

.badge.buy {
  background: rgba(29, 122, 67, 0.12);
  color: var(--buy);
}

.badge.sell {
  background: rgba(184, 63, 47, 0.12);
  color: var(--sell);
}

.badge.hold {
  background: rgba(138, 106, 31, 0.14);
  color: var(--hold);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.metric {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.56);
  border: 1px solid rgba(31, 35, 40, 0.05);
}

.change.up {
  color: var(--buy);
}

.change.down {
  color: var(--sell);
}

.reason {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.5;
  min-height: 48px;
}

.debug {
  margin-top: 16px;
  border-top: 1px dashed rgba(31, 35, 40, 0.12);
  padding-top: 12px;
}

.debug summary {
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.debug-meta {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.debug-bars {
  margin: 12px 0 0;
  padding: 12px;
  overflow: auto;
  border-radius: 14px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(31,35,40,0.05);
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink);
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }
}
