:root {
  --bg: #f7f2e8;
  --bg-accent: #f0e6d4;
  --ink: #1c1f26;
  --muted: #5b6270;
  --card: #ffffff;
  --stroke: #e5d9c2;
  --accent: #ff6a3d;
  --accent-2: #1b998b;
  --accent-3: #3d74ff;
  --danger: #d64545;
  --shadow: 0 18px 45px rgba(28, 31, 38, 0.12);
  --radius: 20px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(800px 500px at 10% -10%, rgba(255, 106, 61, 0.12), transparent 60%),
    radial-gradient(900px 600px at 90% 0%, rgba(27, 153, 139, 0.12), transparent 60%),
    linear-gradient(135deg, var(--bg), var(--bg-accent));
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding: 32px 0 80px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 16px;
}

.logo {
  font-family: "Fraunces", "Georgia", serif;
  font-size: 24px;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}

.hero {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
  padding: 36px 0 24px;
}

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

.hero-title {
  font-size: clamp(28px, 5vw, 44px);
  margin: 0 0 12px;
  font-family: "Fraunces", "Georgia", serif;
}

.hero-sub {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 20px;
}

.search-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-input {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  font-size: 16px;
  background: #fff;
}

.btn {
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(28, 31, 38, 0.18);
}

.btn-outline {
  background: #fff;
  color: var(--ink);
  border-color: var(--stroke);
}

.btn-accent {
  background: var(--accent);
}

.ticker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.section {
  margin-top: 42px;
}

.section-title {
  font-size: 20px;
  margin-bottom: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

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

.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric strong {
  font-size: 22px;
  color: var(--ink);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(27, 153, 139, 0.12);
  color: var(--accent-2);
}

.badge.negative {
  background: rgba(214, 69, 69, 0.12);
  color: var(--danger);
}

.chart-wrap {
  position: relative;
  min-height: 320px;
}

#chart {
  width: 100%;
  height: 360px;
}

.chart-tooltip {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.95);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  font-size: 12px;
  color: var(--muted);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.news-list {
  display: grid;
  gap: 16px;
}

.news-item {
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  padding: 16px;
  background: #fff;
}

.news-item h4 {
  margin: 0 0 8px;
  font-size: 16px;
}

.news-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.summary-box {
  background: #fff7f0;
  border: 1px solid #ffd8c7;
  padding: 18px;
  border-radius: var(--radius-sm);
}

.summary-box ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
}

.state {
  padding: 18px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px dashed var(--stroke);
  color: var(--muted);
}

.footer {
  margin-top: 60px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
}

.tag {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--stroke);
  font-size: 12px;
}

@media (max-width: 720px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-bar {
    grid-template-columns: 1fr;
  }

  .hero-card {
    padding: 22px;
  }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
  opacity: 0;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}
