/* /charts/italian-music-terms : the term reference. Kept out of extras.css and custom.css on purpose. */
.mtp-tm { margin: 4px 0 8px; }

.mtp-tm-nav { margin: 4px 0 18px; }
.mtp-tm-nav ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mtp-tm-nav li { margin: 0; padding: 0; }
.mtp-tm-nav a {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 12px; min-height: 36px; align-items: center;
  border: 1px solid var(--mtp-line); border-radius: 2px; background: var(--mtp-raised);
  color: var(--mtp-paper); font-size: 14px; text-decoration: none;
}
.mtp-tm-nav a span { color: var(--mtp-muted); font-size: 12px; }
.mtp-tm-nav a:hover, .mtp-tm-nav a:focus-visible { border-color: var(--mtp-brass); color: var(--mtp-brass-bright); }

.mtp-tm-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 8px; }
.mtp-tm-tools label { color: var(--mtp-muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.mtp-tm-tools input[type="search"] {
  flex: 1 1 220px; max-width: 420px; padding: 9px 12px; background: var(--mtp-raised); color: var(--mtp-paper);
  border: 1px solid var(--mtp-line); border-radius: 2px; font: inherit; font-size: 15px;
}
.mtp-tm-tools input[type="search"]:focus { outline: 2px solid var(--mtp-brass); outline-offset: 1px; }
.mtp-tm-count { margin: 0; color: var(--mtp-muted); font-size: 13px; }
.mtp-tm [hidden] { display: none !important; }
.mtp-tm-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; flex: 1 1 320px; margin: 0; }

.mtp-tm-group { margin: 30px 0 0; scroll-margin-top: 16px; }
.mtp-tm-group h2 { margin: 0 0 12px; }
.mtp-tm-groupcount { margin-left: 8px; color: var(--mtp-muted); font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 14px; font-weight: 400; }

.mtp-tm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 12px; }
.mtp-tm-term {
  padding: 14px 16px 12px; background: var(--mtp-raised); border: 1px solid var(--mtp-line);
  border-left: 3px solid var(--mtp-brass); border-radius: 2px; scroll-margin-top: 16px; min-width: 0;
}
.mtp-tm-term:target { border-color: var(--mtp-brass-bright); box-shadow: 0 0 0 1px var(--mtp-brass-bright); }
.mtp-tm-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 4px; }
.mtp-tm-head h3 {
  margin: 0; color: var(--mtp-brass-bright); font-family: "Cormorant Garamond", Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 28px; font-weight: 600; line-height: 1.15; font-style: italic;
}
.mtp-tm-abbr {
  padding: 1px 8px; border: 1px solid var(--mtp-brass); border-radius: 2px; color: var(--mtp-paper);
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.mtp-tm-bpm { color: var(--mtp-muted); font-size: 13px; white-space: nowrap; }
.mtp-tm-sound { margin-left: auto; align-self: center; }
.mtp-tm-sound audio { height: 32px; max-width: 190px; }
.mtp-tm-js .mtp-tm-sound audio { display: none; }
.mtp-tm-play {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; min-height: 32px; background: transparent;
  color: var(--mtp-brass-bright); border: 1px solid var(--mtp-brass); border-radius: 2px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.mtp-tm-play:hover, .mtp-tm-play:focus-visible, .mtp-tm-play.is-playing { background: rgba(196, 154, 73, .16); color: var(--mtp-paper); }
.mtp-tm-play:disabled { opacity: .5; cursor: default; }

.mtp-tm-meaning { margin: 2px 0 8px; color: var(--mtp-paper); font-size: 16px; line-height: 1.5; }
.mtp-tm-meaning::first-letter { text-transform: uppercase; }
.mtp-tm-facts { margin: 0; padding: 0; list-style: none; color: var(--mtp-muted); font-size: 14px; line-height: 1.5; }
.mtp-tm-facts li { margin: 3px 0; padding: 0; }
.mtp-tm-facts li > span:first-child {
  display: inline-block; min-width: 7.2em; margin-right: 6px; color: var(--mtp-brass); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
}
.mtp-tm-facts a, .mtp-tm-src a, .mtp-tm-grove a, .mtp-tm-about a { color: var(--mtp-brass-bright); }
.mtp-tm-grove {
  margin: 10px 0 4px; padding: 6px 0 2px 12px; border-left: 2px solid var(--mtp-line); color: var(--mtp-muted); font-size: 14px; line-height: 1.5;
}
.mtp-tm-grove p { margin: 0 0 4px; font-family: "Cormorant Garamond", Georgia, "Iowan Old Style", "Times New Roman", serif; font-size: 17px; color: var(--mtp-paper); }
.mtp-tm-grove footer { font-size: 12px; }
.mtp-tm-src { margin: 8px 0 0; font-size: 12px; color: var(--mtp-muted); }
.mtp-tm-src:empty { display: none; }
.mtp-tm-empty { margin: 24px 0; color: var(--mtp-muted); }

.mtp-tm-about { margin: 36px 0 0; padding-top: 6px; border-top: 1px solid var(--mtp-line); max-width: 80ch; color: var(--mtp-muted); font-size: 14px; line-height: 1.6; }
.mtp-tm-about h2 { font-size: 20px; }
.mtp-tm-about li { margin: 8px 0; }

@media screen and (max-width: 720px) {
  .mtp-tm-list { grid-template-columns: 1fr; }
  .mtp-tm-head h3 { font-size: 25px; }
  .mtp-tm-facts li > span:first-child { display: block; min-width: 0; }
  .mtp-tm-nav a { font-size: 13px; padding: 6px 10px; }
}

/* print: a compact term list; no controls, no long notes */
@media print {
  .mtp-tm-nav, .mtp-tm-tools, .mtp-tm-sound, .mtp-tm-grove, .mtp-tm-src, .mtp-tm-empty, .mtp-tm-about,
  .mtp-tm-facts li:not(.mtp-tm-literal) { display: none !important; }
  .mtp-tm-group { margin: 10pt 0 0; break-inside: auto; }
  .mtp-tm-group h2 { font-size: 13pt; margin: 0 0 4pt; break-after: avoid; }
  .mtp-tm-groupcount { display: none; }
  .mtp-tm-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18pt; }
  .mtp-tm-term { padding: 2pt 0; border: 0 !important; border-bottom: 0.5pt solid #bbb !important; box-shadow: none !important; break-inside: avoid; }
  .mtp-tm-head { gap: 0 6pt; margin: 0; }
  .mtp-tm-head h3 { font-size: 11pt; }
  .mtp-tm-abbr { font-size: 8pt; padding: 0 3pt; border-color: #666 !important; }
  .mtp-tm-bpm { font-size: 8pt; }
  .mtp-tm-meaning { margin: 0; font-size: 8.5pt; line-height: 1.25; }
  .mtp-tm-facts { font-size: 8pt; }
  .mtp-tm-facts li > span:first-child { display: none; }
  .mtp-tm-literal::before { content: "Literally: "; font-weight: 700; }
}
