/* ---- 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;
}
/* Three to a row, equal widths, so the six never sit as four and two
   (bug hunt 2026-10-09, L6); one to a row in a narrow panel. */
.aucra-blank-kinds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
@container aucra-region (max-width: 636px) {
  .aucra-blank-kinds {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* A caption with an (i): the (i) stays on the caption's line (L3). */
.aucra-register-caption {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
/* 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 ---- */

/* Targets, Compromises and Source each on a line of their own, so every row
   reads the same way (bug hunt 2026-10-09, M4); the flex wrap put Source
   beside Compromises on one row and under it on the next. */
.aucra-threat-register .aucra-register-under-cell {
  flex-direction: column;
  /* A wrapping column sizes its line to the widest group's one-line width,
     so the chip groups ran past the cell and 6.4.3 scrolled sideways (#259). */
  flex-wrap: nowrap;
  align-items: stretch;
}
.aucra-threat-register .aucra-points-second {
  margin-left: 0;
}
/* 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: 12px;
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps);
  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: 13px;
  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;
}
/* In a phone wide panel the name keeps the line beside the id, and the
   threats and the two actions go under it, in the name's column. */
@container aucra-region (max-width: 636px) {
  .aucra-by-asset-line {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  .aucra-by-asset-threats,
  .aucra-by-asset-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}
/* A threat id on an asset's line: the id alone, read as a chip. */
.aucra-threat-id {
  font-size: 13px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
}

/* 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:not(.q-select) .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: two lines, then cut, with the full name in the
   tooltip, because a threat's name is a sentence as often as not and the
   tooltip needs a hover or a long press, which a keyboard never gives
   (three readers, 2026-10-09, M6). */
.aucra-risk-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 13.5px;
  line-height: 1.35;
}
/* 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: var(--weight-bold);
}
/* 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: 13px;
  color: var(--muted);
}
/* 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;
  }
}

/* A register's scroll cue (`kit/scroll_cue.py`) says nothing while the
   register has no row: an empty register's caption row alone is no reason
   to scroll (visual check B12). */
.aucra-scroll-cue:has(+ .aucra-scroll-wrap .aucra-register):not(:has(+ .aucra-scroll-wrap .aucra-register-row)) {
  display: none;
}
.aucra-scroll-wrap:has(.aucra-register):not(:has(.aucra-register-row))::after {
  display: none;
}
/* A card that opens with a register's cue: the cue is hidden at most widths,
   so the register's head is the card's first row and draws no top line. */
.aucra-section-card > .aucra-scroll-cue:first-child + .aucra-scroll-wrap
  > .aucra-register:first-child > .aucra-register-head:first-child {
  border-top: 0;
}

/* A row handed over from the threat model (issue #69): the notice ends the
   row's second line, in the stale line's size, its button the line's own
   words underlined, as 6.5's Confirm is. */
.aucra-threat-handed {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}
.aucra-threat-handed:empty {
  display: none;
}
.aucra-threat-handed .aucra-btn {
  height: 24px;
  min-height: 24px;
  padding: 0;
  font-size: 12px;
  color: var(--gold-deep);
  text-decoration: underline;
}
/* 6.4.4's attack potential fold (#244): the five factor selects side by side
   while they fit, one under another on a phone, then the reading line. */
.aucra-attack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px 12px;
  padding-bottom: 8px;
}
.aucra-attack-reading {
  font-size: 13px;
}
/* 6.3's read only mapping of the five ratings to the likelihood steps. */
.aucra-attack-map {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 16px;
  font-size: 13px;
  padding-top: 6px;
}
/* 6.3's attack potential card: the inset of the other 6.3 bands. Quasar's
   40px tick area carries its 20px box in the middle, so the area moves 10px
   left and the box lines up with the lines under it. */
.aucra-attack-band {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 18px;
}
.aucra-attack-band > .aucra-check {
  margin-left: -10px;
}
