/* 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: #898781;
  --border: rgba(11,11,11,0.10);
  --accent: #2a78d6; --warn: #8a5a00; --warn-bg: #fbecc8;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --ink: #ffffff; --ink-2: #c3c2b7; --muted: #898781;
    --border: rgba(255,255,255,0.10);
    --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 { 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-bottom: 18px; }
.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: var(--accent); border-color: var(--accent); color: #fff; }
.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 { margin: 0; flex: none; max-width: 200px; }
.photo img { display: block; max-width: 200px; max-height: 340px; width: auto; height: auto; margin: 0 auto; }
.photo figcaption { margin-top: 6px; color: var(--muted); font-size: 0.72rem; line-height: 1.35; }
.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; }
@media (max-width: 600px) {
  h1 { font-size: 1.55rem; }
  .mic-head { flex-direction: column-reverse; gap: 16px; }
  .photo { max-width: none; align-self: center; text-align: center; }
  .photo img { max-height: 260px; }
}

/* 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; }
#polarBox { margin-top: 28px; }
.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; }
.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; }
@media (max-width: 600px) {
  /* Phones: the charts run to the screen edges (their dB labels sit inside), the sliders one under the other. */
  .graphs .chart-wrap { margin: 0 -16px; }
  .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; columns: 2 220px; }
.others li { padding: 3px 0; break-inside: avoid; }

.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; }
.mic-list .vars a { color: var(--accent); }

/* 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; }
.ml-none { color: var(--muted); }
[hidden] { display: none !important; }

.site-foot { margin: 40px 0 0; color: var(--muted); font-size: 0.75rem; }

/* The site's sections as tabs (build_pages.tabs; the home page has the same in index.html). */
.site-top { display: flex; align-items: center; flex-wrap: wrap; gap: 0 28px; border-bottom: 1px solid var(--border); margin: -8px 0 16px; }
.site-top .brand { font-size: 1.2rem; font-weight: 700; color: var(--ink); text-decoration: none; padding: 8px 0; }
.tabs { display: flex; margin-bottom: -1px; }
.tabs a { padding: 10px 12px 9px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; border-bottom: 2px solid transparent; }
.tabs a:first-child { padding-left: 0; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 600px) { .site-top { gap: 0; } .site-top .brand { width: 100%; padding-bottom: 0; } }
