/* The instrument pages (app/instruments/, written by tools/build_instruments.py), on top of pages.css. */
.inst-head .tiles { margin-top: 14px; }
.rel-line { color: var(--ink-2); font-size: 0.92rem; margin: 4px 0 0; }
section ul { padding-left: 1.2em; }
section li { margin: 2px 0; }
h3 { font-size: 1rem; margin: 22px 0 8px; }
h4, .inst-sec h3, .music .lab { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
h4 { margin: 0 0 4px; }
.cite { font-size: 0.68rem; margin-left: 1px; white-space: nowrap; }
.cite a { text-decoration: none; }
.cite a + a::before { content: ""; }
.tag { display: inline-block; font-size: 0.7rem; color: var(--ink-2); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; margin-left: 4px; vertical-align: 1px; white-space: nowrap; }
.btn { margin-right: 6px; }

/* Range */
.big { font-size: 1.25rem; font-weight: 600; margin: 0 0 10px; }
.big .hz { font-size: 0.9rem; font-weight: 400; color: var(--muted); margin-left: 10px; }
.rangebar { position: relative; height: 22px; margin: 6px 0 22px; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 87 - 1px), var(--border) calc(100% / 87 - 1px) calc(100% / 87));
            border: 1px solid var(--border); border-radius: 4px; }
.rangebar .span { position: absolute; top: 2px; bottom: 2px; background: color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 3px; overflow: hidden; }
.rangebar .span.soft-hi { -webkit-mask-image: linear-gradient(90deg, #000 85%, rgba(0,0,0,0.35)); mask-image: linear-gradient(90deg, #000 85%, rgba(0,0,0,0.35)); }
.rangebar .span.soft-lo { -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0.35), #000 15%); mask-image: linear-gradient(90deg, rgba(0,0,0,0.35), #000 15%); }
.rangebar .reg { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--page); }
.rangebar .mid { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-2); opacity: 0.5; }
.rangebar .c { position: absolute; top: 24px; transform: translateX(-50%); font-size: 0.65rem; color: var(--muted); }
.regs, .loud { border-collapse: collapse; font-size: 0.9rem; margin: 8px 0; width: 100%; }
.regs th, .regs td, .loud th, .loud td { text-align: left; vertical-align: top; padding: 5px 12px 5px 0; border-top: 1px solid var(--border); }
.regs th { font-weight: 600; white-space: nowrap; }
.regs td:nth-child(2) { white-space: nowrap; color: var(--ink-2); }
.loud .grp th { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; padding-top: 14px; font-weight: 600; }
.loud .num { white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; width: 9em; }
.variants { margin-top: 10px; }

/* Recommended mics: the most named on top, the full list behind a tap */
.top { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 10px; }
.top li { padding: 10px 14px; display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; align-items: center; }
.top a { font-weight: 600; }
.top .n { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.top .why { display: block; font-size: 0.85rem; color: var(--ink-2); }
details.all { margin-top: 16px; }
details.all > summary { font-size: 0.95rem; }
.tech { margin: 4px 0 0; }
.tech .tag { margin: 0 4px 4px 0; }
.setting, .top li { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.setting { margin-top: 18px; padding: 14px 16px; }
.setting h3 { margin: 0 0 12px; font-size: 1.05rem; }
.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 22px; }
.mics { list-style: none; padding: 0; margin: 0; }
.mics li { padding: 3px 0; line-height: 1.35; display: grid; grid-template-columns: 32px 1fr; column-gap: 10px; align-items: center; }
.mics .n { display: block; font-size: 0.75rem; color: var(--muted); }
.rel { font-size: 0.8rem; color: var(--muted); }
details { margin-top: 14px; }
summary { cursor: pointer; color: var(--accent); font-size: 0.9rem; }
.setups { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.setups li { border-top: 1px solid var(--border); padding-top: 8px; font-size: 0.92rem; }
.setups .role { font-weight: 600; margin-right: 4px; }
.setups .pl { color: var(--ink-2); font-size: 0.85rem; }
.setups .qt { color: var(--ink-2); font-size: 0.85rem; font-style: italic; }
.setups.against li { background: none; }

/* Sources */
.sources { font-size: 0.85rem; padding-left: 1.8em; }
.sources li { margin: 4px 0; scroll-margin-top: 20px; }
.sources li:is(:target, .on) { background: var(--warn-bg); }
.src-meta { display: block; color: var(--muted); font-size: 0.78rem; }

/* An instrument page on a laptop: the parts of the page as jumps in a column on the left, the sources in one on
   the right, both staying in view (Tomas, 15 Nov 2026, picks "6A · Bronnen in een kolom naast de tekst" and
   "6B · De delen van de pagina als lijst links"; tools/build_instruments.py with_ids). A source number lights
   its source there (info.js); narrower screens keep the popover. There the parts stand numbered in two columns
   under the header (Tomas, 15 Nov 2026, Memo work/mic-archive/ux-ronde, pick "4A · Genummerde inhoud in twee
   kolommen bovenaan"). */
.toc { columns: 2; column-gap: 16px; counter-reset: part; margin: 0 0 16px; font-size: 0.88rem; }
.toc a { counter-increment: part; display: block; break-inside: avoid; min-height: 44px; padding: 12px 0; box-sizing: border-box;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--border); line-height: 1.25; }
.toc a::before { content: counter(part) " · "; color: var(--muted); }
@media (min-width: 1100px) {
  main.inst-page { max-width: 1440px; display: grid; grid-template-columns: 170px minmax(0, 1fr) 300px; grid-template-rows: auto auto 1fr;
    column-gap: 40px; align-items: start; }
  main.inst-page > :is(.site-top, .crumbs, .site-foot) { grid-column: 1 / -1; }
  main.inst-page > .inst-head { grid-column: 2; grid-row: 2; }
  main.inst-page > .inst-text { grid-column: 2; grid-row: 3; }
  main.inst-page > :is(.toc, #sources) { grid-row: 2 / span 2; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
  main.inst-page > .toc { grid-column: 1; columns: auto; margin-top: 8px; }
  .toc a { min-height: 0; padding: 5px 0 5px 10px; border-bottom: 0; border-left: 2px solid var(--border); color: var(--muted); }
  .toc a::before { content: none; }
  .toc a:hover { color: var(--ink); }
  .toc a.on { color: var(--ink); font-weight: 600; border-left-color: var(--accent); }
  main.inst-page > #sources { grid-column: 3; }
  #sources h2 { margin-top: 8px; font-size: 1rem; }
  #sources .sources { font-size: 0.8rem; margin: 0; }
  #sources .sources li { padding: 2px 4px; border-radius: 6px; scroll-margin: 40px; }
}

/* The list of instruments: each section is a card (.part, pages.css) with its instruments as plain names, two to a
   row, and its families under small headings; on a laptop the cards stand in three columns. Ranges (laptop only)
   puts the cards in two columns, each name with its range as a bar on a piano-wide axis (A0 to C8): a line at
   every C, named once at the top of the card. A family without ranges (drums, choirs) keeps three names to a row.
   (Tomas, 15 Nov 2026, picks "1A · Eén kaart per groep, de namen erin" and "2B · De kaarten van 1A, met een balk
   naast elke naam" on Memo work/mic-archive/groepering; tools/build_instruments.py list_page.) An instrument's
   range and sources show when you point at its name. Each bar has its section's colour, like the dot before the
   section's name (Tomas, 15 Nov 2026: "kunnen we kleurtjes van familie ook in grafiek?"). */
.search { font: inherit; width: 100%; max-width: 360px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); margin: 6px 0 4px; }
.list-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.inst-list { list-style: none; padding: 0; margin: 2px 0 0; columns: 2; column-gap: 18px; }
.inst-list li { break-inside: avoid; }
.inst-list a { display: block; padding: 3px 0; color: var(--ink); text-decoration: none; }
.inst-list a:hover b { color: var(--accent); }
.inst-list b { font-weight: 500; }
.inst-list .rangebar, .inst-sec .axis, .seg.view { display: none; }
@media (min-width: 960px) {
  .seg.view { display: inline-flex; }
  .secs { columns: 3; column-gap: 22px; }
  .ranges .secs { columns: 2; }
  .secs .inst-sec { break-inside: avoid; display: inline-block; width: 100%; }
  .ranges .inst-sec .axis { display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: 14px; font-size: 0.72rem; color: var(--muted); margin: 0 0 2px; }
  .ranges .axis div { grid-column: 2; position: relative; height: 1.2em; }
  .ranges .axis .c { position: absolute; transform: translateX(-50%); }
  .ranges .inst-list:not(.no-range) { columns: 1; }
  .ranges .inst-list:not(.no-range) a { display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 2px 0; }
  .ranges .inst-list:not(.no-range) .rangebar { display: block; height: 12px; margin: 0; border: 0; background: none; }
  .ranges .inst-list .rangebar .c { top: -3px; bottom: -3px; width: 1px; background: var(--border); transform: none; }
  .ranges .inst-list .rangebar .mid { display: none; }
  .ranges .inst-list .rangebar .span { z-index: 1; background: color-mix(in srgb, var(--sec) 65%, transparent); }
  .ranges .no-range { columns: 3; column-gap: 14px; }
}
main > h2 { margin-top: 28px; }
@media (max-width: 600px) {
  .setting { padding: 12px; margin-left: -4px; margin-right: -4px; }
  .roles { grid-template-columns: minmax(0, 1fr); }
  .big .hz { display: block; margin: 2px 0 0; }
  .inst-head .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Each section has its own colour (--sec, from chart.css), as a dot before its name. */
.inst-sec { margin-top: 22px; }
.inst-sec > h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 1.08rem; }
.inst-sec > h2 a { color: inherit; }
.inst-sec > h2::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--sec); flex: none; }
.inst-sec h3 { margin: 12px 0 2px; }
.inst-sec h3 a { color: inherit; }
.inst-sec[hidden], .inst-list[hidden], .inst-sec h3[hidden], .inst-list li[hidden], .more[hidden] { display: none; }
/* "+ N more" under a card: the instruments heard only in World music, which the list leaves out at first. */
.more { margin: 6px 0 0; }
.more button { font: inherit; font-size: 0.9rem; color: var(--accent); background: none; border: none; padding: 0; min-height: 44px; cursor: pointer; }
.more button:hover { text-decoration: underline; }
/* A mic's small photo in front of its name. */
.thumb { width: 32px; height: 32px; object-fit: contain; border-radius: 4px; grid-row: 1 / span 3; }
.top .thumb { width: 40px; height: 40px; }
:is(.top, .mics) li > :not(.thumb) { grid-column: 2; }
/* The Music row: the shared chips, a little larger, and the picked ones in the accent colour. */
.music { margin: 10px 0 2px; }
.music .lab { margin-right: 2px; }
.music .fchip { font-size: 0.88rem; padding: 4px 11px; color: var(--ink); background: var(--surface); user-select: none; }
.music .fchip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
/* A second name that says what the instrument is (field also): grey, on its own line, under the name. */
.inst-list .also { display: block; font-weight: 400; font-style: italic; font-size: 0.85rem; color: var(--muted); }
.inst-head .also { color: var(--muted); font-style: italic; font-size: 1.05rem; margin: -2px 0 0; }
