/* 7.4 Cybersecurity architecture and design (`ui/pages/clauses/architecture/`).
   C1, the documented design with clause 5 read out and the due diligence
   line; C2, the elements with the threat model line and what 7.3 asks of the
   page at its top. The register, the strip, the band and the document line
   reuse 7.3's classes (`pages_requirements.css`), loaded before this sheet.
   Narrow rules follow the region panel's container (`aucra-region`), never
   the viewport, so the assistant drawer switches them too. */

.aucra-arch-muted {
  font-size: 12.5px;
  color: var(--muted);
}
.aucra-arch-id {
  font-size: 12px;
  color: var(--muted);
}
.aucra-arch-none {
  font-size: 13px;
}
/* A notice: the muted style, never a gap's gold (plan D3, D6, D7). */
.aucra-arch-notices {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.aucra-arch-notice,
a.aucra-gap-link.aucra-arch-notice {
  font-size: 12px;
  line-height: 1.4;
  font-style: italic;
  color: var(--muted);
}
a.aucra-gap-link.aucra-arch-notice {
  text-decoration: underline dotted;
}
/* A read only box: clause 5's texts, the boundary read from the diagram and
   what an element reads through its requirements. */
.aucra-arch-read {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafb;
  font-size: 13.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.aucra-arch-read-empty {
  font-size: 13px;
}

/* ---------- C1 (plan D3, D5, D6) ---------- */

/* In line with the lettered blocks' fields: the 18px inset, the 34px letter
   track and its 12px gap. */
.aucra-arch-principles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 18px 16px 64px;
  border-top: 1px solid var(--line);
}
.aucra-arch-principles-head,
.aucra-arch-line-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}
/* A field head inside a line of its own takes its words' width, so the link
   after it stays on the line. */
.aucra-arch-principles-head > .aucra-field-head,
.aucra-arch-asks-head > .aucra-field-head,
.aucra-arch-line-row > .aucra-field-head {
  width: auto;
}
.aucra-arch-line {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 18px 14px;
  background: #f8fafb;
  border-bottom: 1px solid var(--line);
}
.aucra-arch-line-words {
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.45;
}
/* Beside its link the line takes the width; alone in the column it is one line. */
.aucra-arch-line-row > .aucra-arch-line-words {
  flex: 1 1 320px;
}
.aucra-arch-gaps {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
}
.aucra-arch-gap {
  font-size: 12.5px;
  color: var(--gold-deep);
}
.aucra-arch-third {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 6px;
}
.aucra-arch-third-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  font-size: 13px;
}
.aucra-arch-document {
  margin-top: 0;
}

/* ---------- C2 (plan D4, D7, D14) ---------- */

.aucra-arch-lines > .aucra-arch-line:last-child {
  border-bottom: 1px solid var(--line);
}
.aucra-arch-asks-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}
.aucra-arch-asks-head .aucra-field-label {
  font-size: 13.5px;
}
.aucra-arch-asks-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  min-height: 30px;
}
.aucra-arch-asks-words {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.aucra-arch-asks-acts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.aucra-arch-aside {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.aucra-arch-aside-title {
  font-size: 13px;
  font-weight: 600;
}
.aucra-arch-aside-box {
  grid-column: 2 / -1;
}
/* C2's head holds its note, Suggest rows and Add element: the name keeps its
   line and the right hand group wraps under it rather than squeezing it. */
.aucra-region-head.aucra-arch-c2-head:has(.aucra-head-right) {
  flex-wrap: wrap;
}
.aucra-arch-c2-head .aucra-region-name {
  white-space: nowrap;
}
.aucra-arch-c2-head .aucra-head-right {
  flex-shrink: 1;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
  max-width: 100%;
}
/* The register: Id, Element, Kind, Trust boundary, Requirements. */
.aucra-arch-register.aucra-req-register .aucra-register-head,
.aucra-arch-register.aucra-req-register .aucra-register-line,
.aucra-arch-register.aucra-req-register .aucra-register-under {
  --aucra-cols-narrow: 20px 60px minmax(0, 1fr) 150px 170px 150px;
}
.aucra-arch-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.aucra-arch-cell {
  font-size: 12.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.aucra-arch-register .aucra-req-cut.aucra-arch-cell {
  font-size: 13.5px;
}
.aucra-arch-under {
  font-size: 11.5px;
}
.aucra-arch-strip {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 16px;
}
.aucra-arch-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.aucra-arch-choice .aucra-chip-set {
  gap: 6px 8px;
}
.aucra-arch-rdps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafb;
  font-size: 13px;
}
.aucra-arch-rdps-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.aucra-arch-derived {
  font-size: 13px;
}
/* The two PASS lines of the sign off, each on a line of its own (D9). */
.aucra-arch-attest .q-checkbox__label {
  white-space: pre-line;
}

/* ---------- narrow: the region panel's own width ---------- */

@container aucra-region (max-width: 759px) {
  .aucra-arch-register.aucra-req-register .aucra-register-head,
  .aucra-arch-register.aucra-req-register .aucra-register-line,
  .aucra-arch-register.aucra-req-register .aucra-register-under {
    --aucra-cols-narrow: 20px 56px minmax(120px, 1fr) 110px 120px 110px;
  }
}
@container aucra-region (max-width: 559px) {
  .aucra-arch-principles {
    padding-left: 18px;
  }
  .aucra-arch-asks-row {
    grid-template-columns: 56px minmax(0, 1fr);
  }
  .aucra-arch-asks-acts,
  .aucra-arch-aside-box {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .aucra-arch-pair,
  .aucra-arch-rdps-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
