:root {
  color-scheme: light;
  --bg: #f4f7f5;
  --panel: #ffffff;
  --ink: #17201b;
  --muted: #68746d;
  --line: #dce4df;
  --accent: #0f766e;
  --accent-dark: #0c5f59;
  --warm: #d94f45;
  --shadow: 0 18px 45px rgba(29, 44, 36, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 34rem),
    linear-gradient(180deg, #f8faf8 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(248, 250, 248, 0.88);
  border-bottom: 1px solid rgba(220, 228, 223, 0.75);
  backdrop-filter: blur(14px);
}

.eyebrow,
.hero p,
.ticker span,
.section-head span,
.meta,
footer {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.35rem, 5vw, 2.25rem);
  line-height: 1.05;
}

.status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: 0 7px 22px rgba(29, 44, 36, 0.08);
  font-size: 0.86rem;
  font-weight: 750;
  white-space: nowrap;
}

.pulse {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  background: #1fa463;
  box-shadow: 0 0 0 0 rgba(31, 164, 99, 0.42);
  animation: pulse 1.6s infinite;
}

main {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: end;
  padding: clamp(1.2rem, 5vw, 2.4rem);
  min-height: 13rem;
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.94), rgba(22, 32, 27, 0.9)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='720' height='360' viewBox='0 0 720 360'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.19'%3E%3Cpath d='M42 262c116-95 213-41 306-112 85-66 166-67 278-12'/%3E%3Cpath d='M26 122c97 62 190 87 303 40 119-49 209-23 360 64'/%3E%3C/g%3E%3Cg fill='%23ffffff' fill-opacity='.18'%3E%3Ccircle cx='124' cy='117' r='8'/%3E%3Ccircle cx='336' cy='159' r='11'/%3E%3Ccircle cx='566' cy='136' r='9'/%3E%3Ccircle cx='442' cy='244' r='7'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  color: #fff;
  box-shadow: var(--shadow);
}

.hero h2 {
  max-width: 12ch;
  font-size: clamp(2rem, 8vw, 4.5rem);
  line-height: 0.98;
}

.hero p {
  max-width: 42rem;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(0.98rem, 2vw, 1.1rem);
  line-height: 1.6;
}

.ticker {
  display: grid;
  grid-template-columns: repeat(2, minmax(5.8rem, 1fr));
  gap: 0.7rem;
}

.ticker div {
  min-width: 7rem;
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.ticker strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1;
}

.ticker span {
  display: block;
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
}

.filters {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding: 1.15rem 0 0.9rem;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filters button {
  flex: 0 0 auto;
  min-height: 2.35rem;
  padding: 0 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
}

.filters button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.feed-shell {
  padding-top: 0.5rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.section-head h2 {
  font-size: 1.12rem;
}

.section-head span {
  font-size: 0.86rem;
  white-space: nowrap;
}

.feed {
  display: grid;
  gap: 0.78rem;
}

.card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.95rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px rgba(29, 44, 36, 0.08);
  animation: enter 280ms ease both;
}

.rank {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 8px;
  background: #edf3ef;
  color: var(--accent-dark);
  font-weight: 900;
}

.card-body {
  min-width: 0;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.45rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 850;
}

.trend {
  flex: 0 0 auto;
  color: var(--warm);
  font-size: 0.78rem;
  font-weight: 850;
}

.card h3 {
  margin: 0;
  font-size: clamp(1.02rem, 3.8vw, 1.3rem);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.card p {
  margin-top: 0.45rem;
  color: #4e5d55;
  line-height: 1.55;
  font-size: 0.94rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  margin-top: 0.75rem;
  font-size: 0.83rem;
  font-weight: 700;
}

.empty {
  padding: 2rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  text-align: center;
}

footer {
  padding: 1.5rem 1rem 2rem;
  text-align: center;
  font-size: 0.86rem;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 0.55rem rgba(31, 164, 99, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(31, 164, 99, 0);
  }
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .status {
    min-height: 2rem;
    padding: 0 0.65rem;
    font-size: 0.78rem;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 18rem;
  }

  .hero h2 {
    max-width: 11ch;
  }

  .ticker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ticker div {
    min-width: 0;
  }

  .card {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .rank {
    width: 2.25rem;
    height: 2.25rem;
  }
}
