/* Pages outside the app (G31, G124): About, the Guide, What's new, the Chord
   Explorer, the artist pages and All songs. On top, the app's thin band, pinned:
   ← · the logo · ♡ Support (PAGE_BAR in scripts/lib/build_song_pages.py; the
   hand-written pages carry a copy, held to it by tests/test_page_bar.py; ← is
   docs/js/page-back.js). Under it, one column of prose in the app's colours,
   sections with ruled headings. Each page keeps only its own bits inline.
   Loaded after style.css (its tokens and the band's rules). */

html { scroll-padding-top: calc(48px + 1rem); }   /* an anchor lands below the pinned band */

body.doc-body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    margin: 0;
}

.page-topbar a { text-decoration: none; }
.page-topbar .topbar-right { margin-left: auto; }

.doc-page { max-width: 720px; margin: 0 auto; padding: 1.5rem 20px 3rem; }

.doc-page h1 { margin: 0 0 0.5rem 0; font-size: 2rem; }
.doc-intro { color: var(--text-secondary); font-size: 1.1rem; line-height: 1.6; margin: 0 0 1.5rem 0; }

.doc-page section { display: flow-root; margin-bottom: 2.5rem; }
.doc-page h2 {
    font-size: 1.35rem; margin: 0 0 0.75rem 0;
    border-bottom: 1px solid var(--border); padding-bottom: 0.5rem;
}
.doc-page h3 { font-size: 1.05rem; margin: 1.25rem 0 0.4rem 0; }
.doc-page p, .doc-page li { line-height: 1.7; color: var(--text-secondary); }
.doc-page p { margin: 0 0 0.75rem 0; }
.doc-page ul { margin: 0 0 0.75rem 0; padding-left: 1.25rem; }
.doc-page strong { color: var(--text); }
.doc-page a { color: var(--accent); }
.doc-page code {
    font-size: 0.9em; background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: 4px; padding: 0.05rem 0.35rem; color: var(--text); white-space: nowrap;
}

/* A control's name as the app shows it */
.doc-page .ui { color: var(--text); font-weight: 600; white-space: nowrap; }

/* "What you can't do (yet)" asides */
.doc-page .limits {
    border-left: 3px solid var(--border); padding: 0.25rem 0 0.25rem 0.9rem; margin: 0.75rem 0;
}
.doc-page .limits p { margin: 0; font-size: 0.95rem; }

.doc-footer { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 3rem; }

/* Artist pages (G70): /artists/{slug}/ and the A–Z at /artists/, written by
   scripts/lib/build_song_pages.py (render_artist_page, render_artists_index). */
.artist-facts { color: var(--text-secondary); margin: 0 0 1.5rem 0; }
.artist-facts a { color: var(--text-secondary); }
.artist-songs { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.artist-songs th {
    text-align: left; font-weight: 600; color: var(--text-secondary); font-size: 0.85rem;
    border-bottom: 1px solid var(--border); padding: 0 0.75rem 0.4rem 0;
}
.artist-songs td { padding: 0.45rem 0.75rem 0.45rem 0; border-bottom: 1px solid var(--border); vertical-align: baseline; }
.artist-songs td.n { color: var(--text-secondary); white-space: nowrap; font-variant-numeric: tabular-nums; }
.artist-songs td.yt a { color: var(--text-secondary); font-size: 0.85rem; }
.artist-songs td.v { padding-right: 0; }
/* "In the book": each link on a line of its own, never broken (their parts, Book version, + Credit) */
.artist-songs td.v a { display: block; white-space: nowrap; }
.artist-songs th:last-child { white-space: nowrap; }
.artist-songs td.v a.add { color: var(--text-secondary); font-size: 0.85rem; text-decoration: none; }
.artist-songs td.v a.add:hover { color: var(--accent); text-decoration: underline; }
.az-strip { display: flex; flex-wrap: wrap; gap: 0.15rem 0.6rem; margin: 0 0 1.5rem 0; font-weight: 600; }
.az-strip a { text-decoration: none; }
.doc-page .az-group h2 { font-size: 1.1rem; }
.az-group ul { list-style: none; padding: 0; columns: 2; column-gap: 2rem; }
.az-group li { break-inside: avoid; }
.az-group li a { color: var(--text); text-decoration: none; }
.az-group li a:hover { color: var(--accent); text-decoration: underline; }
.az-group li span { color: var(--text-secondary); font-variant-numeric: tabular-nums; margin-left: 0.35rem; font-size: 0.9rem; }


/* All songs A–Z (/songs/, render_all_songs): wider, the columns as many as fit */
.doc-page.all-songs { max-width: 960px; }
.all-songs .az-group ul { columns: 18rem; }
.all-songs .az-group li { padding: 0.1rem 0; }
.all-songs .by { color: var(--text-secondary); font-size: 0.85em; }

.artist-songs td.yt .yt-play { display: none; }

/* A phone: one column, and YouTube shrinks to the drawn play (the word stays, at no size, as the link's name) */
@media (max-width: 600px) {
    .az-group ul { columns: 1; }
    .artist-songs td.yt a { font-size: 0; }
    .artist-songs td.yt .yt-play { display: inline-block; width: 0.85rem; height: 0.85rem; }
}
