/* Pulse - SmartStream website theme (templates/sites/pulse.html). --accent comes from the page. */
:root {
  --bg: #0b0d14; --bg2: #11141e; --card: rgba(255,255,255,.045); --card-solid: #141824; --line: rgba(255,255,255,.09);
  --text: #eef1f8; --muted: #9aa3b8; --shadow: 0 20px 50px rgba(0,0,0,.35);
  --radius: 18px; --wrap: 1120px; color-scheme: dark;
}
[data-style="light"] {
  --bg: #f6f7fb; --bg2: #ffffff; --card: #ffffff; --card-solid: #ffffff; --line: rgba(17,24,39,.09);
  --text: #111827; --muted: #5b6475; --shadow: 0 18px 40px rgba(17,24,39,.09); color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* sections and buttons with their own display rule */
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.01em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 12px 22px; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn-accent:hover { box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 60%, transparent); }
.btn-accent svg { fill: currentColor; stroke: none; }
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom: 1px solid transparent; transition: border-color .2s, background .2s; }
.top.scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); }
.top-in { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; font-size: 17px; min-width: 0; }
.brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand img, .brand-initial { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; flex: none; }
.brand-initial { display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { color: var(--text); background: var(--card); }
.top-cta { margin-left: 4px; }
.nav-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; width: 42px; height: 42px; place-items: center; cursor: pointer; }

/* hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 84px; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(900px 420px at 15% 0%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 70%),
              radial-gradient(700px 380px at 95% 30%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), var(--bg); }
.hero.has-image .hero-bg { background: linear-gradient(180deg, rgba(5,7,12,.55), rgba(5,7,12,.82)), var(--hero) center / cover no-repeat; }
.hero.has-image { color: #fff; --muted: rgba(255,255,255,.78); }
.hero-bg::after { content: ""; position: absolute; inset: auto 0 0 0; height: 120px; background: linear-gradient(transparent, var(--bg)); }
.hero-in { display: flex; align-items: center; gap: 44px; }
.hero-logo { width: 168px; height: 168px; border-radius: 32px; object-fit: cover; flex: none; box-shadow: var(--shadow), 0 0 0 1px var(--line); background: var(--card-solid); }
.hero-initial { display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #000)); color: #fff; font-size: 72px; font-weight: 800; }
.hero-text { min-width: 0; }
.hero h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 800; margin: 14px 0 8px; }
.tagline { font-size: clamp(17px, 2.2vw, 21px); color: var(--muted); margin: 0 0 10px; max-width: 640px; }
.np { margin: 0 0 22px; font-size: 15px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np b { color: inherit; font-weight: 650; }
.hero.has-image .np b, .hero .np b { color: var(--text); }
.hero.has-image .np b { color: #fff; }
.np-label { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--accent); margin-right: 4px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; background: color-mix(in srgb, #ef4444 16%, transparent); color: #fca5a5; border: 1px solid rgba(239,68,68,.4); }
[data-style="light"] .hero:not(.has-image) .badge { color: #b91c1c; }
.badge i { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 0 rgba(239,68,68,.6); animation: pulse 1.8s infinite; }
.badge.off { background: var(--card); color: var(--muted); border-color: var(--line); }
.badge.off i { background: var(--muted); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.55); } 70% { box-shadow: 0 0 0 9px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }

/* content */
.main { display: flex; flex-direction: column; gap: 28px; padding-bottom: 64px; margin-top: -36px; position: relative; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
[data-style="dark"] .card { backdrop-filter: blur(6px); }
.listen { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.listen.solo { grid-template-columns: 1fr; }
.player-card { padding: 14px; overflow: hidden; background: #151821; }   /* = the player's backgroundcolor (panel/sites.py) */
[data-style="light"] .player-card { background: #ffffff; }
.player-head { display: flex; flex-direction: column; padding: 6px 8px 12px; }
.player-head b { font-size: 18px; }
.eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
#player { display: block; width: 100%; border: 0; border-radius: 12px; background: transparent; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.recent-card { padding: 22px 22px 14px; }
.recent-card h2, .block h2 { font-size: 20px; margin-bottom: 14px; }
.recent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.recent li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); min-width: 0; }
.recent li:first-child { border-top: 0; }
.recent .art { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: color-mix(in srgb, var(--accent) 18%, var(--card-solid)); display: grid; place-items: center; color: var(--accent); font-weight: 800; }
.recent .meta { min-width: 0; flex: 1; }
.recent .meta b, .recent .meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent .meta b { font-size: 15px; font-weight: 650; }
.recent .meta span { font-size: 13px; color: var(--muted); }
.recent time { font-size: 12px; color: var(--muted); flex: none; }

.recent li.pick { cursor: pointer; border-radius: 10px; margin: 0 -8px; padding-left: 8px; padding-right: 8px; transition: background .15s; }
.recent li.pick:hover, .recent li.pick:focus-visible { background: color-mix(in srgb, var(--accent) 9%, transparent); outline: none; }
.recent li.pick + li { border-top-color: var(--line); }

/* About the artist (pulse.js fills it from /artist.json) */
.artist { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; }
.artist.no-photo { grid-template-columns: 1fr; }
.artist-photo { border-radius: 16px; overflow: hidden; aspect-ratio: 1; background: var(--card-solid); box-shadow: var(--shadow); }
.artist-photo img { width: 100%; height: 100%; object-fit: cover; }
.artist-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.artist h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 6px 0 4px; }
.artist-aka { margin: 0 0 8px; color: var(--muted); font-size: 14px; font-style: italic; }
.artist-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 12px 0 14px; }
.artist-facts dt { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.artist-facts dd { margin: 2px 0 0; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); text-transform: capitalize; }
.chip-ghost { background: var(--card); border-color: var(--line); text-transform: none; }
.artist-bio { margin-top: 18px; }
.bio-text p { margin: 0 0 12px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.bio-text p:last-child { margin-bottom: 0; }
.bio-text.collapsed { max-height: 11.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.bio-more { margin-top: 8px; background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; }
.bio-more:hover { text-decoration: underline; }
.bio-credit { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.bio-credit a { color: inherit; }
.artist-similar { margin-top: 20px; }
.artist-similar h3 { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.artist-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.artist-links:empty { display: none; }

.block { padding: 28px; }
.block-title { font-size: 24px; margin-bottom: 16px; }
#stations { padding: 0; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.st-card { display: flex; flex-direction: column; padding: 16px; gap: 12px; transition: border-color .2s, transform .2s; }
.st-card:hover { transform: translateY(-2px); }
.st-card.on { border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent); }
.st-art { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #000)); display: grid; place-items: center; color: #fff; font-size: 54px; font-weight: 800; }
.st-art img { width: 100%; height: 100%; object-fit: cover; }
.st-body h3 { font-size: 18px; }
.st-genre { margin: 4px 0 0; font-size: 13px; color: var(--accent); font-weight: 650; }
.st-np { margin: 6px 0 0; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-play { align-self: flex-start; }

.listen-anywhere { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.listen-anywhere p { margin: 0; max-width: 520px; }
.la-links { display: flex; gap: 10px; flex-wrap: wrap; }
.about p { margin: 0 0 14px; max-width: 760px; color: var(--muted); font-size: 17px; }
.about p:last-child { margin-bottom: 0; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 30px 0 40px; color: var(--muted); font-size: 14px; }
.foot-in { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.foot p { margin: 0; }
.foot a { color: var(--text); }
.socials { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.socials a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--text); transition: border-color .2s, color .2s; }
.socials a:hover { border-color: var(--accent); color: var(--accent); }
.socials svg { width: 20px; height: 20px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--card-solid); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 60; }

@media (max-width: 900px) {
  .listen { grid-template-columns: 1fr; }
  .artist { grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
  .hero-in { gap: 28px; }
  .hero-logo { width: 128px; height: 128px; border-radius: 26px; }
  .hero-initial { font-size: 54px; }
}
@media (max-width: 720px) {
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; padding: 10px 16px 16px; background: var(--bg2); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
  .nav-btn { display: grid; }
  .top-cta { display: none; }
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0 64px; }
  .hero-in { flex-direction: column; align-items: flex-start; }
  .hero-logo { width: 104px; height: 104px; border-radius: 22px; }
  .hero-initial { font-size: 44px; }
  .block { padding: 22px 18px; }
  .recent-card { padding: 18px 16px 10px; }
  .listen-anywhere { flex-direction: column; align-items: flex-start; }
  .la-links .btn { flex: 1 1 auto; justify-content: center; }
  .st-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .artist { grid-template-columns: 1fr; gap: 18px; }
  .artist-photo { max-width: 240px; }
  .st-card { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
