.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: 10px;
  padding: 1rem 1.125rem;
  transition: all 0.3s ease;
}

.card.cardInCompare {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.card:hover {
  border-left-color: var(--brand);
  box-shadow: var(--shadow-medium, 0 4px 20px rgba(var(--shadow-rgb), 0.1));
  transform: translateY(-1px);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.375rem;
}

.title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  font-family: var(--font-display);
}

.title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.title a:hover {
  color: var(--brand);
}

.distance {
  font-size: 0.75rem;
  color: var(--brand);
  white-space: nowrap;
  background: var(--brand-bg);
  padding: 0.125rem 0.5rem;
  border-radius: 12px;
  font-weight: 500;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.625rem;
}

.metaItem {
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 0.125rem 0.5rem;
  background: var(--bg-secondary);
  border-radius: 3px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.625rem;
  margin-bottom: 0.875rem;
  padding: 0.625rem 0.75rem;
  background: var(--bg-secondary);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.metricLabel {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metricValue {
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.metricValue strong {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 700;
}

.trend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  cursor: help;
  transition: transform 0.2s ease;
}

.trend:hover {
  transform: scale(1.15);
}

.trendIcon {
  width: 12px;
  height: 12px;
}

.trendUp {
  color: var(--status-above);
  background: var(--status-above-bg);
}

.trendDown {
  color: var(--status-below);
  background: var(--status-below-bg);
}

.trendStable {
  color: var(--text-muted);
  background: rgba(var(--muted-rgb), 0.15);
}

.actions {
  display: flex;
  gap: 0.5rem;
}

/* Equalise <a> and <button> rendering */
.actions > * {
  height: 2rem;
  line-height: 1;
  font-family: inherit;
  box-sizing: border-box;
}


.metricHint {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
  font-weight: 400;
}

@media (max-width: 640px) {
  .card {
    padding: 0.875rem;
    border-radius: 8px;
  }

  .metrics {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .actions {
    flex-direction: column;
  }
}
