/* The standalone pages (app/mics/, written by tools/build_pages.py). Same colours as the app. */
:root {
  color-scheme: light;
  --page: #f9f9f7; --surface: #fcfcfb; --ink: #0b0b0b; --ink-2: #52514e; --muted: #8d96a0;
  --border: rgba(11,11,11,0.10);
  --accent: #2a78d6; --warn: #8a5a00; --warn-bg: #fbecc8;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #22272e; --surface: #2d333b; --ink: #e6edf3; --ink-2: #adbac7; --muted: #8d96a0;
    --border: rgba(205,217,229,0.16);
    --accent: #3987e5; --warn: #f0c060; --warn-bg: #3a2c0c;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
main { max-width: 860px; margin: 0 auto; padding: 20px 16px 48px; }
/* A laptop gets the width for tables and blocks side by side; running text keeps its reading width (below). */
@media (min-width: 960px) { main { max-width: 1180px; } }
/* Running text keeps a reading width on every screen; wider screens get margin, never longer lines
   (Tomas, 14 Nov 2026: "site heeft ook te lange leeslijnlengte in algemeen"). */
main :is(p, dd, blockquote, figcaption), main :is(ul:not([class]), ol:not([class]), .sources) > li { max-width: 65ch; }   /* lists drawn as cards keep the full width */
/* Links: text colour with a soft accent underline; accent on hover. */
a { color: var(--ink); text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
    text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1 { font-size: 1.9rem; line-height: 1.15; margin: 0 0 6px; }
h2 { font-size: 1.15rem; margin: 0 0 10px; }
section { margin-top: 32px; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin-top: 40px; }
.crumbs a { color: var(--muted); }
.maker { margin: 0; color: var(--muted); font-size: 0.9rem; }
.kind { margin: 0 0 12px; color: var(--ink-2); }
.hint, .cap { color: var(--muted); font-size: 0.85rem; margin: 4px 0 0; }
.btn { display: inline-block; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
       color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.btn.primary { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
               border-color: color-mix(in srgb, var(--accent) 45%, transparent); padding: 10px 18px; font-size: 0.95rem; }
.btn.primary::before { content: "+ "; font-weight: 700; }
.flag-line { margin: 6px 0; font-size: 0.85rem; color: var(--ink-2); }
.flag { color: var(--warn); background: var(--warn-bg); padding: 1px 6px; border-radius: 4px; font-weight: 600; font-size: 0.8rem; }

.mic-head { display: flex; gap: 28px; align-items: flex-start; }
.mic-head .intro { flex: 1; min-width: 0; }
.photo { --img: var(--w, 200px); margin: 0; flex: none; width: max(var(--img), 180px); max-width: 100%; }
.photo img { display: block; width: var(--img); max-width: 100%; height: auto; margin: 0 auto; }
.photo figcaption { margin-top: 6px; color: var(--muted); font-size: 0.72rem; line-height: 1.35; text-wrap: balance; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 18px 0 0; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.tile dt { color: var(--muted); font-size: 0.75rem; }
.tile dd { margin: 0; font-weight: 600; }
.tile small { color: var(--muted); font-weight: 400; }
.tile .sub { display: block; font-size: 0.78rem; margin-top: 2px; }
.tile .icos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; color: var(--ink-2); }
@media (max-width: 600px) {
  h1 { font-size: 1.55rem; }
  .mic-head { flex-direction: column-reverse; gap: 16px; }
  .photo { --img: var(--ws, 200px); align-self: center; text-align: center; }
}

/* The graphs (mic-page.js draws them with chart.js; chart.css styles them). */
.graphs h2 { margin: 0; }
.chart-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
/* A mic page's parts stand clearly apart (huisregels prefs/apps.md "Layout: witruimte volgt de groepering"):
   the frequency response, the polar pattern and All specs each in a card like the tiles above them, and more space
   between the parts below them than inside them (Tomas, 15 Nov 2026: "meer ruimte tss delen" and "kadertje rond
   1 freq, 2 polar, 3 specs"). */
.part { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px 18px; }
#polarBox { margin-top: 28px; }
.mic-body, .mic-body ~ section, .mic-body > section + section { margin-top: 56px; }
.graphs select, .graphs button { font: inherit; font-size: 0.9rem; color: var(--ink); }
.graphs select { background: var(--page); border: 1px solid var(--border); border-radius: 6px; padding: 4px 6px; height: 30px; max-width: 100%; }
.seg button { cursor: pointer; }
.polar-shade { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.polar-shade .cap { margin: 0; }
.settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 14px; margin: 0 0 12px; }
.settings[hidden] { display: none; }
.pos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px 24px; margin: 8px 0 6px; }
#polarFField { max-width: 360px; margin: 0 0 8px; }
#polarFField[hidden] { display: none; }
.compare { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 24px; }
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; cursor: pointer; }
.switch input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.compare .hint { margin: 0; }
/* Laptop: the graphs on the left, the response curve with the polar pattern under it, and All specs on the
   right (Tomas, 15 Nov 2026: "liever de polar _onder_ de freq graph, en dan specs tabel rechts. mooier"). */
@media (min-width: 960px) {
  .mic-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); column-gap: 28px; align-items: start; }
  .mic-body > section, .mic-body > section + section { margin-top: 0; }
  .mic-body > .all-specs > h2 { margin-top: 0; }
}
@media (max-width: 600px) {
  /* Phones: the cards keep little padding and the charts run to their edges (their dB labels sit inside), the
     sliders one under the other. */
  .part { padding: 16px 14px 14px; }
  .graphs .chart-wrap { margin: 0 -14px; }
  .pos { grid-template-columns: minmax(0, 1fr); }
}
.cap b { color: var(--ink-2); font-weight: 600; }
.cap .flag { margin-left: 2px; }

.scroll { overflow-x: auto; }
.specs { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.specs th, .specs td { text-align: left; vertical-align: top; padding: 6px 10px 6px 0; border-top: 1px solid var(--border); }
.specs th { font-weight: 500; color: var(--ink-2); width: 32%; }
.specs .grp th { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; padding-top: 14px; width: auto; }
.specs .pg { color: var(--muted); white-space: nowrap; font-size: 0.8rem; }
@media (max-width: 600px) { .specs th { width: 38%; } }

.docs { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.docs li { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.doc-title { font-weight: 600; }
.doc-meta { color: var(--muted); font-size: 0.85rem; }
.doc-links { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 6px; font-size: 0.9rem; }
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; font-size: 0.9rem; }

.others { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.others a { display: inline-block; padding: 4px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
            text-decoration: none; font-size: 0.88rem; }
.others a:hover { border-color: var(--accent); }
section h3 { font-size: 1rem; margin: 18px 0 6px; }

.mic-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.mic-list li { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.mic-list li:hover { border-color: var(--accent); }
.mic-list a.main { display: flex; flex: 1; gap: 12px; align-items: center; padding: 10px; color: var(--ink); text-decoration: none; }
.mic-list .thumb { flex: none; width: 56px; height: 72px; display: flex; align-items: center; justify-content: center; }
.mic-list img { max-width: 56px; max-height: 72px; }
.mic-list b { display: block; }
.mic-list .kind, .mic-list .kspecs, .mic-list .rec { display: block; margin: 0; font-size: 0.8rem; color: var(--ink-2); }
.mic-list .kspecs, .mic-list .rec { color: var(--muted); }
.mic-list .rec { margin-top: 2px; }
/* A group's variants, each linking its own page. */
.mic-list .vars { display: block; padding: 0 10px 10px 78px; margin-top: -4px; font-size: 0.8rem; }

/* The list of all mics: search and filters (mics-list.js), the jump bar, and a block per brand. */
.ml-tools { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 4px; }
.ml-tools[hidden] { display: none; }
#mlSearch { font: inherit; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); max-width: 420px; }
.ml-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fchip { font: inherit; font-size: 0.8rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: none; color: var(--ink-2); cursor: pointer; }
.fchip[aria-pressed="true"] { background: var(--ink); color: var(--page); border-color: var(--ink); }
.fsep { width: 1px; height: 18px; background: var(--border); margin: 0 2px; }
#mlBrand { font: inherit; font-size: 0.8rem; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); }
.ml-count { margin: 0; font-size: 0.85rem; color: var(--muted); min-height: 1.2em; }
#mlPopular, .brand-jump { margin-top: 24px; }
.brand-jump { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; font-size: 0.88rem; }
.brand-jump h2 { width: 100%; margin-bottom: 2px; }
.brand-jump a { color: var(--accent); text-decoration: none; white-space: nowrap; }
.brand-jump a:hover { text-decoration: underline; }
.brand-jump span, .brand-block h2 .n { color: var(--muted); font-weight: 400; font-size: 0.85em; }
.brand-block { margin-top: 24px; scroll-margin-top: 12px; }
.brand-block h2 { margin: 0; }
/* On a phone each brand starts folded, so the list is a few screens long, not a hundred (Tomas, 15 Nov 2026, Memo
   work/mic-archive/ux-ronde, pick "3A · Merken dicht, ‘▸ Show N mics’"). mics-list.js sets .folded while
   nothing is searched or filtered; without it every card shows. */
.bb-more { display: none; }
@media (max-width: 959px) {
  #mlBrands.folded .bb-more { display: block; font: inherit; font-size: 0.9rem; min-height: 44px; padding: 0; background: none; border: 0; color: var(--accent); cursor: pointer; }
  #mlBrands.folded .bb-more::before { content: "▸ "; }
  #mlBrands.folded .bb-more[aria-expanded="true"]::before { content: "▾ "; }
  #mlBrands.folded .bb-more[aria-expanded="false"] + .mic-list { display: none; }
  #mlBrands.folded .brand-block h2 .n { display: none; }   /* the count is in "Show N mics" */
  #mlBrands.folded .brand-block { margin-top: 12px; }
}
.ml-none { color: var(--muted); }
/* On a laptop each card is a table row: one line per mic, type and pattern tap to filter, the column heads sort
   (Tomas, 15 Nov 2026, Memo work/mic-archive/zolder-lessen, pick "2A · Een tabel, één regel per mic"; huisregels
   prefs/apps.md "Op een laptop: overzicht, veel data in één oogopslag"). The phone keeps its cards. */
.mic-list .cell, .ml-cols { display: none; }
@media (min-width: 960px) {
  .ml-cols, .mic-list li { display: grid; grid-template-columns: minmax(220px, 1fr) 120px 170px repeat(4, 100px); align-items: center; column-gap: 8px; }
  .ml-cols { margin: 12px 0 0; padding: 0 0 6px; border-bottom: 1px solid var(--border); font-size: 0.78rem; color: var(--muted); }
  #mlBrands > .ml-cols { position: sticky; top: 0; z-index: 2; background: var(--page); padding-top: 8px; }
  :where(.ml-cols button, .mic-list button.cell) { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
  .ml-cols button:hover, .ml-cols button[aria-sort] { color: var(--ink); }
  .ml-cols button[aria-sort="ascending"]::after { content: " ▴"; }
  .ml-cols button[aria-sort="descending"]::after { content: " ▾"; }
  .ml-cols .n, .mic-list .cell.n { text-align: right; padding-right: 8px; }
  .mic-list { display: block; margin: 0; }
  .mic-list li { background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; }
  .mic-list li:hover { background: var(--surface); }
  .mic-list a.main { padding: 3px 8px 3px 0; gap: 8px; }
  .mic-list .thumb { width: 28px; height: 32px; }
  .mic-list img { max-width: 28px; max-height: 32px; }
  .mic-list b { font-weight: 500; }
  .mic-list .kind, .mic-list .kspecs, .mic-list .rec { display: none; }
  .mic-list .cell { display: block; font-size: 0.88rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
  .mic-list button.cell:hover { color: var(--accent); text-decoration: underline; }
  .mic-list .vars { grid-column: 1 / -1; padding: 0 0 6px 36px; margin: 0; }
  .brand-block { margin-top: 20px; }
}
[hidden] { display: none !important; }

.site-foot { margin: 40px 0 0; color: var(--muted); font-size: 0.75rem; }
.site-foot .version { display: block; margin-top: 6px; }   /* tools/stamp_pages.py */

.crumbs + .site-foot { margin-top: 12px; }
/* Inside Compare's card (a frame): the card has the name, the close button and the chart actions, so the page
   drops the site's header, tabs, footer and its own title. */
.in-card :is(.site-top, .site-foot, .crumbs, .mic-head h1) { display: none; }
.in-card main { padding-top: 12px; }
.in-card body { padding-bottom: 0; }
/* Dark mode: a soft light along the mic's own outline (photo and small photos), so a black mic doesn't vanish into the page. */
@media (prefers-color-scheme: dark) {
  .photo img { filter: drop-shadow(0 0 6px rgba(255,255,255,0.22)) drop-shadow(0 0 18px rgba(255,255,255,0.08)); }
  .mic-list img, img.thumb { filter: drop-shadow(0 0 3px rgba(255,255,255,0.2)); }
}
.tile { position: relative; }
.cmp { margin-top: 6px; font-size: 0.75rem; color: var(--muted); }
.cmp summary { list-style: none; cursor: pointer; }
.cmp summary::-webkit-details-marker { display: none; }
.cmp summary span::after { content: " ▾"; }
.cmp[open] summary span::after { content: " ▴"; }
.cmp svg { display: block; width: 100%; height: 16px; margin-bottom: 2px; overflow: visible; }
.cmp line { stroke: var(--muted); stroke-opacity: 0.5; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.cmp line.me { stroke: var(--accent); stroke-opacity: 1; stroke-width: 3px; }
.cmp rect.me { fill: var(--accent); opacity: 1; }
.cmp .histo { height: 44px; margin: 6px 0; }
.cmp rect { fill: var(--muted); opacity: 0.35; }
.cmp rect.hit { fill: transparent; opacity: 1; }
.cmp g:hover rect:not(.hit), .cmp g.on rect:not(.hit) { opacity: 0.8; }
.cmp .bar-v { min-height: 1.4em; margin: 0; font-variant-numeric: tabular-nums; }
.cmp .pop { position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; width: min(320px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 4px 12px 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
.cmp p, .cmp ul { margin: 6px 0 0; color: var(--ink-2); }
.cmp p:first-of-type { font-size: 0.85rem; }
.cmp ul { padding-left: 1.1em; }
/* The home page's explanations on a mic page (explain.js, explain.css). */
.mic-head .power { margin: 14px 0 0; font-size: 0.9rem; color: var(--ink-2); }
.mic-head .power b { color: var(--ink); margin-right: 4px; }
.tile[data-help="Type"], .tile[data-help="Pattern"] { cursor: pointer; }
/* Folds on the frequency response card (instrument ranges, proximity effect): closed at first. */
.fold { margin: 2px 0 6px; }
.fold > summary { display: flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; list-style: none; color: var(--ink-2); font-size: 0.9rem; font-weight: 600; user-select: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: "▸"; color: var(--muted); font-size: 0.8em; transition: transform 0.15s; }
.fold[open] > summary::before { transform: rotate(90deg); }
.fold > .cap { margin: 0 0 4px; }
#prox figure { margin: 0 auto 2px; }
#practice h3 { margin: 18px 0 0; font-size: 1rem; }
svg.ranges { margin-bottom: 6px; }
.card-head .close { background: none; border: 0; color: var(--muted); cursor: pointer; min-width: 44px; min-height: 44px; }
/* The card's title and ✕ stay in view while it scrolls (it can open part-way down). */
#infoCard .card-head { position: sticky; top: -18px; z-index: 2; margin: -18px -18px 0; padding: 8px 8px 4px 18px; background: var(--surface); }
