.terms-workspace { margin-top: 1rem; padding: 1.2rem; border: 1px solid var(--line, #dfd9e6); border-radius: .75rem; background: var(--surface, #fff); min-width: 0; }
.terms-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.terms-heading h3 { margin: 0; font-size: 1.12rem; }
.terms-body, .terms-panel { min-width: 0; }
.terms-prose { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.terms-panel > a { display: block; margin-block: .65rem; overflow-wrap: anywhere; }
.terms-admin-document, .terms-shared-document { display: flex; gap: .6rem; flex-wrap: wrap; align-items: baseline; margin-block: .65rem; overflow-wrap: anywhere; }
.terms-shared-documents { margin-top: .85rem; padding-top: .8rem; border-top: 1px solid var(--line, #dfd9e6); }
.terms-shared-documents h4 { margin: 0 0 .6rem; }
.terms-outcome { padding: .8rem 1rem; border-left: 3px solid var(--violet, #130823); background: var(--surface-subtle, #f6f5f8); }
.terms-history { margin-top: 1.1rem; padding-top: .8rem; border-top: 1px solid var(--line, #dfd9e6); }
.terms-history > summary { cursor: pointer; font-weight: 600; padding-block: .4rem; }
.terms-history > summary:focus-visible { outline: 2px solid var(--violet, #130823); outline-offset: 3px; }
.terms-record-documents { min-width: 0; }
.app-action-dialog .terms-record-documents .terms-keep-document { display: flex; }
.terms-send-fields { min-width: 0; border: 1px solid var(--line, #dfd9e6); padding: .9rem; margin-top: .8rem; }
.terms-recipient-row { display: flex; flex-wrap: wrap; gap: .35rem 1rem; align-items: center; border-top: 1px solid var(--line, #dfd9e6); padding-block: .6rem; }
.terms-recipient-row strong { flex: 1 1 100%; overflow-wrap: anywhere; }
.terms-recipient-row .terms-keep-document { margin: 0; }
.terms-keep-document { display: flex; gap: .6rem; align-items: start; margin: .6rem 0; overflow-wrap: anywhere; }
.terms-keep-document input { width: auto; flex: 0 0 auto; }
.terms-record-documents input[type="file"] { max-width: 100%; }
.terms-more-actions > summary, .terms-optional-note > summary { cursor:pointer; min-height:44px; padding:.65rem 0; font-size:.85rem; }
.terms-more-actions .button { color:var(--error, #b91c1c); }
.terms-recipient-summary { font-size:.8rem; color:var(--muted); margin:.75rem 0 0; }
.terms-confirm-dialog .terms-send-fields { margin:0 0 1rem; border:0; padding:0; }
.terms-confirm-dialog .terms-recipient-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:.5rem 1rem; align-items:center; padding:.75rem 0; }
.terms-confirm-dialog .terms-recipient-row strong { font-size:.85rem; }
.terms-confirm-dialog .terms-keep-document { min-height:44px; align-items:center; font-size:.85rem; }
.terms-confirm-dialog { overflow:hidden; }
.terms-confirm-dialog #editor-form { display:flex; flex-direction:column; max-height:calc(90dvh - 3rem - 2px); }
.terms-confirm-dialog :is(.dialog-heading, #dialog-description, #dialog-error, .dialog-actions) { flex:0 0 auto; }
.terms-confirm-dialog #dialog-fields { flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; }
.terms-confirm-dialog #dialog-error { margin:.75rem 0 0; }
.terms-confirm-dialog .dialog-actions { position:static; bottom:auto; margin-top:1rem; background:var(--surface, #fff); }
.terms-confirm-dialog .terms-optional-note { margin-top:.75rem; }
@media (max-width: 600px) {
  .terms-workspace { padding: .85rem; }
  .terms-workspace .actions { align-items: stretch; }
  .terms-workspace .actions > .button { flex: 1 1 auto; }
  .terms-confirm-dialog .terms-recipient-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .terms-confirm-dialog .terms-recipient-row strong { grid-column:1/-1; }
}
