/* Review-only marks for the contract iframe on /trade/<id>/versions.

   The document is the same page the builder previews — contract.html rendered
   from the stored .docx — with this sheet in place of contract-preview.css. So
   nothing here is editable; what this sheet adds is two kinds of highlight, and
   they are told apart by colour:

   * yellow — a value that came from the trade record. The same yellow the
     builder uses for merged values, so the two pages agree about what is data.
     `review.mark_fields` recovers these spans from the template's placeholders;
     the stored document itself no longer carries the tokens.
   * blue — a paragraph changed since the previous version. Not red: red on a
     contract reads as "wrong", and an edit the Desk made deliberately is not
     wrong, it is what the reviewer is here to look at. Wording the earlier
     version had and this one lacks stays where it was, struck through in grey.

   The first draft carries yellow only — there is no earlier version to differ
   from, and comparing it with its own template turned every merged value into
   a "change", which was a page of red over a document nobody had edited.

   Excluded from PDF export like the preview sheet, so no mark reaches a real
   document. */

/* A value taken from the trade record. */
.field-val {
  background-color: #fff9c4;
  border-radius: 2px;
  padding: 0 2px;
}

/* Tokens still in the stored document — the ones completed by hand in Word, or
   one the merge never filled — carry the preview's classes but no marking here:
   this page is about the trade's values and the Desk's edits, and a coloured
   token would read as one of them. */
.field-val.is-manual,
.field-val.is-unfilled,
.field-val.is-blank {
  background-color: transparent;
  color: inherit;
  font: inherit;
  border: 0;
  padding: 0;
}

/* Changed since the version before: new, or reworded. The wash is carried into
   the margin so a one-word change to a long paragraph is still found by
   scanning the left edge. Text colour is left alone so the yellow fields inside
   a changed paragraph stay legible as fields. */
.doc-p.is-added {
  background: #eff6ff;
  box-shadow: inset 3px 0 0 #1d4ed8;
  padding-left: 6px;
}

/* A paragraph the earlier version had, left where it stood and struck through,
   so a reviewer sees the wording that went and not just that something did.
   Grey rather than blue: it is context for the change beside it, not the
   change. Every value in it is plain text — the placeholder spans belong to the
   live document, not to a paragraph that is no longer in it. */
.doc-p.is-removed {
  color: #6b7280;
  text-decoration: line-through;
  text-decoration-color: rgba(107, 114, 128, 0.8);
  background: #f6f7f9;
  box-shadow: inset 3px 0 0 #9aa2af;
  padding-left: 6px;
}

/* The page sits inside a frame the review page sizes to its content, so the
   letter-size minimum height would only add empty paper below a short draft. */
.page {
  min-height: 0;
}
