/* BellaMP3 — editorial / record-shelf look: paper + ink + acid lime, big serif type, hard borders, cover-art mosaic. */
:root {
  --bg: #1d1d21; --panel: #27272c; --panel2: #34343a; --line: #f2f2f2;
  --text: #f4f4f4; --muted: #b8b8b8; --accent: #d4ff1a; --accent2: #d4ff1a; --on-accent: #0a0a0a;
  --hot: #ff5a2d; --up: #6fe3a4; --down: #ff8a75; --new: #d4ff1a;
  --shadow: 4px 4px 0 #d4ff1a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1d1d21; --panel: #27272c; --panel2: #34343a; --line: #f2f2f2;
    --text: #f4f4f4; --muted: #b8b8b8; --accent: #d4ff1a; --accent2: #d4ff1a; --on-accent: #141414;
    --hot: #ff6a3d; --up: #6fe3a4; --down: #ff8a75; --new: #d4ff1a;
    --shadow: 4px 4px 0 #d4ff1a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 2px solid var(--line); }
.top-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-style: italic; font-weight: 800; font-size: 28px; letter-spacing: -.03em; }
.logo { display: grid; place-items: center; width: 30px; height: 30px; background: var(--accent); color: var(--on-accent); border: 2px solid var(--line); border-radius: 50%; font-style: normal; font-size: 10px; padding-inline-start: 2px; }
.regions { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; order: 5; flex: 1 0 100%; padding-bottom: 8px; }
.regions a { padding: 4px 12px; border: 2px solid transparent; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.regions a:hover { border-color: var(--line); }
.regions a[aria-current] { background: var(--accent); color: var(--on-accent); border-color: var(--line); }
/* language menu */
.langs { position: relative; }
.langs summary { list-style: none; cursor: pointer; padding: 6px 14px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; border: 2px solid var(--line); background: var(--panel); }
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: "▾"; margin-inline-start: 8px; }
.langs summary:hover, .langs[open] summary { background: var(--accent); color: var(--on-accent); }
.langs ul { position: absolute; z-index: 30; inset-inline-end: 0; top: calc(100% + 8px); width: min(600px, calc(100vw - 48px)); max-height: 70vh; overflow-y: auto; margin: 0; padding: 8px; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 2px; background: var(--panel); border: 2px solid var(--line); box-shadow: var(--shadow); }
.langs li a { display: block; padding: 7px 10px; font-size: 14px; }
.langs li a:hover { background: var(--panel2); }
.langs li a[aria-current] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.search { position: relative; margin-inline-start: auto; flex: 0 1 320px; min-width: 0; }
.search input { width: 100%; height: 42px; padding: 0 14px 0 42px; color: var(--text); font: inherit; font-size: 15px; background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23888' stroke-width='1.8'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E") no-repeat 14px 50%; border: 2px solid var(--line); border-radius: 0; outline: none; }
.search input::placeholder { color: var(--muted); }
.search input:focus { box-shadow: var(--shadow); }
.results { position: absolute; z-index: 20; top: calc(100% + 8px); inset-inline-end: 0; width: min(440px, calc(100vw - 48px)); margin: 0; padding: 6px; list-style: none; background: var(--panel); border: 2px solid var(--line); box-shadow: var(--shadow); }
.results a { display: flex; gap: 12px; align-items: center; padding: 6px; }
.results a:hover, .results a.on { background: var(--accent); color: var(--on-accent); }
.results img { width: 44px; height: 44px; object-fit: cover; flex: none; }
.results span { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.results b, .results small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.results small, .results .none { color: var(--muted); font-size: 13px; }
.results a:hover small, .results a.on small { color: inherit; }
.results .none { padding: 10px; }
@media (max-width: 640px) { .search { flex: 1 0 100%; order: 3; margin-inline-start: 0; } .langs { margin-inline-start: auto; } .brand { font-size: 24px; } }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1fr; gap: 32px; padding: 44px 0 32px; }
.eyebrow { display: inline-block; margin: 0; padding: 3px 10px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 14px 0 14px; font-family: var(--serif); font-weight: 800; font-size: clamp(38px, 7vw, 76px); line-height: .98; letter-spacing: -.035em; overflow-wrap: anywhere; hyphens: auto; }
.hero-text { min-width: 0; }
.hero h1 { font-size: clamp(54px, 9vw, 120px); font-style: italic; }
.hero h1::after { content: ""; display: block; width: 92px; height: 10px; margin-top: 18px; background: var(--accent); border: 2px solid var(--line); }
.sub { margin: 0; max-width: 34em; color: var(--muted); font-size: 17px; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border: 2px solid var(--line); box-shadow: 8px 8px 0 #d4ff1a; overflow: hidden; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .player { box-shadow: 8px 8px 0 var(--accent); } }
.yt-facade { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-facade i { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; border: 3px solid #000; background: var(--accent); transition: transform .15s; }
.yt-facade i::after { content: ""; position: absolute; left: 30px; top: 23px; border-style: solid; border-width: 13px 0 13px 21px; border-color: transparent transparent transparent #000; }
.yt-facade:hover i, .yt-facade:focus-visible i { transform: scale(1.1) rotate(-6deg); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.np { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 22px 2px 0; }
.np-label { width: 100%; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .2em; }
.np strong { font-family: var(--serif); font-weight: 800; font-size: 26px; letter-spacing: -.01em; }
.np #np-artist { color: var(--muted); font-size: 17px; }
.btn { margin-inline-start: auto; display: inline-block; padding: 10px 20px; background: var(--accent); color: var(--on-accent); border: 2px solid var(--accent); box-shadow: 3px 3px 0 #f4f4f4; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; transition: transform .1s, box-shadow .1s; }
.btn:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn { box-shadow: 3px 3px 0 var(--text); } }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1fr 1.1fr; align-items: center; gap: 56px; padding-top: 64px; }
}

/* ---------- chart: a mosaic of cover art ---------- */
.sect-h { margin: 40px 0 14px; font-family: var(--serif); font-style: italic; font-weight: 800; font-size: 30px; }
.chart { list-style: none; margin: 18px 0 64px; padding: 26px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 34px 20px; border-top: 2px solid var(--line); }
.row { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "th th" "info info" "vw wk"; align-content: start; gap: 6px 10px; }
.th { grid-area: th; position: relative; display: block; width: 100%; padding: 0; border: 2px solid var(--line); background: var(--panel2); overflow: hidden; cursor: pointer; aspect-ratio: 1; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.th i { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-style: normal; font-size: 0; background: rgba(0, 0, 0, .42); opacity: 0; transition: opacity .15s; }
.th i::before { content: "▶"; display: grid; place-items: center; width: 46px; height: 46px; padding-inline-start: 3px; border-radius: 50%; background: rgba(0, 0, 0, .35); border: 2px solid rgba(255, 255, 255, .85); color: #fff; font-size: 17px; backdrop-filter: blur(2px); }
.row.active .th { background: var(--panel2); }
.row.active .th i::before { background: var(--accent); border-color: var(--accent); color: #0a0a0a; }
.row:hover .th { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #d4ff1a; }
.th:hover i, .th:focus-visible i, .row.active .th i { opacity: 1; }
.row.active .th { background: var(--accent); border-color: var(--accent); box-shadow: 6px 6px 0 #f4f4f4; }
/* big outlined rank number sitting on the corner of the cover */
.rk { position: absolute; z-index: 2; top: -16px; inset-inline-start: -8px; pointer-events: none; font-family: var(--serif); font-weight: 900; font-style: italic; font-size: 64px; line-height: 1; letter-spacing: -.04em; color: var(--accent); -webkit-text-stroke: 2px var(--line); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--line); }
.tr { position: absolute; z-index: 2; top: 8px; inset-inline-end: 8px; padding: 1px 7px; font-size: 11px; font-weight: 800; background: var(--bg); color: var(--text); border: 2px solid var(--line); font-variant-numeric: tabular-nums; }
.tr.up { color: var(--up); } .tr.down { color: var(--down); } .tr.same { display: none; } .tr.new { background: var(--hot); color: #0a0a0a; border-color: var(--hot); }
.info { grid-area: info; min-width: 0; display: flex; flex-direction: column; margin-top: 8px; }
.ti { font-family: var(--serif); font-size: 19px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ti:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ar { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vw { grid-area: vw; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.vw small { color: var(--muted); font-size: inherit; font-weight: 700; }
.wk { grid-area: wk; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-align: end; }
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .chart { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 14px; }
  .rk { font-size: 50px; top: -12px; }
  .hero h1 { font-size: clamp(48px, 16vw, 80px); }
}

/* ---------- posts ---------- */
.post { padding: 36px 0 64px; max-width: 840px; }
.post-grid { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 0 40px; align-items: start; }
.post-grid .post { max-width: none; min-width: 0; }
/* sticky sidebar, NO inner scroll: assets/app.js sets `top` so a list taller than the screen first moves with the page until its end is in view, then it stays pinned */
.side { position: sticky; top: 84px; margin-top: 36px; padding: 0 8px 8px 0; }
.side .card { margin: 0; padding: 18px; }
.side .card h2 { font-size: 22px; margin-bottom: 12px; }
.side .mini { grid-template-columns: minmax(0, 1fr); }
.side .mini a { min-width: 0; }
@media (max-width: 900px) { .post-grid { display: block; } .side { position: static; margin-top: 0; padding: 0 0 48px; } }
.crumbs { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: "/"; margin: 0 8px; opacity: .6; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs [aria-current] { color: var(--text); overflow-wrap: anywhere; }
.page h2 { margin: 36px 0 10px; font-family: var(--serif); font-weight: 800; font-size: 28px; }
.page h3 { margin: 22px 0 6px; font-size: 17px; }
.page ul, .page .steps { padding-inline-start: 22px; }
.page li { margin: 6px 0; }
.updated { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.notfound { padding: 72px 0 96px; }
.post h1 { font-size: clamp(36px, 6vw, 62px); }
.by { display: block; color: var(--muted); font-family: var(--serif); font-style: italic; font-size: .42em; font-weight: 600; letter-spacing: 0; margin-top: 10px; }
.converter { margin: 26px 0 0; background: #262626; border: 2px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.converter iframe { display: block; width: 100%; height: var(--dh, 700px); margin-top: var(--dm, -238px); border: 0; color-scheme: dark; }
.converter { height: 462px; }
@media (max-width: 600px) { .converter iframe { height: var(--mh, 740px); margin-top: var(--mm, -268px); } .converter { height: 475px; } }
.yt-link { margin: 14px 0 0; } .yt-link .btn { margin: 0; background: var(--panel); color: var(--text); box-shadow: 3px 3px 0 var(--line); }
.text { margin: 24px 0; font-size: 17px; } .text p { margin: 0 0 12px; }
.card { margin: 28px 0; padding: 24px; background: var(--panel); border: 2px solid var(--line); box-shadow: var(--shadow); }
.card h2 { margin: 0 0 16px; font-family: var(--serif); font-style: italic; font-weight: 800; font-size: 26px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0; border: 2px solid var(--line); }
.stat { padding: 12px 14px; border-inline-end: 2px solid var(--line); }
.stat:last-child { border-inline-end: 0; }
.stat span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.stat strong { font-family: var(--serif); font-weight: 900; font-size: 34px; line-height: 1.1; }
.spark { width: 100%; max-width: 420px; height: 70px; margin-top: 14px; } .spark path { stroke: var(--text); stroke-width: 2; } .spark circle { fill: var(--accent); stroke: var(--line); stroke-width: 1.5; }
details { margin-top: 14px; } summary { cursor: pointer; font-size: 14px; font-weight: 700; }
table { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 6px 8px; text-align: start; border-bottom: 1px solid var(--line); } th { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.mini { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.mini a { display: flex; gap: 12px; align-items: center; padding: 8px; border: 2px solid transparent; background: var(--panel2); }
.mini a:hover { border-color: var(--line); background: var(--accent); color: var(--on-accent); }
.mini img { width: 56px; height: 56px; flex: none; object-fit: cover; border: 2px solid var(--line); }
.mini span { min-width: 0; display: flex; flex-direction: column; } .mini b, .mini small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mini small { color: var(--muted); } .mini a:hover small { color: inherit; }

/* ---------- footer / consent ---------- */
.foot { margin-top: 32px; padding: 28px 24px 56px; color: var(--muted); font-size: 13px; border-top: 2px solid var(--line); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 14px; }
.foot-nav a, .linklike { color: var(--text); font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.foot-nav a:hover, .linklike:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.linklike { padding: 0; border: 0; background: none; cursor: pointer; }
.btn.ghost { background: var(--panel); color: var(--text); }
button.btn { font-family: inherit; cursor: pointer; margin-inline-start: 0; }
.consent { position: fixed; z-index: 50; left: 16px; right: 16px; bottom: 16px; max-width: 780px; margin: 0 auto; padding: 16px 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; background: var(--panel); color: var(--text); border: 2px solid var(--line); box-shadow: var(--shadow); }
.consent[hidden] { display: none; }
.consent p { flex: 1 1 320px; margin: 0; font-size: 14px; color: var(--muted); }
.consent p a { color: var(--text); text-decoration: underline; }
.consent-btns { display: flex; flex-wrap: wrap; gap: 10px; }
:focus-visible { outline: 3px solid var(--hot); outline-offset: 2px; }

/* right-to-left languages */
[dir="rtl"] .crumbs li + li::before { content: "\\"; }
[dir="rtl"] .search input { padding: 0 42px 0 14px; background-position: calc(100% - 14px) 50%; }
[dir="rtl"] .rk { inset-inline-start: auto; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 16px; }
.actions .yt-link { margin: 0; }
.share { display: flex; gap: 8px; }
.sh { display: grid; place-items: center; width: 40px; height: 40px; color: var(--text); background: var(--panel); border: 2px solid var(--line); }
.sh:hover { background: var(--accent); color: var(--on-accent); }
.post > .share, .post > .actions { margin: 16px 0 14px; }

/* home intro + footer blurb */
.intro p { margin: 0 0 12px; color: var(--muted); max-width: 46em; }
.intro p:last-child { margin-bottom: 0; }
.blurb { margin: 0 0 16px; max-width: 42em; }
.blurb strong { color: var(--text); font-family: var(--serif); font-style: italic; font-size: 17px; }

/* most played by the artist */
.toplist ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.toplist li a { display: grid; grid-template-columns: 30px 48px 1fr auto; align-items: center; gap: 14px; padding: 8px 12px 8px 4px; border: 2px solid transparent; background: var(--panel2); }
.toplist li a:hover { border-color: var(--line); }
.toplist li.now a { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel2)); }
.toplist li.now small { color: var(--text); }
.toplist .n { font-family: var(--serif); font-style: italic; font-weight: 900; font-size: 22px; text-align: center; color: var(--accent); }
.toplist img { width: 48px; height: 48px; object-fit: cover; border: 2px solid var(--line); }
.toplist .tt { min-width: 0; display: flex; flex-direction: column; }
.toplist .tt b, .toplist .tt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toplist .tt small { color: var(--muted); }
.toplist .pl { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: end; }
.toplist .pl small { color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 10px; }
@media (max-width: 560px) { .toplist li a { grid-template-columns: 24px 44px 1fr; } .toplist .pl { display: none; } }

/* artist top list inside the sticky sidebar: roomy rows (scrolls inside the sidebar when taller than the screen) */
.side .toplist { padding: 20px; }
.side .toplist h2 { font-size: 26px; margin-bottom: 14px; }
.side .toplist ol { gap: 8px; }
.side .toplist li a { position: relative; grid-template-columns: 28px 60px minmax(0, 1fr); gap: 0 14px; padding: 8px 12px 8px 4px; }
.side .toplist .n { font-size: 24px; }
.side .toplist img { width: 60px; height: 60px; }
.side .toplist .tt { padding-inline-end: 64px; }
.side .toplist .tt b { font-size: 17px; line-height: 1.25; }
.side .toplist .tt small { font-size: 14px; }
.side .toplist .pl { position: absolute; top: 10px; inset-inline-end: 12px; margin: 0; font-size: 13px; }
.side .toplist .pl small { display: none; }
@media (max-width: 900px) { .side .toplist .tt { padding-inline-end: 64px; } }
