/* ---- pages/clauses/assets/: the 6.4.2 asset register ---- */

/* The objectives band: the ruled strip at the top of region C, the same shape
   as the 6.3 scheme band, because the rows below pick from it. */
.aucra-objectives-band {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--wash-band);
}
/* The kind cell sits in a fixed track, so its label is cut rather than wrapped
   and the standard's full item is read from the tooltip. The select grows to
   its longest label unless it is held to the column it sits in. */
.aucra-kind-cell {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
/* The kind cell is 40px like every other control on the page. */
.aucra-kind-cell .q-field__control {
  min-height: 40px;
  height: 40px;
}
.aucra-kind-cell .q-field__marginal {
  height: 40px;
}
.aucra-kind-cell .q-select__dropdown-icon {
  font-size: 14px;
}
.aucra-kind-cell .q-field__native {
  min-width: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}
/* The row of the six kinds of 6.4.2.1: a ruled strip under the register, the
   same shape as the objectives band above it. */
.aucra-kind-band {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--wash-band);
}
/* The empty state: the dashed box that points at the six kinds of 6.4.2.1. */
.aucra-register-blank {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 18px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--mist);
}
.aucra-blank-line {
  font-size: 0.84rem;
}
.aucra-blank-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
/* The counts under the register: two lines, tighter than the standard's own
   footnote below region D. */
.aucra-register-footer {
  gap: 4px;
  font-size: 0.81rem;
  line-height: 1.5;
}

/* ---- pages/clauses/threats/: the 6.4.3 threat register ---- */

/* The NOTE of 6.4.3.2, under the four input rows and inside the same panel. */
.aucra-input-note {
  padding: 10px 18px 14px;
  border-top: 1px solid var(--line);
}
/* A NOTE of the standard is drawn smaller and muted, as the mockup draws it:
   it is a note on the items above, not one of them. */
.aucra-input-note .aucra-para {
  font-size: 13px;
  color: var(--muted);
}
/* A lead label and the chips it leads: one group, so the group wraps as a
   whole and the chips wrap inside it. The label is never left at the end of a
   line with its own chips on the next one. */
.aucra-points-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}
/* The chips beside the label take what is left and wrap inside it; without a
   zero floor a flex item never shrinks below its widest chip row. */
.aucra-points-group > *:not(.aucra-points-lead) {
  min-width: 0;
}
/* The two lead labels of a row's second line, the small caps the mockup draws
   before the asset chips and before the objective toggles. */
.aucra-points-lead {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  /* The chips of the group are 26px tall, so the label sits on the first row
     of chips rather than at the top of a group that wrapped. */
  line-height: 26px;
  flex: 0 0 auto;
}
.aucra-points-second {
  margin-left: 10px;
}
/* The SOURCE part of the second line: the source as one read line, or the way
   to write one. The value is the row's read size; the ghost is the gold of the
   other prompts, as the gap under a 6.4.5 verdict is. */
.aucra-source-read {
  font-size: 0.78rem;
  line-height: 26px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aucra-source-gap {
  font-size: 0.78rem;
  line-height: 26px;
  color: var(--gold-deep);
}
/* What the row says while no asset is targeted, in place of the toggles. */
.aucra-points-hint {
  font-size: 0.78rem;
  color: var(--muted);
}
/* The "For each asset" band under the register: the output as 6.4.3.4 words
   it, the same ruled strip as the objectives band on 6.4.2. */
.aucra-by-asset-band {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--wash-band);
}
.aucra-by-asset-line {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1.2fr) auto;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.aucra-by-asset-id {
  font-size: 0.78rem;
  color: var(--muted);
}
.aucra-by-asset-name {
  font-size: 0.84rem;
}
/* Add a threat and Suggest threats for this asset share the line's last
   column, so the two read as one pair beside the threats. */
.aucra-by-asset-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.aucra-by-asset-threats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
/* A threat id on an asset's line: the id alone, read as a chip. */
.aucra-threat-id {
  font-size: 11.5px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
}

/* The band's second note, under the standard's own (plan D15): the coverage
   lines below are a prompt, so the note says what an empty cell means. */
.aucra-band-second-note {
  margin-top: -6px;
  font-size: 0.78rem;
  color: var(--muted);
}
/* One asset's line and the coverage lines that belong to it. */
.aucra-by-asset-group {
  display: flex;
  flex-direction: column;
}
/* The coverage lines sit under the asset's own line, indented past the id so
   they read as belonging to it. */
.aucra-pair-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 2px 0 6px 58px;
}
.aucra-pair-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
/* The two ways out of a pair are one click away but not read at rest: a band
   of three assets carries a dozen of them, and a column of gold chips is the
   thing to read. They keep their box and their place in the tab order, so the
   line does not move and a Tab into one reveals it; opacity, not visibility,
   because a hidden element cannot be focused. No transition: the switch is
   plain, so the reduced motion block has nothing to turn off. */
.aucra-pair-line .aucra-btn-text {
  opacity: 0;
}
.aucra-pair-line:hover .aucra-btn-text,
.aucra-pair-line:focus-within .aucra-btn-text {
  opacity: 1;
}
/* The line's own 4px gap plus the 6px hover ground each ghost carries would
   set the two labels 16px apart; the mockup's is 12px. */
.aucra-pair-line .aucra-btn-text + .aucra-btn-text {
  margin-left: -4px;
}
/* A pair with a reason: the chip is muted, not gold, because the question has
   been answered; the reason itself is in its tooltip and in the box below. */
.aucra-pair-reasoned {
  font-size: 12px;
  color: var(--muted);
  padding-left: 6px;
}
.aucra-pair-reason {
  max-width: 640px;
  padding: 0 0 0 6px;
}
/* The band is already a wash, so the box needs its own ground to read as
   something to type in, as an open register row's fields do. */
.aucra-pair-reason .aucra-control .q-field__control {
  background: var(--panel);
}
/* Which pair the open box answers: several can be open under one asset, so the
   box says so in the muted words of the band above it. */
.aucra-pair-reason-lead {
  display: block;
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 2px;
}
/* The counted line above the attestation, under the gold one when both are
   drawn: what the tool can count towards sufficiency (plan D14). */
.aucra-evidence-line {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}
.aucra-not-assessed + .aucra-evidence-line {
  margin-top: 10px;
}

/* ---- pages/clauses/risks/: the 6.4.4 risk register ---- */

/* The scheme fold sits at the top of region C, under the head, with the
   mockup's own margins: the boxed fold's default is the one a fold under a
   requirement wears, which puts its air on the wrong side here. */
.aucra-scheme-fold.aucra-boxed {
  margin: 14px 18px 4px;
}
/* The body sits on the head's own inset, as the mockup draws it. */
.aucra-scheme-fold .q-expansion-item__content {
  padding: 0 12px 12px;
}
.aucra-scheme-fold .q-item {
  padding: 9px 12px;
}
/* The line under the fold when a 6.3 step carries no description: a pick can
   only mean the same thing to everyone once the steps say what they mean. */
.aucra-scheme-gap {
  padding: 0 18px 4px;
  font-size: 12.5px;
  color: var(--muted);
}
/* The same line on 6.3, drawn under the two scales. The band carries its own
   inset, so the line takes none of its own there. */
.aucra-scheme-band .aucra-scheme-gap {
  padding: 0;
}
/* The mockup's row: the same air above and below the line, because a 6.4.4 row
   has no second line under it to carry the bottom half. */
.aucra-risk-register .aucra-register-line {
  padding: 8px 18px;
}
/* The rationale is two 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-risk-register .aucra-register-detail .aucra-control .q-field__control {
  min-height: 60px;
}
/* The option list is capped to its own column, so opening one select never
   covers the other. */
.q-menu.aucra-step-menu {
  max-width: 170px;
}
/* A step select sits in a fixed track, the 40px of every other control on the
   page, and is held to its column so a long step label is cut rather than
   growing the row. The kind cell of 6.4.2 wears the same shape. */
.aucra-step-cell {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.aucra-step-cell .q-field__control {
  min-height: 40px;
  height: 40px;
}
.aucra-step-cell .q-field__marginal {
  height: 40px;
}
.aucra-step-cell .q-select__dropdown-icon {
  font-size: 14px;
}
.aucra-step-cell .q-field__native {
  min-width: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}
/* The threat, read only: one line with the full name in the tooltip, because
   the row is a line and a threat's name is a sentence as often as not. */
.aucra-risk-name {
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* The risk the 6.3 matrix gives the pair, in the level's rank colour: the one
   memorable cell of the page, the same wash and ink the matrix wears. */
.aucra-risk-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--level-wash);
  color: var(--level-ink);
  font-size: 12.5px;
  font-weight: 500;
}
/* With a pick missing there is no cell to read, so the column says so quietly. */
.aucra-risk-none {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-size: 12px;
  color: var(--muted);
}
/* The open row: the threat as 6.4.3 recorded it, above the rationale. The lead
   labels are the small caps of a 6.4.3 row's second line, `.aucra-points-lead`. */
.aucra-risk-context {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
}
.aucra-risk-points {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
}
.aucra-risk-read {
  font-size: 12.5px;
}
.aucra-risk-missing {
  font-size: 12.5px;
  color: var(--muted);
}
/* One targeted asset: its id in mono, then its name, as the band on 6.4.3. */
.aucra-risk-target {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
}
.aucra-risk-target-id {
  font-size: 11px;
  color: var(--muted);
}
/* The footer's second line: the level counts, most severe first, each with the
   dot of its rank colour. */
.aucra-tally {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}
.aucra-tally-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.aucra-tally-sep {
  color: var(--line-strong);
}
.aucra-tally-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--level-ink);
}
/* Above criterion 2's tick while 6.3 is not self-assessed: what the risks are
   aligned with is the tool's starting point until then (plan D8). */
.aucra-not-assessed {
  font-size: 12.5px;
  color: var(--gold-deep);
}
/* 6.4.5 shows one line at a time, but a later page that stacks two must not let
   them run together. */
.aucra-not-assessed + .aucra-not-assessed {
  margin-top: 10px;
}

/* At a narrow desktop the two selects are the wide part of the row, and the
   threat's name is the part a reader needs, so below 1200px the name keeps a
   floor and the selects give way. The track list is the register's own with
   the page columns of `risks/register.py` narrowed: chevron, id, name, the two
   picks, the risk. */
@media (max-width: 1200px) {
  .aucra-risk-register {
    --aucra-cols-narrow: 20px 48px minmax(140px, 1fr) minmax(110px, 160px)
      minmax(110px, 160px) 100px;
  }
}
