/* Temporary, unbranded layout. Visual identity will replace this file. */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* JS toggles visibility with the hidden attribute */
:root {
  --fg: #111; --muted: #666; --bg: #fff; --line: #ddd; --accent: #111; --danger: #b00020; --ok: #0a7a2f;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.5; color: var(--fg); background: var(--bg);
}
body { margin: 0; padding-bottom: 6rem; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; gap: 1.5rem; align-items: center; min-height: 3.5rem; flex-wrap: wrap; }
.site-header .brand { font-weight: 700; text-decoration: none; letter-spacing: .1em; }
.site-header nav { display: flex; gap: 1rem; }
main { padding: 1.5rem 0; }
h1 { margin-top: 0; }
.muted { color: var(--muted); }
.error { color: var(--danger); }
.success { color: var(--ok); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

button, .button { font: inherit; padding: .45rem .9rem; border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 4px; cursor: pointer; text-decoration: none; display: inline-block; }
button.secondary { background: transparent; color: var(--accent); }
button.danger { background: var(--danger); border-color: var(--danger); }
button:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea { font: inherit; padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 4px; width: 100%; background: #fff; }
textarea { min-height: 8rem; resize: vertical; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .2rem; }
.field { margin-bottom: 1rem; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }

/* Catalogue */
.filters { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); align-items: end; margin-bottom: 1.5rem; }
.filters .field { margin: 0; }
.beat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.beat-card { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.beat-card .cover, .cover-placeholder { aspect-ratio: 1; width: 100%; object-fit: cover; background: #eee; }
.beat-card .body { padding: .75rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.beat-card h2 { font-size: 1.05rem; margin: 0; }
.beat-meta { font-size: .85rem; color: var(--muted); }
.beat-card .actions { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.play-button[aria-pressed="true"] { background: #fff; color: var(--accent); }
.load-more { margin: 1.5rem auto; display: block; }

/* Beat page */
.beat-page { display: grid; gap: 2rem; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); }
@media (max-width: 700px) { .beat-page { grid-template-columns: 1fr; } }
.beat-details dl { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; }
.beat-details dt { font-weight: 600; }
.beat-details dd { margin: 0; }
.beat-description { white-space: pre-line; }
.licences { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.licence { border: 1px solid var(--line); border-radius: 6px; padding: 1rem; display: flex; flex-direction: column; }
.licence h3 { margin: 0; }
.licence-price { font-size: 1.4rem; font-weight: 700; margin: .25rem 0; }
.licence-terms { font-size: .85rem; color: var(--muted); }
.licence .buy-button { margin-top: auto; }

/* Player bar */
.player-bar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: .6rem 1rem; display: flex; gap: 1rem; align-items: center; z-index: 10; }
.player-bar[hidden] { display: none; }
.player-bar .title { min-width: 8rem; max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.player-bar input[type="range"] { flex: 1; padding: 0; border: 0; }
.player-bar .time { font-variant-numeric: tabular-nums; font-size: .85rem; color: var(--muted); white-space: nowrap; }

/* Admin */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap { overflow-x: auto; }
.row-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.badge { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .8rem; border: 1px solid var(--line); }
.badge.published { border-color: var(--ok); color: var(--ok); }
fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 1.5rem; padding: 1rem; }
legend { font-weight: 700; padding: 0 .4rem; }
.upload-row { display: grid; gap: .5rem; grid-template-columns: 9rem 1fr; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); }
@media (max-width: 600px) { .upload-row { grid-template-columns: 1fr; } }
progress { width: 100%; }
.thumb { width: 6rem; height: 6rem; object-fit: cover; }
.enquiry-message { white-space: pre-wrap; }
