/* Cedarstone Music Lab — site chrome shared by every page.
 *
 * Only what was identical on every page that uses it: the reset, the header
 * wordmark and back link, the sound notice, control labels, the chip row,
 * the policy links at the foot of each tool, and the printed-sheet header. Where pages differ (a sound notice's width
 * and colors, a hub page's back-link margin), the page keeps that part.
 * Each page's own <style> comes after this file, so a page can still restyle
 * anything here. Colors come from each page's own :root variables.
 *
 * Load before the page's <style>:  <link rel="stylesheet" href="/_lib/site.css">
 */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.14s;
}

.back-link:hover {
  color: var(--text-dim);
}

.site-wordmark {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-left: 4px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* App-icon mark (dark tile, so it reads in light theme too) */
.site-mark {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  flex-shrink: 0;
}

/* "This tool uses sound" notice; each page sets its width, margin and colors */
.sound-notice {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.45;
}

.sound-notice svg {
  flex-shrink: 0;
}

/* Small uppercase label above a group of controls */
.control-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* A wrapping row of option chips (chips themselves stay on each page) */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.print-header {
  display: none;
}

/* "Questions" at the foot of each tool page, written in by
 * .internal/scripts/apply-faq.mjs. Uses the page's own text color, so it fits
 * every palette; tap a question to open its answer. */
.tool-faq {
  width: 100%;
  max-width: 760px;
  margin: 56px auto 0;
  text-align: left;
}
.tool-faq h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
}
.tool-faq details {
  border-top: 1px solid rgba(128, 128, 128, 0.25);
}
.tool-faq details:last-of-type {
  border-bottom: 1px solid rgba(128, 128, 128, 0.25);
}
.tool-faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 14px 32px 14px 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
.tool-faq summary::-webkit-details-marker {
  display: none;
}
.tool-faq summary::after {
  content: '+';
  position: absolute;
  right: 6px;
  top: 11px;
  font-size: 20px;
  font-weight: 400;
  opacity: 0.6;
}
.tool-faq details[open] summary::after {
  content: '\2013';
}
.tool-faq p {
  margin: 0;
  padding: 0 0 16px;
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.8;
}

/* Privacy · Terms · Accessibility at the foot of every tool page. App stores
 * want the privacy policy reachable from anywhere in the app. Uses the page's
 * own text color, faded, so it fits every palette. */
.site-legal {
  width: 100%;
  margin: 48px auto 0;
  padding: 16px 0 8px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 12px;
  line-height: 1.4;
}
.site-legal a {
  color: inherit;
  opacity: 0.55;
  text-decoration: none;
  padding: 6px 2px;
}
.site-legal a:hover,
.site-legal a:focus-visible {
  opacity: 1;
  text-decoration: underline;
}

/* Printed worksheets */
@media print {
  .site-legal,
  .tool-faq {
    display: none !important;
  }
  .print-header {
    display: block !important;
    text-align: center;
    max-width: 100%;
    margin: 0 auto 22px;
  }
  .print-brand {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 14px;
  }
  .print-title {
    font-size: 24px;
    font-weight: 800;
    color: #000;
  }
}
