:root {
  --ink: #333;
  --night: #272a33;      /* header + track bars */
  --night-2: #3a3d47;    /* player area */
  --gold: #ffff1c;       /* current page in the menu */
  --blue: #0b4a8b;       /* download buttons */
  --blue-hover: #1660ad;
  --link: #2f78b5;
  --paper: #ebebeb;      /* grey sections */
  --muted: #8a8a8a;
  --ok: #2e7d32;
  --bad: #b3261e;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  margin: 0;
  font: 16px/1.55 Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
}
a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; }
.small { font-size: .875rem; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 6px 10px; z-index: 10; }

/* ---------- Header ---------- */
.site-header {
  background: var(--night);
  color: #fff;
  text-align: center;
  padding: 22px 12px 0;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: #fff; text-decoration: none;
  font-size: 2rem; font-weight: 700; letter-spacing: -.01em;
}
.brand img { width: 72px; height: 72px; border-radius: 50%; object-fit: contain; padding: 6px; background: #fff;}
.site-header ul {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 6px;
}
.site-header nav a {
  display: block; padding: 8px 10px 9px;
  color: #fff; text-decoration: none; font-size: 1.1rem;
  border-bottom: 2px solid transparent;
}
.site-header nav a:hover { border-bottom-color: #fff; }
.site-header nav a.active { color: var(--gold); font-weight: 700; border-bottom-color: var(--gold); }

/* ---------- Page layout ---------- */
.banner {
  height: 300px;
  background: center / cover no-repeat;
}
.wrap { max-width: 1000px; margin: 0 auto; padding: 32px 16px 48px; }
.narrow { max-width: 720px; }
.grey { background: var(--paper); }
.page-title {
  text-align: center; font-family: Georgia, "Times New Roman", serif;
  color: #555; font-size: 2.2rem; margin: 0 0 8px;
}
.lead { text-align: center; font-size: 1.1rem; max-width: 640px; margin: 0 auto 24px; }
.section-title {
  text-align: center; font-family: Georgia, "Times New Roman", serif;n
  color: var(--muted); font-size: 1.8rem; margin: 44px 0 14px;
  scroll-margin-top: 12px;
}

/* ---------- Home cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; max-width: 640px; margin: 0 auto; }
.card { background: #fff; text-decoration: none; color: var(--ink); display: block; }
.card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.card div { padding: 14px 18px 18px; }
.card h2 { margin: 0 0 6px; font-size: 1.3rem; color: var(--night); }
.card p { margin: 0; }
.card:hover h2 { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; background: var(--blue); color: #fff;
  padding: 10px 26px; text-decoration: none; font-weight: 500; font-size: 1.05rem;
  border: 0; cursor: pointer; font-family: inherit;
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 12px 100%, 0 50%);
}
.btn:hover, .btn:focus { background: var(--blue-hover); color: #fff; }
.btn.plain { clip-path: none; border-radius: 3px; }

/* ---------- Music list ---------- */
.music-tools {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center;
  margin: 0 0 8px;
}
.music-tools input[type=search] {
  font: inherit; padding: 8px 12px; width: min(100%, 320px);
  border: 1px solid #bbb; border-radius: 3px;
}
.jump { text-align: center; margin: 8px 0 0; }
.jump a { margin: 0 6px; white-space: nowrap; }
.tracks { list-style: none; margin: 0; padding: 0; }
.track {
  display: grid;
  grid-template-columns: 200px 1fr auto auto;
  align-items: center; gap: 8px 18px;
  background: var(--night); color: #fff;
  margin: 0 0 14px; padding: 0 0 0 16px;
  min-height: 80px;
  scroll-margin-top: 12px;
}
.track:target { outline: 3px solid var(--gold); }
.track .t-title { font-style: italic; font-weight: 700; margin: 0; font-size: 1rem; }
.track .t-title a { color: #fff; text-decoration: none; }
.track .t-genre { text-decoration: underline; margin: 0; }
.track .t-tags { margin: 0; font-size: .9rem; color: #d7d9e0; }
.track .t-actions { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; }
.track .t-actions .small a { color: #c9d8ff; }
.track .t-player {
  background: var(--night-2); align-self: stretch;
  display: flex; align-items: center; padding: 0 12px;
}
.track audio { width: 260px; height: 36px; display: block; }
.track .missing { color: #ffb4a9; font-size: .9rem; padding: 0 12px; }
.no-results { text-align: center; color: var(--muted); display: none; }

@media (max-width: 820px) {
  .track { grid-template-columns: 1fr; padding: 14px 16px 0; gap: 6px; }
  .track .t-actions { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 6px 0; }
  .track .t-player { margin: 0 -16px; padding: 10px 16px; }
  .track audio { width: 100%; }
  .banner { height: 180px; }
  .brand { font-size: 1.5rem; }
  .brand img { width: 56px; height: 56px; padding: 8px; }
}

/* ---------- Licensing ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 24px 0; }
.plan { border: 2px solid var(--night); background: #fff; display: flex; flex-direction: column; }
.plan .plan-cta:last-child { margin-top: auto; }
.plan h2 { margin: 0; padding: 14px 18px; background: var(--night); color: #fff; font-size: 1.3rem; }
.plan .price { font-size: 1.6rem; font-weight: 700; margin: 0; padding: 14px 18px 0; }
.plan ul { margin: 0; padding: 10px 18px 6px 38px; }
.plan li { margin: 4px 0; }
.plan .plan-cta { padding: 8px 18px 18px; }
.credit-box {
  background: #fff; border: 1px dashed #999; padding: 12px 14px;
  font-family: Consolas, Menlo, monospace; font-size: .95rem; white-space: pre-wrap; margin: 8px 0;
}
.copy-btn { font: inherit; font-size: .9rem; padding: 4px 12px; cursor: pointer; }
.faq h3 { margin: 22px 0 4px; font-size: 1.1rem; }
.faq p { margin: 0 0 8px; }

/* ---------- Forms ---------- */
.form { max-width: 560px; margin: 0 auto; }
.form label { display: block; font-weight: 700; margin: 16px 0 4px; }
.form .hint { font-weight: 400; color: #666; font-size: .9rem; }
.form input[type=text], .form input[type=email], .form input[type=url],
.form input[type=password], .form select, .form textarea {
  width: 100%; font: inherit; padding: 9px 11px;
  border: 1px solid #aaa; border-radius: 3px; background: #fff; color: var(--ink);
}
.form textarea { min-height: 160px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.form .actions { margin-top: 20px; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 12px 16px; border-left: 5px solid; margin: 0 auto 20px; max-width: 560px; background: #fff; }
.notice.ok  { border-color: var(--ok); }
.notice.bad { border-color: var(--bad); }
.notice ul { margin: 6px 0 0; padding-left: 20px; }

/* ---------- Sheet music ---------- */
.sheet { background: #fff; padding: 16px 20px; margin: 0 0 14px; border-left: 6px solid var(--night); }
.sheet h2 { margin: 0; font-size: 1.25rem; font-style: italic; }
.sheet p { margin: 4px 0 8px; font-weight: 700; }
.sheet ul { margin: 0; padding-left: 20px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: #cfd2da; text-align: center; padding: 22px 12px; }
.site-footer a { color: #fff; }
.site-footer p { margin: 4px 0; }
