/* 6.4.5 Risk evaluation. The register is 6.4.4's row shape with the two selects
   replaced by what the tool reads and what the reader answers: the comparison
   with the 6.3 line, and the verdict pair of `kit/verdict.py`. */

/* The 6.3 line where the comparing happens, read only and always visible: one
   sentence needs no fold (plan D13). It wears the scheme fold's own inset so
   the two register pages open the same way. */
.aucra-line-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 18px 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--wash-head);
}
.aucra-line-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.aucra-line-title {
  font-size: 13px;
  color: var(--muted);
}
.aucra-line-sentence {
  font-size: 13.5px;
  line-height: 1.5;
}
/* No line on 6.3 yet: the sentence is the one thing to do about it. */
.aucra-line-unanswered {
  color: var(--gold-deep);
}

/* The mockup's row: the same air above and below the line, as on 6.4.4. */
.aucra-evaluation-register .aucra-register-line {
  padding: 8px 18px;
}
/* The justification is three rows on the mockup, and Quasar's autogrow floor is
   one and a bit: the box says how much is wanted before anything is typed. */
.aucra-evaluation-register .aucra-register-detail .aucra-control .q-field__control {
  min-height: 80px;
}
/* A threat 6.4.4 has not estimated: nothing to evaluate, so the name is muted
   and the row carries no chevron and no verdict pair (plan D11). */
.aucra-evaluation-muted {
  color: var(--muted);
}
/* The comparison the tool reads: what the 6.3 line says about this risk, and
   under it what follows from it (plan D3). */
.aucra-compare {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 40px;
  font-size: 12.5px;
}
.aucra-compare-first {
  font-weight: 500;
}
.aucra-compare-second {
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--muted);
}
/* A verdict that departs from the reader's own line, or one made against a risk
   that has since moved: gold, the colour every clause page gives a gap the
   reader is asked to look at (plans D4 and D7). */
.aucra-compare-gold {
  color: var(--gold-deep);
}
/* The verdict pair and, under it, the one gap the closed row shows: an accepted
   risk with no justification yet (plan D6). */
.aucra-verdict-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 40px;
}
.aucra-verdict-gap {
  font-size: 11.5px;
  color: var(--gold-deep);
}
/* The open row's second read out: the estimate as 6.4.4 recorded it, on the
   same baseline grid as the threat above it. */
.aucra-estimate-read {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  font-size: 12.5px;
  line-height: 1.5;
}

/* The pair stacks into two lines of one, the shape 6.5's chip set took: neither
   word may be cut, and stacked they fit the flat 120px track of
   `evaluations/register.py` at every width, which leaves the threat's name the
   rest. The hairline between the options runs along the new edge. */
.aucra-evaluation-register .aucra-verdict {
  flex-direction: column;
  align-items: stretch;
}
.aucra-evaluation-register .aucra-verdict-option + .aucra-verdict-option {
  border-left: 0;
  border-top: 1px solid var(--line-control);
}

/* At a narrow desktop the comparison is the wide part of the row and the
   threat's name is the part a reader needs, so below 1200px the risk and the
   comparison give way while the name keeps a floor. The track list is the
   register's own with the page columns of `evaluations/register.py` narrowed:
   chevron, id, name, the risk, the comparison, the verdict. */
@media (max-width: 1200px) {
  .aucra-evaluation-register {
    --aucra-cols-narrow: 20px 44px minmax(130px, 1fr) 84px minmax(115px, 150px)
      120px;
  }
  .aucra-evaluation-register .aucra-register-line,
  .aucra-evaluation-register .aucra-register-head {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* 6.5 Risk treatment. The register is 6.4.5's row shape with the comparison and
   the verdict pair replaced by what 6.4.5 decided, read only, and the four
   options 6.5.3 names as a chip set. */

/* The four options at the drawing's size, on this register only: the kit's pill
   set is 12px in 3px 9px, which reads small under a row of 13.5px names. The
   radius, the gaps and the ink of a picked chip stay the kit's. */
.aucra-treatment-register .aucra-chip-toggle {
  font-size: 12.5px;
  padding: 6px 10px;
}

/* The mockup's row: the same air above and below the line, as on 6.4.5. */
.aucra-treatment-register .aucra-register-line {
  padding: 8px 18px;
}
/* The justification is three rows on the mockup, and Quasar's autogrow floor is
   one and a bit: the box says how much is wanted before anything is typed. */
.aucra-treatment-register .aucra-register-detail .aucra-control .q-field__control {
  min-height: 80px;
}
/* The verdict as 6.4.5 recorded it, and under it the tool's one reading of it:
   the risk was accepted above the reader's own 6.3 line (plan D12). */
.aucra-treatment-verdict {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 40px;
  font-size: 12.5px;
}
/* A link, because nothing here writes a verdict and the words are the way to
   the 6.4.5 row; it reads as the plain cell it replaces until it is reached.
   The kit paints a gap link gold from `a.aucra-gap-link`, and this verdict is
   no gap, so the rule carries both classes and the type: one step above the
   kit's, which leaves kit.css in the order it was written. */
a.aucra-gap-link.aucra-treatment-verdict-read {
  color: var(--text);
  text-decoration: none;
}
.aucra-treatment-verdict-read:hover,
.aucra-treatment-verdict-read:focus-visible {
  text-decoration: underline;
}
.aucra-treatment-noverdict {
  color: var(--gold-deep);
}
.aucra-treatment-above {
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--muted);
}
/* The chip set and the stack of lines under it. */
.aucra-treatment-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 40px;
}
.aucra-treatment-gaps {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* Every gap the closed row shows, gold, the colour every clause page gives a
   line the reader is asked to look at (plans D4, D6, D7, D8 and D9). */
.aucra-treatment-gap {
  display: flex;
  align-items: center;
  /* The line is 11.5px, so its own box is 15.5px: the floor gives the pointer
     and the finger the 24px a target is asked to be, without moving the words
     apart (the stack keeps its 2px). */
  min-height: 24px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--gold-deep);
}
.aucra-treatment-stale {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--gold-deep);
}
/* Confirm sits at the end of the stale line, so it is the line's own words
   underlined rather than a button with a box of its own. Its box is the 24px
   the gap buttons carry, so every target on the row is the same size. */
.aucra-treatment-confirm.aucra-btn {
  height: 24px;
  min-height: 24px;
  padding: 0;
  font-size: 11.5px;
  color: var(--gold-deep);
  text-decoration: underline;
}
/* The reminder of 972 is what to do next, not a gap, so it is muted and not
   counted against the clause (plan D8). */
.aucra-treatment-reminder {
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--muted);
}
/* The part of the open band that follows the picks: the reason box and the
   inherent block, drawn again on every chip click. It keeps the band's own
   spacing, so a redraw never moves what is above or below it. */
.aucra-treatment-lower:not(:empty) {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* The two boxes an inherent risk carries, indented under their tick (plan D7). */
.aucra-inherent-boxes:not(:empty) {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-left: 24px;
}
/* 6.3's methodology where the aligning is judged, above criterion 2's tick,
   in the shape of 6.4.5's line box (plan D15). */
.aucra-methodology-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--wash-head);
}
.aucra-methodology-text {
  font-size: 13.5px;
  line-height: 1.5;
}
/* No methodology on 6.3 yet: the gold line stands in place of the text, so it
   is never drawn twice. */
.aucra-methodology-empty {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--gold-deep);
}

/* The chips wrap into two lines of two at every width, which the widest pair
   (Acceptance and Transfer, 163.4px with the gap between them) holds in the
   170px column of `treatments/register.py`. Below 1200px the risk and the
   verdict give way as well, so the threat's name keeps its share. The track
   list is the register's own with the page columns narrowed: chevron, id,
   name, the risk, the verdict, the chips. */
@media (max-width: 1200px) {
  .aucra-treatment-register {
    --aucra-cols-narrow: 20px 44px minmax(130px, 1fr) 84px 104px 170px;
  }
  .aucra-treatment-register .aucra-register-line,
  .aucra-treatment-register .aucra-register-head {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* ---- the stabilisation pass of 2026-09-09 ---- */

/* overview_matrix.py: the two counted columns. A count reads as the number it
   is, in the gold every page gives a line to look at; nothing open is a muted
   0, as an empty cell is muted. */
.aucra-cmatrix-count {
  font-size: 0.78rem;
  color: var(--gold-deep);
}
.aucra-cmatrix-zero {
  color: var(--muted);
}

/* risk_criteria/scheme.py: what the acceptance line decides, read from the
   6.4.5 verdicts, in the voice and the size of the register footers. */
.aucra-threshold-decides {
  font-size: 12.5px;
  color: var(--muted);
}

/* assets/objectives.py: the lead on a row's chip set, so the row set reads as
   this asset's pick and the set at the top of the band as the shared list. */
.aucra-row-objectives-lead {
  font-size: 12px;
  color: var(--muted);
}

/* kit/standard_text.py: the mark beside a quoted line that carries one of the
   draft standard's own slips. Small, muted and never in the reading line's
   weight: the words are the standard's and only the mark is the tool's. */
.aucra-source-slip {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.75em;
  color: var(--muted);
  cursor: help;
}
