/* ---------------------------------------------------------------------------
   The code frame: the one answer to "where is the problem".

   A finding names a rule and a reason; this says where to look. The line the
   statement starts on, the line either side of it when they are known, and a
   caret under the exact column, as wide as the word it points at.

   The whole block scrolls sideways rather than wrapping: a wrapped line puts
   the caret under the wrong character, which is worse than no caret at all.

   Loaded by both root layouts, because the scanner on the marketing page and
   the one in the application render the identical thing, and a caret that is
   one character out is a lie wherever it is drawn. The three colours are set
   on the block itself rather than taken from a palette, so neither stylesheet
   has to own a variable for the other.
   --------------------------------------------------------------------------- */

.pg-frame {
  --f-ink: #e8e8e8;
  --f-mid: #bdbdbd;
  --f-dim: #a0a0a0;
  background: #0a0a0a;
  border-left: 2px solid var(--sev-low);
  padding: 8px 0 8px 10px;
  overflow-x: auto;
  font: 400 12px/1.6 var(--font-mono);
  color: var(--f-dim);
  min-width: 0;
}
.pg-frame--critical { border-left-color: var(--sev-critical); }
.pg-frame--high { border-left-color: var(--sev-high); }
.pg-frame--medium { border-left-color: var(--sev-medium); }

.pg-frame__row { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; }
.pg-frame__n {
  color: #5a5a5a; text-align: right; white-space: pre; user-select: none;
  position: relative;
}
.pg-frame__src { white-space: pre; color: var(--f-mid); }
.pg-frame__row.is-hit .pg-frame__src { color: var(--f-ink); }
.pg-frame__row.is-hit .pg-frame__n { color: var(--f-ink); }
.pg-frame__caret { white-space: pre; color: var(--f-dim); }
.pg-frame__caret b { font-weight: 400; }
.pg-frame--critical .pg-frame__caret b { color: var(--sev-critical); }
.pg-frame--high .pg-frame__caret b { color: var(--sev-high); }
.pg-frame--medium .pg-frame__caret b { color: var(--sev-medium); }
.pg-frame--low .pg-frame__caret b { color: var(--sev-low); }
