/* song.html - song pages at /song/<slug> (v5.1) */
[hidden] { display: none !important; }

.sp { max-width: 640px; margin: 0 auto; padding: 20px 16px 56px; }
/* Holds the footer below the screen while the song loads, so it doesn't jump (audit PERF-06) */
.sp { min-height: 100vh; }
.sp-note { text-align: center; color: var(--muted2); padding: 40px 12px; font-size: 0.88rem; }
.sp-error { color: #fff; }
/* The song's live history in plain words, written into the page by build-seo-pages.js for
   search engines (audit SEO-03); js/song.js hides it once the full page draws */
.sp-summary { max-width: 560px; margin: 8px auto 0; font-size: 0.85rem; line-height: 1.55; color: var(--muted2); }
.sp-summary:empty { display: none; }

.sp-card { background: var(--bg3); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; margin-top: 12px; }
.sp-h2 { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); margin-bottom: 10px; }
.sp-sub { font-size: 0.8rem; color: var(--muted2); margin-bottom: 10px; }
.sp-never { font-size: 0.86rem; color: var(--muted); line-height: 1.6; }

/* Story strip */
.sp-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.sp-stat { background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.sp-stat b { display: block; font-size: 1.15rem; font-weight: 800; color: var(--text); line-height: 1.25; }
.sp-stat span { display: block; font-size: 0.64rem; color: var(--muted2); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }
.sp-stat small { display: block; margin-top: 3px; font-size: 0.74rem; color: var(--muted); line-height: 1.4; }
.sp-stat a { color: inherit; text-decoration: none; }
.sp-stat a:hover { text-decoration: underline; }

/* Plays by year */
.sp-years { display: flex; align-items: flex-end; gap: 2px; height: 110px; }
.sp-bar { flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; background: none; border: 0; padding: 0; cursor: pointer; }
.sp-yearpick { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 0.82rem; font-weight: 600; color: #fff; }
.sp-yearpick select { background: var(--bg); color: #fff; border: 1px solid #929292; border-radius: 8px; padding: 8px 10px; font-family: 'Poppins', sans-serif; font-size: 0.85rem; min-height: 40px; }
.sp-yearpick select:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sp-bar i { display: block; width: 100%; background: var(--red); border-radius: 2px 2px 0 0; min-height: 0; }
.sp-bar.none i { background: #2a2a2a; height: 2px !important; }
.sp-bar.top i { background: var(--gold); }
.sp-bar:hover i, .sp-bar:focus-visible i { filter: brightness(1.3); }
.sp-bar:focus-visible { outline: 1px solid var(--gold); }
.sp-axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 0.64rem; color: var(--muted2); }
.sp-yearnote { min-height: 1.4em; margin-top: 8px; font-size: 0.78rem; color: var(--muted); }

/* Lists */
.sp-line { font-size: 0.88rem; color: var(--text); line-height: 1.5; }
.sp-line + .sp-line { margin-top: 6px; }
.sp-line small { color: var(--muted2); font-size: 0.74rem; }
.sp-also { margin-top: 12px; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted2); font-weight: 700; }
.sp-also.sp-first { margin-top: 0; margin-bottom: 4px; }
.sp-rank { font-size: 1.5rem; font-weight: 900; color: var(--text); }
.sp-rank small { font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-left: 6px; }
.sp-podcast { display: inline-block; padding: 3px 0; margin-top: 5px; font-size: 0.84rem; font-weight: 600; color: var(--text); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sp-podcast:hover { text-decoration: underline; }

.sp-list { list-style: none; display: flex; flex-direction: column; }
.sp-row { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 0.84rem; }
.sp-list .sp-row:first-child { border-top: 0; }
.sp-date { flex: 0 0 92px; font-weight: 700; color: #fff; font-size: 0.8rem; }
.sp-where { flex: 1; min-width: 0; color: var(--muted); line-height: 1.4; }
.sp-where b { color: var(--text); font-weight: 600; }
.sp-where small { display: block; color: var(--muted2); font-size: 0.72rem; }
.sp-row a { display: inline-block; padding: 3px 0; color: var(--text); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; font-weight: 600; font-size: 0.78rem; white-space: nowrap; }
.sp-row a:hover { text-decoration: underline; }
.sp-more { margin-top: 10px; padding: 9px 16px; background: transparent; border: 1px solid rgba(204, 162, 60, 0.6); border-radius: 10px; color: var(--text); font-family: 'Poppins', sans-serif; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.sp-more:hover { background: rgba(204, 162, 60, 0.1); }

.sp-all summary { padding: 2px 0; cursor: pointer; color: var(--text); font-weight: 700; font-size: 0.86rem; }
.sp-all[open] summary { margin-bottom: 8px; }
/* Lyrics */
.sp-verse { white-space: pre-line; font-size: 0.92rem; line-height: 1.75; color: var(--text); }
.sp-verse + .sp-verse { margin-top: 1.1em; }
.sp-lyrics-note { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 0.74rem; color: var(--muted2); }
.sp-lyrics-note a, .sp-never a { color: var(--text); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; font-weight: 600; }
.sp-lyrics-note a:hover, .sp-never a:hover { text-decoration: underline; }

.sp-year-h { margin: 14px 0 2px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; color: #fff; }

.sp-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }
.sp-btn { display: inline-block; padding: 11px 20px; background: var(--red); border: 1px solid var(--red); border-radius: 10px; color: #fff; font-family: 'Poppins', sans-serif; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.sp-btn:hover { background: #a00d24; }
.sp-btn-alt { background: transparent; color: var(--text); border-color: rgba(204, 162, 60, 0.6); }
.sp-btn-alt:hover { background: rgba(204, 162, 60, 0.1); }
.sp-links, .sp-source { margin-top: 16px; text-align: center; font-size: 0.78rem; color: var(--muted2); line-height: 1.6; }
.sp-source { font-size: 0.7rem; }
/* Readable on phones: 12px or more (audit DEV-05) */
@media (max-width: 600px) { .sp-source { font-size: 0.8rem; } }
.sp-links a, .sp-source a { display: inline-block; padding: 4px 0; color: var(--text); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sp-links a:hover, .sp-source a:hover { text-decoration: underline; }

/* All-songs index */
.sp-filter { display: block; font-size: 0.82rem; font-weight: 600; color: #fff; margin: 14px 0 8px; }
.sp-input { width: 100%; padding: 13px 14px; background: #141414; border: 1px solid #929292; border-radius: 10px; color: #fff; font-family: 'Poppins', sans-serif; font-size: 1rem; }
.sp-input::placeholder { color: #929292; } /* Mid Grey, 5.9:1 (audit A11Y-17) */
.sp-input:focus { outline: 2px solid var(--gold); outline-offset: 2px; border-color: var(--gold); }
.sp-index { list-style: none; margin-top: 12px; }
.sp-index a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 0.9rem; font-weight: 600; }
.sp-index a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sp-index small { color: var(--muted2); font-weight: 400; font-size: 0.74rem; white-space: nowrap; align-self: center; }

@media (min-width: 520px) {
  .sp-stats { grid-template-columns: repeat(4, 1fr); }
}
