/* Quality guide, NLL and perplexity: loaded only on the guide's page, after style.css. */
.qa-n-text { margin: 0; font: 500 17px/1.6 var(--sans); }
.qa-n-prompt { color: var(--soft); }
.qa-n-tok { color: var(--quiet); border-radius: 4px; transition: color .4s, background .4s; }
.qa-n-tok.done { color: var(--fg); }
.qa-n-tok.now { color: var(--purple); background: var(--glow); }
.qa-n-bars { position: relative; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; height: 140px; border-bottom: 1px solid var(--border-strong); }
.qa-n-box { position: relative; }
.qa-n-bar { position: absolute; left: 14%; right: 14%; bottom: 0; height: 0; border-radius: 4px 4px 0 0; background: var(--red); opacity: .85; transition: height .6s cubic-bezier(.2, .8, .2, 1); }
.qa-n-val { position: absolute; z-index: 1; left: 50%; bottom: 3px; transform: translateX(-50%); padding: 0 3px; border-radius: 3px; background: var(--bg); font: 600 11.5px var(--mono); color: var(--fg); white-space: nowrap; opacity: 0; transition: opacity .3s .3s, bottom .6s cubic-bezier(.2, .8, .2, 1); }
.qa-n-box.in .qa-n-val { opacity: 1; }
.qa-n-mean { position: absolute; left: 0; right: 0; bottom: 0; height: 0; border-top: 1.5px dashed var(--fg); opacity: 0; transition: bottom .7s ease, opacity .4s; pointer-events: none; }
.qa-n-mean.on { opacity: .8; }
.qa-n-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 14px; margin-bottom: 8px; }
.qa-n-head .label { margin: 0; }
.qa-n-legend { display: inline-flex; align-items: center; gap: 7px; font: 600 12px var(--mono); color: var(--fg); opacity: 0; transition: opacity .4s; }
.qa-n-legend.on { opacity: 1; }
.qa-n-swatch { width: 22px; height: 0; border-top: 1.5px dashed var(--fg); }
.qa-n-labels { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.qa-n-lab { display: grid; gap: 5px; justify-items: center; min-width: 0; opacity: .35; transition: opacity .4s; }
.qa-n-lab.in { opacity: 1; }
.qa-n-word { max-width: 100%; font: 600 12.5px var(--mono); color: var(--fg); }
.qa-n-track { position: relative; width: 100%; height: 6px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.qa-n-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--purple); transition: width .45s ease; }
.qa-n-p { font: 11px var(--mono); color: var(--quiet); white-space: nowrap; }
.qa-n-formula { justify-self: start; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); font: 500 13px var(--mono); color: var(--soft); transition: color .4s, border-color .4s; }
.qa-n-formula.done { color: var(--fg); border-color: var(--red); }

@media (max-width: 600px) {
  .qa-n-text { font-size: 15.5px; }
  .qa-n-bars, .qa-n-labels { gap: 4px; }
  .qa-n-bars { height: 130px; }
  .qa-n-bar { left: 8%; right: 8%; }
  .qa-n-val { font-size: 10px; }
  .qa-n-word { font-size: 10.5px; }
  .qa-n-p { font-size: 10px; }
  .qa-n-pp { display: none; }
  .qa-n-formula { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .qa-n-bar, .qa-n-val, .qa-n-mean, .qa-n-fill, .qa-n-tok, .qa-n-lab { transition: none; }
}
