:root {
  color-scheme: light;
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.4;
  color: #f8f4ec;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(250, 204, 21, 0.14), transparent 24%),
    linear-gradient(180deg, #18120f 0%, #0c0f13 44%, #11161d 100%);
  --bg: rgba(16, 20, 25, 0.82);
  --bg-soft: rgba(255, 255, 255, 0.05);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #f8f4ec;
  --muted: #aab4c0;
  --muted-strong: #dde5ef;
  --accent: #f97316;
  --highlight: #facc15;
  --positive: #22c55e;
  --negative: #f43f5e;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

#root {
  min-height: 100vh;
}

.app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  position: relative;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(circle at center, black, transparent 85%);
}

.card {
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.card h2,
.card h3,
.card h4 {
  margin-top: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
  gap: 20px;
  margin-bottom: 18px;
  overflow: hidden;
  position: relative;
}

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

.hero::before {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  top: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.24), transparent 68%);
  pointer-events: none;
}

.hero-copy,
.hero-panel {
  position: relative;
  z-index: 1;
}

.eyebrow-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.eyebrow,
.live-dot,
.section-kicker,
.hero-panel__label,
.controls label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  color: var(--muted);
}

.live-dot::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.8);
}

.hero h1 {
  margin: 0;
  max-width: 10ch;
  font-family: 'Fraunces', serif;
  font-size: clamp(3rem, 8vw, 6.1rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 18px 0 0;
  max-width: 64ch;
  color: var(--muted-strong);
  font-size: 1.04rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.pill,
.metric-chip,
.filter-chip,
.site-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-strong);
  backdrop-filter: blur(14px);
}

.pill--strong {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.24), rgba(250, 204, 21, 0.12));
  color: var(--text);
}

.site-pill--soft {
  background: rgba(249, 115, 22, 0.1);
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(249, 115, 22, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-panel__value {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
}

.hero-panel__detail,
.activity-date,
.activity-meta,
.activity-footer,
.stat-detail,
.empty,
.change-subtitle,
.filter-summary__label {
  color: var(--muted);
}

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

.hero-panel__meta div {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.hero-panel__meta span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.hero-panel__meta strong {
  display: block;
  margin-top: 6px;
  font-size: 1.2rem;
}

.banner {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 14px;
  backdrop-filter: blur(16px);
}

.banner--info {
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.24);
}

.banner--error {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.24);
}

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

.stat-card {
  min-height: 150px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
}

.stat-card--positive {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.16), rgba(255, 255, 255, 0.03));
}

.stat-card--accent {
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.16), rgba(255, 255, 255, 0.03));
}

.stat-card--negative {
  background: linear-gradient(180deg, rgba(244, 63, 94, 0.16), rgba(255, 255, 255, 0.03));
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.stat-value {
  margin-top: 8px;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  font-weight: 700;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading,
.change-meta,
.activity-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.section-heading {
  align-items: flex-start;
  margin-bottom: 16px;
}

.section-heading--compact {
  align-items: center;
}

.section-heading h3 {
  margin: 4px 0 0;
  font-size: 1.42rem;
}

.activity-list,
.section-grid {
  display: grid;
  gap: 12px;
}

.activity-item,
.change-item {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
}

.activity-title,
.change-title {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

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

.controls label {
  display: block;
  margin-bottom: 8px;
}

.controls input,
.controls select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.controls input::placeholder {
  color: rgba(221, 229, 239, 0.42);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.filter-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  width: fit-content;
  margin-bottom: 16px;
  padding: 8px;
  position: sticky;
  top: 12px;
  z-index: 5;
  background: rgba(12, 15, 19, 0.66);
  border-radius: 999px;
  backdrop-filter: blur(18px);
}

.tabs button {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: var(--muted-strong);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
}

.tabs button.active {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.92), rgba(250, 204, 21, 0.78));
  color: #101216;
  border-color: transparent;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

th {
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.72rem;
}

.favorite-button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--highlight);
  cursor: pointer;
  font-size: 1.1rem;
}

.listing-link {
  font-weight: 700;
  text-decoration: none;
}

.listing-link:hover {
  color: #ffd7a8;
}

.listing-meta-row {
  margin-top: 10px;
}

.sparkline {
  width: 96px;
  height: 28px;
}

.change-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.change-badge--positive {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

.change-badge--negative {
  background: rgba(244, 63, 94, 0.18);
  color: #fda4af;
}

.change-badge--accent {
  background: rgba(249, 115, 22, 0.18);
  color: #fdba74;
}

.change-badge--neutral {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
}

.diff-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted-strong);
}

.diff-list li + li {
  margin-top: 8px;
}

.chart {
  width: 100%;
  height: 180px;
}

.map {
  height: 520px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (prefers-reduced-motion: no-preference) {
  .card,
  .stat-card,
  .activity-item,
  .change-item,
  .tabs button,
  .ghost-button,
  .favorite-button {
    transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
  }

  .card:hover,
  .stat-card:hover,
  .activity-item:hover,
  .change-item:hover {
    transform: translateY(-2px);
  }
}

@media (hover: hover) and (pointer: fine) {
  .tabs button:hover,
  .ghost-button:hover,
  .favorite-button:hover {
    border-color: rgba(249, 115, 22, 0.42);
  }
}

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

  .tabs {
    width: 100%;
  }
}

@media (max-width: 800px) {
  .app {
    padding: 18px 14px 36px;
  }

  .hero h1 {
    max-width: none;
  }

  .hero-panel__meta,
  .section-heading,
  .change-meta,
  .activity-head {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .tabs {
    top: 8px;
    justify-content: center;
  }
}