/**
 * Artists Central Hub.
 *
 * HOW THIS SITS INSIDE SOMEBODY ELSE'S THEME
 *
 * One accent colour comes from the settings. Everything else is built from
 * currentColor and neutral greys expressed as rgba(128,128,128,...), which is
 * the trick that lets the same stylesheet look right on a white theme and on a
 * dark one without knowing which it is in. A grey at 50% is unremarkable
 * against both, where a hardcoded #eee is invisible on white and glaring on
 * black.
 *
 * Nothing here sets a font family or a text colour. Both are inherited, so the
 * hub reads as part of the site it is installed on rather than as a widget
 * somebody pasted in.
 */

.ach {
	--ach-line: rgba(128, 128, 128, 0.22);
	--ach-line-soft: rgba(128, 128, 128, 0.13);
	--ach-fill: rgba(128, 128, 128, 0.07);
	--ach-fill-2: rgba(128, 128, 128, 0.14);
	--ach-r: 14px;
	--ach-r-sm: 10px;

	box-sizing: border-box;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px;
}

.ach *,
.ach *::before,
.ach *::after {
	box-sizing: border-box;
}

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

/* =========================================================================
   Hero
   ========================================================================= */

.ach-hero {
	padding: 34px 0 24px;
}

.ach-hero__t {
	margin: 0 0 8px;
	font-size: clamp(1.7rem, 4.5vw, 2.5rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.ach-hero__s {
	margin: 0 0 20px;
	max-width: 62ch;
	font-size: 0.98rem;
	line-height: 1.6;
	opacity: 0.72;
}

.ach-hero__s strong {
	font-weight: 700;
	opacity: 1;
	color: var(--ach-accent);
}

/* ---------- Search ---------- */

.ach-search {
	position: relative;
	max-width: 480px;
}

.ach-search__i {
	position: absolute;
	top: 50%;
	left: 16px;
	transform: translateY(-50%);
	opacity: 0.45;
	pointer-events: none;
}

.ach-search__f {
	width: 100%;
	padding: 14px 44px 14px 44px;
	font: inherit;
	font-size: 1rem;
	color: inherit;
	background: var(--ach-fill);
	border: 1px solid var(--ach-line);
	border-radius: 999px;
	appearance: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ach-search__f::-webkit-search-cancel-button {
	display: none;
}

.ach-search__f:focus {
	outline: none;
	border-color: var(--ach-accent);
	box-shadow: 0 0 0 4px rgba(var(--ach-accent-rgb), 0.16);
}

.ach-search__x {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY(-50%);
	width: 30px;
	height: 30px;
	font-size: 20px;
	line-height: 1;
	color: inherit;
	background: var(--ach-fill-2);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	opacity: 0.7;
}

.ach-search__x:hover {
	opacity: 1;
}

/* =========================================================================
   Featured band
   ========================================================================= */

.ach-band {
	margin: 6px 0 30px;
}

.ach-band__t,
.ach-bar__t {
	margin: 0 0 14px;
	font-size: 0.82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.09em;
	opacity: 0.6;
}

.ach-bar__t strong {
	color: var(--ach-accent);
	opacity: 1;
}

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

.ach-star {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 20px 12px 16px;
	text-align: center;
	background: var(--ach-fill);
	border: 1px solid var(--ach-line-soft);
	border-radius: var(--ach-r);
	transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.ach-star:hover {
	transform: translateY(-3px);
	border-color: rgba(var(--ach-accent-rgb), 0.55);
	box-shadow: 0 10px 26px rgba(0, 0, 0, 0.13);
}

/*
 * The rank is a ghost number behind the picture rather than a badge on top of
 * it. A badge would have to sit somewhere, and wherever it sits it covers part
 * of somebody's face.
 */
.ach-star__rank {
	position: absolute;
	top: 6px;
	left: 12px;
	font-size: 1.9rem;
	font-weight: 800;
	line-height: 1;
	opacity: 0.13;
	pointer-events: none;
}

.ach-star__img {
	position: relative;
	display: block;
	width: 76px;
	height: 76px;
	overflow: hidden;
	border-radius: 50%;
	background: var(--ach-fill-2);
	box-shadow: 0 0 0 3px rgba(var(--ach-accent-rgb), 0.22);
}

.ach-star__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/*
 * The whole name, always.
 *
 * This used to clamp to two lines and hide the rest, which on a site whose
 * tags are artist names meant anyone with a long name was permanently
 * half-named. A grid row stretches to its tallest tile anyway, so letting
 * the name run to three lines costs a little height and nothing else.
 *
 * overflow-wrap:anywhere is the part that matters for names with no spaces
 * in them. Without it a long unbroken name pushes out past the tile edge
 * instead of wrapping, which is the other way a name disappears.
 */
.ach-star__name {
	font-size: 0.92rem;
	font-weight: 700;
	line-height: 1.3;
	white-space: normal;
	overflow-wrap: anywhere;
	word-break: break-word;
	hyphens: auto;
}

.ach-star__meta {
	font-size: 0.76rem;
	opacity: 0.6;
}

/* =========================================================================
   Lettered tiles, for artists with no picture anywhere
   ========================================================================= */

.ach-av--letters,
.ach-star__img--letters,
.ach-artist__img--letters {
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: #fff;
	background: linear-gradient(140deg,
		hsl(var(--ach-hue, 0) 58% 52%),
		hsl(calc(var(--ach-hue, 0) + 34) 55% 42%));
}

.ach-star__img--letters {
	font-size: 1.5rem;
}

.ach-av--letters {
	font-size: 0.95rem;
}

/* =========================================================================
   A-Z bar
   ========================================================================= */

.ach-az {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin: 0 0 20px;
	padding: 12px;
	background: var(--ach-fill);
	border: 1px solid var(--ach-line-soft);
	border-radius: var(--ach-r);
}

.ach-az__k {
	min-width: 32px;
	padding: 6px 9px;
	font: inherit;
	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1;
	text-align: center;
	color: inherit;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.13s ease, color 0.13s ease;
}

.ach-az__k:hover {
	background: var(--ach-fill-2);
}

.ach-az__k.is-on {
	color: #fff;
	background: var(--ach-accent);
}

.ach-az__k.is-off {
	opacity: 0.24;
	cursor: default;
}

.ach-az__k.is-off:hover {
	background: transparent;
}

/* =========================================================================
   Section bar
   ========================================================================= */

.ach-bar {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	margin: 26px 0 14px;
}

.ach-bar__t {
	margin: 0;
}

.ach-bar__n {
	font-size: 0.8rem;
	opacity: 0.55;
	white-space: nowrap;
}

/* =========================================================================
   Artist cards
   ========================================================================= */

.ach-grid,
.ach-strip__grid {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ach-card {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 9px 12px 9px 9px;
	background: var(--ach-fill);
	border: 1px solid var(--ach-line-soft);
	border-radius: var(--ach-r-sm);
	transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.ach-card:hover {
	transform: translateY(-2px);
	border-color: rgba(var(--ach-accent-rgb), 0.5);
	background: var(--ach-fill-2);
}

.ach-av {
	flex: none;
	display: block;
	width: 44px;
	height: 44px;
	overflow: hidden;
	border-radius: 9px;
	background: var(--ach-fill-2);
}

.ach-av img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ach-card__t {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

/* Was one line with an ellipsis, so every long name in the directory ended
   in three dots. It wraps now. .ach-card__t already carries min-width:0,
   which is what lets a flex child actually shrink and wrap rather than
   refusing to go below its content width. */
.ach-card__name {
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.3;
	white-space: normal;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.ach-card__n {
	font-size: 0.74rem;
	opacity: 0.55;
}

.ach-card.is-hidden {
	display: none;
}

/* Text-only variant, for the strip with pictures switched off. */
.ach-pill {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 12px;
	border: 1px solid var(--ach-line);
	border-radius: var(--ach-r-sm);
	line-height: 1.3;
	transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.ach-pill:hover {
	transform: translateY(-2px);
	border-color: var(--ach-accent);
	background: var(--ach-fill);
}

/* The pill is a flex row with a count badge pinned to its right. The name
   needs min-width:0 as well as normal wrapping, otherwise it refuses to
   shrink below its own text width and pushes the badge off the edge. */
.ach-pill__name {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.3;
	white-space: normal;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.ach-pill__n {
	flex: none;
	padding: 2px 8px;
	font-size: 0.72rem;
	font-weight: 700;
	background: var(--ach-fill-2);
	border-radius: 999px;
}

.ach-pill:hover .ach-pill__n {
	color: #fff;
	background: var(--ach-accent);
}

/* =========================================================================
   Empty and working states
   ========================================================================= */

.ach-empty,
.ach-working {
	margin: 26px 0;
	padding: 22px;
	text-align: center;
	opacity: 0.65;
	background: var(--ach-fill);
	border-radius: var(--ach-r);
}

.ach-empty[hidden],
.ach-working[hidden] {
	display: none !important;
}

/* =========================================================================
   Paging
   ========================================================================= */

.ach-pages {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	flex-wrap: wrap;
	margin: 30px 0 40px;
}

.ach-pages__b,
.ach-pages .page-numbers {
	padding: 10px 18px;
	font-size: 0.87rem;
	font-weight: 700;
	background: var(--ach-fill);
	border: 1px solid var(--ach-line);
	border-radius: 999px;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.ach-pages__b:hover,
.ach-pages .page-numbers:hover {
	border-color: var(--ach-accent);
	background: var(--ach-fill-2);
}

.ach-pages .page-numbers.current {
	color: #fff;
	background: var(--ach-accent);
	border-color: var(--ach-accent);
}

.ach-pages__n {
	font-size: 0.83rem;
	opacity: 0.6;
}

/* =========================================================================
   The strip above the footer
   ========================================================================= */

.ach-strip {
	margin: 40px auto 0;
	padding: 0;
}

.ach-strip__in {
	padding: 26px 0 6px;
	border-top: 1px solid var(--ach-line);
}

.ach-strip__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin: 0 0 16px;
}

.ach-strip__title {
	margin: 0;
	font-size: 1.06rem;
	font-weight: 800;
	letter-spacing: -0.01em;
}

.ach-strip__all {
	font-size: 0.82rem;
	font-weight: 600;
	opacity: 0.75;
	white-space: nowrap;
}

.ach-strip__all:hover {
	opacity: 1;
	color: var(--ach-accent);
}

/* =========================================================================
   Artist page
   ========================================================================= */

.ach-artist {
	position: relative;
	max-width: none;
	padding: 0;
	margin-bottom: 26px;
	overflow: hidden;
}

/*
 * The artist's own picture, blurred hard and dimmed, as the backdrop. Blurring
 * this much is deliberate: at full strength a cover with text on it turns the
 * name above it into noise, and the point of the wash is atmosphere, not
 * information.
 */
.ach-artist__wash {
	position: absolute;
	inset: -40px;
	background-image: var(--ach-shot, none);
	background-size: cover;
	background-position: center;
	filter: blur(38px) saturate(1.25);
	opacity: 0.32;
	pointer-events: none;
}

.ach-artist__wash::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(128, 128, 128, 0.08), rgba(128, 128, 128, 0.3));
}

.ach-artist__in {
	position: relative;
	display: flex;
	align-items: center;
	gap: 20px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 30px 16px;
}

.ach-artist__img {
	flex: none;
	display: block;
	width: 112px;
	height: 112px;
	overflow: hidden;
	border-radius: 50%;
	background: var(--ach-fill-2);
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22), 0 0 0 4px rgba(var(--ach-accent-rgb), 0.3);
}

.ach-artist__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ach-artist__img--letters {
	font-size: 2.1rem;
}

.ach-artist__b {
	min-width: 0;
}

.ach-artist__k {
	margin: 0 0 2px;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.13em;
	color: var(--ach-accent);
}

.ach-artist__n {
	margin: 0 0 10px;
	font-size: clamp(1.5rem, 4.5vw, 2.3rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.ach-artist__stats {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.ach-artist__stat {
	padding: 5px 12px;
	font-size: 0.78rem;
	background: var(--ach-fill-2);
	border-radius: 999px;
	opacity: 0.85;
}

.ach-artist__stat strong {
	font-weight: 700;
	opacity: 1;
}

.ach-artist__back:hover {
	color: #fff;
	background: var(--ach-accent);
	opacity: 1;
}

.ach-artist__bio {
	margin: 12px 0 0;
	max-width: 62ch;
	font-size: 0.9rem;
	line-height: 1.6;
	opacity: 0.78;
}

/* ---------- Share ---------- */

.ach-share {
	display: flex;
	align-items: center;
	gap: 7px;
	flex-wrap: wrap;
	margin-top: 14px;
}

.ach-share__l {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.09em;
	opacity: 0.55;
}

.ach-share__b {
	padding: 6px 13px;
	font: inherit;
	font-size: 0.78rem;
	font-weight: 600;
	color: inherit;
	background: var(--ach-fill-2);
	border: 1px solid var(--ach-line-soft);
	border-radius: 999px;
	cursor: pointer;
	transition: border-color 0.14s ease, background 0.14s ease;
}

.ach-share__b:hover {
	border-color: var(--ach-accent);
	background: var(--ach-fill);
}

.ach-share__b.is-done {
	color: #fff;
	background: var(--ach-accent);
	border-color: var(--ach-accent);
}

/* ---------- Songs ---------- */

.ach-songs {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ach-song {
	min-width: 0;
}

.ach-song__thumb {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--ach-r-sm);
	background: var(--ach-fill-2);
}

.ach-song__img,
.ach-song__ph {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.ach-song:hover .ach-song__img {
	transform: scale(1.05);
}

/*
 * The play glyph fades in on hover on a device with a pointer, and is always
 * visible on a touch screen, where there is no hover to trigger it and an
 * invisible affordance is no affordance.
 */
.ach-song__play {
	position: absolute;
	right: 9px;
	bottom: 9px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	color: #fff;
	background: var(--ach-accent);
	border-radius: 50%;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
	transform: translateY(6px);
	opacity: 0;
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.ach-song:hover .ach-song__play {
	opacity: 1;
	transform: translateY(0);
}

@media (hover: none) {
	.ach-song__play {
		opacity: 1;
		transform: none;
	}
}

.ach-song__b {
	padding: 10px 2px 0;
}

.ach-song__t {
	margin: 0 0 4px;
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1.35;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.ach-song__t a:hover {
	color: var(--ach-accent);
}

.ach-song__d {
	font-size: 0.74rem;
	opacity: 0.55;
}

.ach-more {
	margin-top: 36px;
	padding-top: 28px;
	border-top: 1px solid var(--ach-line-soft);
}

/* =========================================================================
   Wider screens
   ========================================================================= */

@media (min-width: 560px) {
	.ach-grid,
	.ach-strip__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ach-band__grid  { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ach-songs       { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 860px) {
	.ach-grid,
	.ach-strip__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.ach-band__grid  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.ach-songs       { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1120px) {
	.ach-grid        { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.ach-strip__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.ach-band__grid  { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.ach-songs       { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/*
 * The strip carries whatever number the settings say, and on a narrow screen
 * that can be far more rows than anyone wants above a footer. The extras are
 * hidden rather than removed so the same markup serves every width, and the
 * pictures are lazy, so a hidden card costs almost nothing.
 */
@media (max-width: 559px) {
	.ach-strip__grid > :nth-child(n + 13) { display: none; }
}

@media (min-width: 560px) and (max-width: 859px) {
	.ach-strip__grid > :nth-child(n + 19) { display: none; }
}

/* Respect a reader who has asked for less movement. */
@media (prefers-reduced-motion: reduce) {
	.ach * {
		transition: none !important;
	}
	.ach-card:hover,
	.ach-star:hover,
	.ach-pill:hover {
		transform: none;
	}
}
