/* Artist history — MusicBrainz mirror desk */

.page-artists .ah-search,
.page-artist-history .ah-search {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
  max-width: 42rem;
}
.page-artists .ah-search input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  color: var(--fg);
  font: inherit;
}
.ah-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.ah-toolbar h2 { margin: 0; font-size: 1.1rem; }
.ah-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.ah-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--elev, var(--card)) 92%, transparent);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}
.ah-card:hover,
.ah-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  outline: none;
}
.ah-card .ah-type {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.ah-card h3 {
  margin: 0;
  font-size: 1.05rem;
}
.ah-card p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}
.ah-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.25rem;
}
.ah-tags span {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  color: var(--muted);
}
.ah-skeleton {
  min-height: 180px;
  border-radius: 14px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--fg) 6%, transparent), transparent);
  background-size: 200% 100%;
  animation: ah-shimmer 1.2s linear infinite;
}
@keyframes ah-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.ah-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.ah-stat {
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}
.ah-stat strong { display: block; font-size: 1.25rem; }
.ah-stat span { color: var(--muted); font-size: 0.8rem; }

.ah-split {
  display: grid;
  gap: 1rem;
}
@media (min-width: 960px) {
  .ah-split { grid-template-columns: 1.1fr 1fr; }
}

.ah-sheet-wrap {
  max-height: min(52vh, 520px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ah-sheet {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.84rem;
  min-width: 520px;
}
.ah-sheet th,
.ah-sheet td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.ah-sheet thead th {
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--elev, var(--card)) 90%, var(--accent) 10%);
  z-index: 1;
}
.ah-sheet tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--fg) 3%, transparent);
}
.ah-sheet a { color: inherit; }

.ah-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.ah-timeline li {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0.65rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.ah-timeline .ah-date {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.82rem;
}
.ah-empty {
  color: var(--muted);
  padding: 1rem 0;
}

.ah-jam { margin-bottom: 1.25rem; }
.ah-jam-head {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}
.ah-jam-photo {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  object-fit: cover;
  background: linear-gradient(145deg, #1a1520, #2a3340);
  display: grid;
  place-items: center;
  font-family: var(--display, inherit);
  font-size: 2rem;
  color: var(--accent);
}
.ah-jam-ai { margin: 0.35rem 0 0; line-height: 1.45; max-width: 46rem; }
.ah-jam-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.85rem;
}
.ah-jam-all { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.86rem; cursor: pointer; }
.ah-jam-albums {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.85rem;
}
.ah-jam-album { display: grid; gap: 0.35rem; }
.ah-jam-cover {
  aspect-ratio: 1;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(145deg, #1a1520, #2a3340) center/cover;
  cursor: pointer;
}
.ah-jam-album h3 { margin: 0; font-size: 0.95rem; }
.ah-jam-album p { margin: 0; color: var(--muted); font-size: 0.78rem; }
.ah-jam-album-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.ah-jam-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.ah-jam-row {
  display: grid;
  grid-template-columns: 28px 88px 44px 1fr auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
}
.ah-jam-row:hover, .ah-jam-row.is-selected {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.ah-jam-when { font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ah-jam-art {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(145deg, #1a1520, #2a3340) center/cover;
}
.ah-jam-meta { min-width: 0; }
.ah-jam-meta strong, .ah-jam-meta span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ah-jam-meta span { font-size: 0.78rem; color: var(--muted); }
@media (max-width: 720px) {
  .ah-jam-row { grid-template-columns: 24px 1fr auto; }
  .ah-jam-when, .ah-jam-art { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ah-card { transition: none; }
  .ah-skeleton { animation: none; }
}
