/* =====================================================================
   Base: fonts, reset, typography, accessibility helpers
   ===================================================================== */
@font-face { font-family: 'Poppins'; font-weight: 300; font-display: swap; src: url('../fonts/poppins-light-webfont.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 400; font-display: swap; src: url('../fonts/poppins-regular-webfont.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 500; font-display: swap; src: url('../fonts/poppins-medium-webfont.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 600; font-display: swap; src: url('../fonts/poppins-semibold-webfont.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 700; font-display: swap; src: url('../fonts/poppins-bold-webfont.woff2') format('woff2'); }
@font-face { font-family: 'Josefin Sans'; font-weight: 600; font-display: swap; src: url('../fonts/JosefinSans-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Josefin Sans'; font-weight: 700; font-display: swap; src: url('../fonts/JosefinSans-Bold.woff2') format('woff2'); }

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -100px;
  z-index: 1000;
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus { top: var(--space-2); }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Text for screen readers only */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* A song's title in any list opens its page (Creator-Studio1); the row around it still plays */
.song-link { color: inherit; text-decoration: none; }
.song-link:hover { color: var(--color-link-hover); text-decoration: underline; text-underline-offset: 2px; }
/* Artist names under a song title: each opens its page, in the line's own colour */
.pl-song__info span a, .sh-xp__t small a, .qtile__t small a, .ftile small a, .pgp-song__info small a { color: inherit; text-decoration: none; }
.pl-song__info span a:hover, .sh-xp__t small a:hover, .qtile__t small a:hover, .ftile small a:hover, .pgp-song__info small a:hover { color: var(--color-link-hover); text-decoration: underline; }

/* The site's tooltip (#308, Rohit): data-tip on any control — a small dark bubble with an arrow, above it (below when
   there's no room), on hover and keyboard focus (app.js) */
.tip { position: fixed; z-index: 2000; max-width: 260px; padding: 6px 10px; border-radius: 8px; background: var(--tg-900); color: #fff; font-size: 12px; font-weight: 500; line-height: 1.4;
  text-align: center; box-shadow: 0 6px 18px rgb(var(--teal-900-rgb) / .22); pointer-events: none; opacity: 0; transform: translateY(3px); transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.tip.is-below { transform: translateY(-3px); }
/* ⓘ beside a name that isn't a page to visit (#313, app.infoTip): its text in the tooltip, on hover, focus or a tap */
.info-tip { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: 2px; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; opacity: .75; cursor: help; vertical-align: middle; }
.info-tip:hover, .info-tip:focus-visible { opacity: 1; }
.info-tip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tip.is-on { opacity: 1; transform: none; }
.tip::after { content: ""; position: absolute; left: var(--arrow, 50%); top: 100%; width: 0; height: 0; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--tg-900); }
.tip.is-below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--tg-900); }
@media (prefers-reduced-motion: reduce) { .tip { transition: none; } }

/* #309 (Rohit): Explicit content, marked wherever a song or album shows — the stores' convention: a small "E" beside the title in
   lists and on cards, the word "Explicit" on its own page. One muted wine red (--explicit), never the error red. app.explicitTag(on, full) */
.ex-tag { display: inline-grid; flex: none; place-items: center; min-width: 16px; height: 16px; padding: 0 3px; border: 1px solid var(--explicit-border); border-radius: 4px; background: var(--explicit-soft); color: var(--explicit); font-family: var(--font-body); font-size: 10px; font-weight: 700; font-style: normal; line-height: 1; letter-spacing: 0; vertical-align: 1px; text-transform: none; }
.ex-tag--full { height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }
.ex-tag + .ex-sep { margin: 0 4px; }
.ex-tag { margin-right: 5px; }
.ex-tag:last-child { margin: 0 0 0 6px; }                 /* after a title */
.ex-tag:only-child { margin: 0; }
/* a title with its E (app.songTitle): the title shortens with …, the E stays in view */
.song-t { display: inline-flex; align-items: center; max-width: 100%; min-width: 0; vertical-align: top; }
.song-t > a, .song-t > span:not(.ex-tag) { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* #309 (Rohit): what the Starter Kit is promoting — a small gold star in the corner of its card in MuSlate's general sliders (the
   Home banner, Trending, New Releases, albums, artists), never on its own page. app.promoStar(x) */
.promo-star { position: absolute; z-index: 3; top: 6px; left: 6px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgb(16 38 45 / .28); pointer-events: auto; }
.promo-star svg { width: 13px; height: 13px; fill: var(--warn); stroke: #d48806; stroke-width: 1; stroke-linejoin: round; }
.sh-card--round .promo-star { top: 8%; left: 8%; }
.chart__art .promo-star, .srow__art .promo-star { top: 3px; left: 3px; width: 18px; height: 18px; }
.chart__art .promo-star svg, .srow__art .promo-star svg { width: 11px; height: 11px; }
.hero__art .promo-star { top: 10px; left: 10px; width: 28px; height: 28px; }
.hero__art .promo-star svg { width: 16px; height: 16px; }

/* #309 audit: on phones an artist's name under a title (the mini player, Home's rows and charts) is a finger-sized target — inline
   padding grows the tap area without moving a thing (they were 12px tall) */
@media (max-width: 767px) {
  .mp__artists a, .srow__t small a, .chart__t small a, .qtile__t small a { padding: 5px 0; }   /* inline: the line still ends in … when cut */
}

/* #313 (Rohit: "why does the title look different on an explicit track"): .song-t only holds the title and its E
   together so the E stays in view while the title shortens. It must never change the type — a list's own
   "span { font-size: 12px }" was landing on it and taking the title down with it. :not(._) outranks that. */
.song-t:not(._) { font: inherit; color: inherit; letter-spacing: inherit; }
.song-t:not(._) > a, .song-t:not(._) > span:not(.ex-tag) { font: inherit; color: inherit; }

/* ---- Default covers (#313, Rohit) ----------------------------------------------------------------
   A piece of music with no picture of its own gets the mark for its kind: a music note for a song, a
   record for an album, a list for a playlist, stacked sleeves for a compilation. The tile around it
   belongs to the place it sits in (card, hero, player), so only the mark itself is set here — and it
   is set a little smaller for the record and the sleeves, which read heavier than the note. */
.art-mark { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.art-mark--album, .art-mark--compilation { width: 30%; height: 30%; }
.sp-art__empty .art-mark--album, .sp-art__empty .art-mark--compilation { width: 56px; height: 56px; }
