.artist-popularity {
    --artist-chart-ink: #263b32;
    --artist-chart-muted: #52665b;
    --artist-chart-border: #d7e4dc;
    margin: 0 0 2rem;
    padding: clamp(.85rem, 2.5vw, 1.65rem);
    border: 1px solid var(--artist-chart-border);
    border-radius: .75rem;
    background: #f7faf6;
    color: var(--artist-chart-ink);
}

.artist-popularity__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: .3rem 1rem;
    margin-bottom: .95rem;
}

.artist-popularity__header h2 {
    margin: 0;
    font-size: clamp(1.25rem, 2.5vw, 1.65rem);
    font-weight: 700;
    line-height: 1.2;
    text-transform: none;
}

.artist-popularity__header span,
.artist-plot__caption,
.artist-plot__hint,
.artist-plot__clip-meta {
    color: var(--artist-chart-muted);
    font-size: .86rem;
    line-height: 1.4;
}

.artist-plot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(10rem, 24%, 16rem);
    align-items: start;
    gap: .75rem clamp(.8rem, 2.2vw, 1.5rem);
    margin-bottom: .65rem;
}

.artist-plot__caption {
    margin: 0 0 .45rem;
    font-weight: 700;
}

.artist-plot__area {
    --plot-height: clamp(11.25rem, 21vw, 14rem);
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: .5rem;
}

.artist-plot__axis {
    position: relative;
    height: var(--plot-height);
    margin-top: .2rem;
}

.artist-plot__axis span,
.artist-plot__ticks span {
    position: absolute;
    color: var(--artist-chart-muted);
    font-size: .76rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.artist-plot__axis span {
    right: 0;
    transform: translateY(50%);
}

.artist-plot__scroll {
    overflow-x: auto;
    scrollbar-color: #9fb6a6 transparent;
    scrollbar-width: thin;
}

.artist-plot__frame {
    box-sizing: border-box;
    min-width: var(--plot-min);
    padding: .2rem .55rem .1rem;
}

.artist-plot__grid {
    position: relative;
    height: var(--plot-height);
    border-radius: .45rem;
    background:
        radial-gradient(ellipse at 90% 100%, #d7ead8 0%, transparent 68%),
        linear-gradient(180deg, #f8fbf8 0%, #ecf4ec 100%);
}

.artist-plot__line {
    position: absolute;
    inset-inline: 0;
    border-top: 1px solid #c9dbce;
    pointer-events: none;
}

.artist-plot__line:first-child {
    border-color: #92ae9b;
}

.artist-plot__separator {
    position: absolute;
    inset-block: 5%;
    border-left: 1px dashed #b9cbbd;
    pointer-events: none;
}

.artist-plot__trace {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    pointer-events: none;
}

.artist-plot__ticks {
    position: relative;
    min-height: 1.4rem;
    margin-top: .35rem;
}

.artist-plot__ticks span {
    transform: translateX(-50%);
}

.artist-plot__point {
    position: absolute;
    left: var(--point-left);
    bottom: var(--point-bottom);
    z-index: 1;
    display: grid;
    place-items: center;
    width: 1.35rem;
    height: 1.55rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    transform: translate(-50%, 50%);
    background: transparent;
    cursor: pointer;
}

.artist-plot__point::after {
    width: .68rem;
    height: .68rem;
    border: 1px solid #fff;
    border-radius: 50%;
    background: linear-gradient(140deg, #79ad69, #356c4c 72%);
    box-shadow: 0 1px 3px #264e3e42;
    content: "";
}

.artist-plot__point.is-active,
.artist-plot__point:hover,
.artist-plot__point:focus-visible {
    z-index: 2;
}

.artist-plot__point.is-active::after,
.artist-plot__point:hover::after,
.artist-plot__point:focus-visible::after {
    width: .8rem;
    height: .8rem;
    outline: 2px solid #5b9669;
    outline-offset: 2px;
}

.artist-plot__stem {
    position: absolute;
    bottom: 5%;
    width: .22rem;
    transform: translateX(-50%);
    border-radius: .15rem .15rem 0 0;
    background: linear-gradient(180deg, #70ac85, #b9d8bd);
    pointer-events: none;
}

.artist-plot__hint {
    margin: .25rem 0 0 2.5rem;
}

.artist-plot__scroll-help {
    color: #295e45;
    font-weight: 700;
}

.artist-plot__preview {
    min-width: 0;
    margin-top: 1.55rem;
    background: #fff;
    border: 1px solid var(--artist-chart-border);
    border-radius: .5rem;
}

.artist-plot__clip-list {
    max-height: 17rem;
    margin: 0;
    padding: .45rem;
    overflow-y: auto;
    list-style: none;
}

.artist-plot__clip {
    display: grid;
    gap: .45rem;
    padding: .25rem;
    border-radius: .35rem;
    color: var(--artist-chart-ink);
    text-decoration: none;
}

.artist-plot__clip:is(:hover, :focus-visible) {
    background: #eaf3ea;
}

.artist-plot__thumb {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: .33rem;
    background: #335043;
}

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

.artist-plot__thumb::before,
.artist-plot__thumb::after {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    content: "";
    pointer-events: none;
}

.artist-plot__thumb::before {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: #163024c7;
}

.artist-plot__thumb::after {
    margin-left: .08rem;
    border-block: .255rem solid transparent;
    border-inline-start: .4rem solid #fff;
}

.artist-plot__clip-name,
.artist-plot__clip-meta {
    display: block;
}

.artist-plot__clip-name {
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.artist-plot__clip-meta {
    margin-top: .15rem;
    font-size: .78rem;
}

.artist-plot__clip-list--multiple .artist-plot__clip {
    grid-template-columns: minmax(2.4rem, 35%) minmax(0, 1fr);
    align-items: center;
}

.artist-plot__clip-list--multiple li + li {
    border-top: 1px solid var(--artist-chart-border);
}

.artist-plot__preview-date {
    margin: .65rem .7rem 0;
    font-size: .83rem;
    font-weight: 700;
}

.artist-popularity__history {
    border-top: 1px solid var(--artist-chart-border);
}

.artist-popularity__history summary {
    display: list-item;
    padding: .75rem 0 .15rem;
    color: #295e45;
    font-weight: 700;
    cursor: pointer;
}

.artist-popularity__history[open] summary {
    margin-bottom: .7rem;
}

.artist-popularity__empty {
    margin: 0;
    color: var(--artist-chart-muted);
    font-size: .93rem;
}

@media (max-width: 720px) {
    .artist-plot {
        grid-template-columns: minmax(0, 1fr);
    }

    .artist-plot__preview {
        margin-top: 0;
        margin-left: 2.5rem;
    }

    .artist-plot__clip {
        grid-template-columns: minmax(2.8rem, 34%) minmax(0, 1fr);
        align-items: center;
    }
}

@media (max-width: 480px) {
    .artist-plot__area {
        grid-template-columns: 1.5rem minmax(0, 1fr);
    }

    .artist-plot__hint,
    .artist-plot__preview {
        margin-left: 2rem;
    }
}
