.five-object-ribbon {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) 24px minmax(220px, 1.25fr) 24px minmax(180px, .8fr) minmax(180px, .7fr);
  align-items: stretch;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid #dce4ef;
  border-radius: 7px;
  background: #fff;
}
.five-object-ribbon > div {
  min-width: 0;
  padding: 9px 10px;
  border-left: 3px solid #1976a8;
  background: #f7fafc;
}
.five-object-ribbon small,
.five-object-ribbon b { display: block; }
.five-object-ribbon small { margin-bottom: 4px; color: #6b778c; font-size: 11px; }
.five-object-ribbon b { overflow-wrap: anywhere; color: #17243a; font-size: 13px; line-height: 1.45; }
.five-object-ribbon > i { align-self: center; color: #7790a9; font-style: normal; text-align: center; }
.five-object-ribbon .five-object-role { border-left-color: #c48b16; background: #fffbef; }

.five-cascade-tree { display: grid; gap: 5px; }
.five-cascade-level { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 8px; align-items: stretch; }
.five-cascade-level > span {
  display: grid;
  place-items: center;
  min-height: 62px;
  border: 1px solid #d8e1ed;
  border-radius: 6px;
  background: #f1f5f9;
  color: #44546a;
  font-size: 12px;
  font-weight: 700;
}
.five-cascade-nodes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 7px; }
.five-cascade-node {
  min-width: 0;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid #dce4ef;
  border-radius: 6px;
  background: #fff;
  color: #17243a;
  text-align: left;
}
.five-cascade-node b,
.five-cascade-node strong,
.five-cascade-node small { display: block; }
.five-cascade-node b { margin-bottom: 4px; font-size: 12px; }
.five-cascade-node strong { margin-bottom: 3px; color: #174f82; font-size: 13px; }
.five-cascade-node small { color: #738096; font-size: 10px; line-height: 1.4; }
.five-cascade-node.root { border-color: #8db5d2; background: #eef7fc; }
.five-cascade-node.gap { border-color: #e5b75c; background: #fff8e7; }
button.five-cascade-node { cursor: pointer; }
button.five-cascade-node:hover { border-color: #2f78a9; box-shadow: 0 3px 10px rgba(35, 76, 112, .1); }
.five-cascade-arrow { height: 12px; margin-left: 29px; color: #7b91a8; font-size: 12px; line-height: 12px; text-align: center; width: 62px; }
.five-gap.returned { border-color: #e5b75c; background: #fff9eb; }

.five-target-card.integrated { display: grid; gap: 5px; width: 100%; }
button.five-target-card.integrated { border: 1px solid #d5deea; color: inherit; text-align: left; cursor: pointer; }
.five-target-card.integrated.locked { background: #f3f5f7; }
.five-target-card.integrated.locked:hover { border-color: #9aacbf; }
.five-lock-summary,
.five-inherit-banner,
.five-performance-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 11px 12px;
  border: 1px solid #d9e3ee;
  border-radius: 6px;
  background: #f7fafc;
}
.five-lock-summary small,
.five-lock-summary b,
.five-inherit-banner small,
.five-inherit-banner b,
.five-performance-result small,
.five-performance-result b,
.five-performance-result span { display: block; }
.five-lock-summary small,
.five-inherit-banner small,
.five-performance-result small { color: #6f7c90; font-size: 11px; }
.five-inherit-banner > span { color: #536176; font-size: 12px; }
.five-locked-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid #d7dee7;
  border-radius: 5px;
  background: #eef1f4;
  color: #3e4a5c;
  text-align: left;
  cursor: pointer;
}
.five-locked-control span { overflow-wrap: anywhere; line-height: 1.45; }
.five-locked-control em { flex: 0 0 auto; color: #7b8798; font-size: 10px; font-style: normal; }
.five-locked-control:hover { border-color: #b3c0cd; background: #e8edf2; }
.five-foot-note { margin-right: auto; color: #66758a; font-size: 11px; }

.five-functional-views { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.five-functional-views > div {
  min-width: 0;
  padding: 11px;
  border: 1px solid #dce4ef;
  border-radius: 6px;
  background: #fff;
}
.five-functional-views small,
.five-functional-views b,
.five-functional-views span { display: block; }
.five-functional-views small { color: #6e7b90; font-size: 10px; }
.five-functional-views b { margin: 5px 0; color: #173c64; font-size: 15px; }
.five-functional-views span { color: #59687c; font-size: 11px; line-height: 1.45; }
.five-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.five-compare > div { min-width: 0; padding: 11px; border: 1px solid #dbe3ed; border-radius: 6px; background: #fff; }
.five-compare small,
.five-compare b,
.five-compare p,
.five-compare span,
.five-compare em { display: block; }
.five-compare small { color: #6d7b8f; font-size: 10px; }
.five-compare b { margin: 5px 0 8px; color: #173c64; font-size: 12px; }
.five-compare p,
.five-compare span,
.five-compare em { margin: 5px 0 0; color: #4f5d70; font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.five-compare em { color: #1d6a76; font-style: normal; }
.five-compare.drawer > div { background: #f9fbfd; }
.five-match-result { margin-top: 8px; padding: 9px 10px; border-left: 3px solid #16866c; background: #eaf8f3; color: #17614f; font-size: 11px; }

.five-rule-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 3200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 29, 44, .38);
}
.five-rule-modal { width: min(680px, calc(100vw - 48px)); max-height: calc(100vh - 48px); overflow: auto; border-radius: 7px; background: #fff; box-shadow: 0 18px 50px rgba(9, 25, 43, .24); }
.five-rule-modal-body { padding: 18px; }
.five-rule-lock-message { padding: 16px; border-left: 4px solid #c53f3f; background: #fff3f2; }
.five-rule-lock-message p { margin: 0; color: #5d2930; font-size: 14px; line-height: 1.75; }
.five-rule-lock-message p + p { margin-top: 12px; }
.five-rule-modal-copy { margin-bottom: 14px; padding: 10px 12px; border: 1px solid #dbe4ee; border-radius: 5px; background: #f7fafc; color: #516074; font-size: 12px; line-height: 1.6; }

.dste-agent-context {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(220px, 1.2fr) minmax(150px, .65fr) auto;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
  padding: 9px 10px;
  border: 1px solid #b9d3e5;
  border-radius: 6px;
  background: #f1f8fc;
}
.dste-agent-context > div { min-width: 0; }
.dste-agent-context small,
.dste-agent-context b { display: block; }
.dste-agent-context small { color: #6b778b; font-size: 10px; }
.dste-agent-context b { margin-top: 3px; color: #173f67; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.dste-agent-context button { min-height: 32px; padding: 0 10px; border: 1px solid #9dbbd1; border-radius: 5px; background: #fff; color: #1c5c89; font-size: 11px; cursor: pointer; }

@media (max-width: 1180px) {
  .five-object-ribbon { grid-template-columns: 1fr 20px 1fr; }
  .five-object-ribbon > div:nth-of-type(3), .five-object-ribbon .five-object-role { grid-column: auto; }
  .five-functional-views, .five-compare { grid-template-columns: 1fr; }
}
