/* CUSTOMSPATCHES Authority Display V4. External CSS, CSP style-src self. */
.cp-authority.csp-v4-authority .csp-v4-group {
  display: grid;
  grid-template-columns: max-content minmax(0,1fr);
  align-items: start;
  column-gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  min-width: 0;
}
.cp-authority.csp-v4-authority .csp-v4-codes {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 4px;
  padding: 1px 0 0;
  margin: 0;
}
.cp-authority.csp-v4-authority .csp-v4-code {
  box-sizing: border-box;
  display: inline-block;
  border: 1px solid #536075;
  border-radius: 3px;
  padding: 2px 5px;
  background: transparent;
  color: #e4ebf5;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  white-space: nowrap;
}
.cp-authority.csp-v4-authority .csp-v4-levels {
  display: block;
  min-width: 0;
  padding: 0;
  margin: 0;
}
.cp-authority.csp-v4-authority .csp-v4-line {
  display: flex;
  align-items: baseline;
  min-width: 0;
  margin: 0 0 5px;
  padding: 0;
  line-height: 1.45;
}
.cp-authority.csp-v4-authority .csp-v4-indent { margin-left: 18px; min-width: 0; }
.cp-authority.csp-v4-authority .csp-v4-arrow {
  display: inline-block;
  flex: 0 0 18px;
  width: 18px;
  color: #95a7b8;
  white-space: nowrap;
}
.cp-authority.csp-v4-authority .csp-v4-name {
  display: inline;
  min-width: 0;
  overflow-wrap: anywhere;
  margin: 0;
}

/* V5: Latinization directly below its original name, matching legacy display. */
.cp-authority.csp-v4-authority .csp-v4-name {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.cp-authority.csp-v4-authority .csp-v5-original {
  display: block;
}
.cp-authority.csp-v4-authority .csp-v5-latin {
  display: block;
  font-size: 0.79em;
  line-height: 1.35;
  font-style: italic;
  font-weight: 400;
  color: #9babc0;
  margin-top: 1px;
  overflow-wrap: anywhere;
}

/* Compact Authority Display V1: typography and vertical spacing only.
   Preserve language boxes, layout grid, staircase indentation and Latinization. */
.cp-authority.csp-v4-authority .csp-v4-levels {
  font-size: 12px;
}
.cp-authority.csp-v4-authority .csp-v4-line {
  font-size: 12px;
  line-height: 1.30;
  margin-bottom: 2px;
}
.cp-authority.csp-v4-authority .csp-v4-group {
  margin-bottom: 8px;
}
.cp-authority.csp-v4-authority .csp-v5-latin {
  font-size: 10px;
  line-height: 1.25;
  margin-top: 1px;
}
