/* Quality guide, quality modes: loaded only on the guide's page, after style.css. */
.qa-m-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.qa-m-mode { color: var(--quiet); transition: background .4s, border-color .4s, color .4s; }
.qa-m-mode.on { border-color: var(--red); background: var(--red); color: var(--bg); }
.qa-m-what { margin-left: 4px; font-size: 13px; color: var(--soft); }
.qa-m-gauge { display: grid; gap: 0; }
.qa-m-ghead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.qa-m-ghead .label { margin: 0; }
.qa-m-gval { font: 600 12.5px var(--mono); color: var(--fg); white-space: nowrap; }
.qa-m-track { position: relative; height: 14px; margin: 26px 0 0; border-radius: 7px; border: 1px solid var(--border-strong); background: var(--surface-2); }
.qa-m-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 7px; background: var(--quiet); transition: width .8s cubic-bezier(.2, .8, .2, 1), background .4s; }
.qa-m-fill.over { background: var(--red); }
.qa-m-lim, .qa-m-allow { position: absolute; top: -6px; bottom: -6px; width: 0; left: 0; opacity: 0; transition: left .8s cubic-bezier(.5, 0, .2, 1), opacity .4s; }
.qa-m-lim { border-left: 2px solid var(--fg); }
.qa-m-lim.on, .qa-m-allow.on { opacity: 1; }
.qa-m-lim.on.idle { opacity: .3; }
.qa-m-allow { border-left: 2px dashed var(--purple); }
.qa-m-limtag, .qa-m-allowtag { position: absolute; left: -1px; padding: 0 5px; border-radius: 4px; background: var(--bg); font: 600 11px var(--mono); white-space: nowrap; }
.qa-m-limtag { bottom: calc(100% + 1px); color: var(--fg); border: 1px solid var(--border-strong); transition: border-color .4s; }
.qa-m-lim.moved .qa-m-limtag { border-color: var(--red); }
.qa-m-lim.right .qa-m-limtag { left: auto; right: -1px; }
.qa-m-allowtag { top: calc(100% + 2px); color: var(--purple); }
.qa-m-scale { display: flex; justify-content: space-between; margin-top: 5px; min-height: 18px; font: 11px var(--mono); color: var(--quiet); }
.qa-m-cap { padding: 0 5px; border: 1px solid transparent; border-radius: 4px; transition: color .4s, border-color .4s; }
.qa-m-cap.on { color: var(--fg); border-color: var(--red); }
.qa-m-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 30px; }
.qa-m-budget { font: 600 14px var(--mono); color: var(--fg); opacity: 0; transition: opacity .4s; }
.qa-m-budget.on { opacity: 1; }
.qa-m-verdict { opacity: 0; transition: opacity .4s; }
.qa-m-verdict.on { opacity: 1; }
.qa-m-verdict.pass { border-color: var(--fg); }
.qa-m-verdict.fail { border-color: var(--red); color: var(--red); }

@media (max-width: 600px) {
  .qa-m-what { margin-left: 0; flex-basis: 100%; font-size: 12.5px; }
  .qa-m-ghead { flex-wrap: wrap; gap: 2px 10px; }
  .qa-m-limtag, .qa-m-allowtag { font-size: 10px; padding: 0 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .qa-m-mode, .qa-m-fill, .qa-m-lim, .qa-m-allow, .qa-m-cap, .qa-m-budget, .qa-m-verdict { transition: none; }
}
