/* OL-02 change screen (/changes). Uses the tokens of styles.css; no inline styles (CSP style-src 'self'). */
body[data-screen="changes"] { color: var(--text); font-family: var(--font-ui); font-size: var(--fs-body); line-height: var(--lh); }
.cx { max-width: 1120px; margin: 0 auto; padding: 0 var(--s5) var(--s7); }
.cx-top { background: var(--ink); color: var(--on-ink); box-shadow: 0 0 0 100vmax var(--ink); clip-path: inset(0 -100vmax); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); min-height: 52px; padding: var(--s2) 0; }
.cx-top .who { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); font-size: var(--fs-small); }
.cx-top button { background: transparent; color: var(--on-ink); border-color: #6f8790; }
.cx-top button:hover:not(:disabled) { background: var(--ink-2); }
.cx-top a { color: var(--on-ink); }
.cx-top :focus-visible { outline-color: var(--focus-on-ink); }
.cx-brand { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.cx h1 { font-size: var(--fs-title); margin-top: var(--s5); }
.cx h2 { margin-top: var(--s6); }
.cx input[type="password"], .cx input[type="date"] { font: inherit; width: 100%; min-height: var(--control-h); padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; color: var(--text); }
.cx textarea { font-family: var(--font-ui); }
.cx #cx-portable .field { min-width: 0; }
.cx #cx-portable input[type="file"] { width: 100%; min-width: 0; max-width: 100%; }
.cx-msg { border-left: 4px solid var(--line-strong); background: var(--surface); padding: var(--s2) var(--s3); margin: var(--s3) 0; max-width: var(--measure); }
.cx-msg:empty { display: none; }
.cx-msg[data-kind="error"] { border-color: var(--red); background: var(--red-soft); }
.cx-msg[data-kind="ok"] { border-color: var(--green); background: var(--green-soft); }
.cx-login { max-width: 420px; }
.cx-row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: end; }
.cx-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.cx-table th, .cx-table td { text-align: left; vertical-align: top; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); }
.cx-table th { font-size: var(--fs-small); color: var(--muted); font-weight: 600; }
.cx-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.cx-status { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); margin: var(--s3) 0; padding: 0; list-style: none; }
.cx-status li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s2) var(--s3); }
.cx-status .k { display: block; font-size: var(--fs-hint); color: var(--muted); }
.cx-status .v { font-weight: 600; }
.cx-next { border: 2px solid var(--ink); border-radius: var(--radius-lg); background: var(--surface); padding: var(--s3) var(--s4); margin: var(--s3) 0; }
.cx-next .k { font-size: var(--fs-hint); color: var(--muted); display: block; }
.cx-item h3 { overflow-wrap: anywhere; min-width: 0; }
.cx-item { border: 1px solid var(--line); border-left-width: 6px; border-radius: var(--radius); background: var(--surface); padding: var(--s3) var(--s4); margin: var(--s3) 0; }
.cx-item[data-class="required"] { border-left-color: var(--ink); }
.cx-item[data-class="candidate"] { border-left-color: var(--warn-line); }
.cx-item[data-class="unknown"] { border-left-color: var(--red); }
.cx-item[data-class="unaffected"] { border-left-color: var(--green); }
.cx-item h3 { font-size: 17px; display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.cx-quote { background: var(--sunken); border-radius: var(--radius); padding: var(--s2) var(--s3); margin: var(--s2) 0; white-space: pre-wrap; font-size: var(--fs-small); }
.cx-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.cx-pair .cx-quote { margin: 4px 0 0; }
.cx-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px var(--s4); margin: var(--s2) 0; }
.cx-facts dt { color: var(--muted); font-size: var(--fs-small); }
.cx-facts dd { margin: 0; }
.cx-open { margin: var(--s2) 0; padding-left: 1.2em; }
.cx-decide { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s3); }
.cx-thread { list-style: none; padding: 0; margin: var(--s2) 0; }
.cx-thread li { border-top: 1px solid var(--line); padding: var(--s2) 0; }
.cx-thread .meta { font-size: var(--fs-hint); color: var(--muted); }
.cx details { margin: var(--s2) 0; }
.cx summary { cursor: pointer; font-weight: 600; }
@media (max-width: 720px) {
  .cx { padding: 0 var(--s4) var(--s6); }
  .cx-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-pair { grid-template-columns: minmax(0, 1fr); }
  .cx-facts { grid-template-columns: minmax(0, 1fr); }
  .cx-decide button { flex: 1 1 100%; min-height: 48px; }
}

/* FINISH-05 P2: scan comparison, exact start, plans. Text and borders only — meaning is never carried by colour alone. */
.cx-check, .cx-plan { border-left: 3px solid var(--line, #c9ced6); padding: var(--s2) var(--s3); margin: var(--s2) 0; }
.cx-check ul { margin: var(--s2) 0; padding-left: 1.2em; }
.cx-quote-inline { background: var(--sunken); border-radius: 3px; padding: 0 4px; font-size: var(--fs-small); overflow-wrap: anywhere; }
.cx-boundary { margin: var(--s2) 0; overflow-x: auto; }
.cx-boundary caption { text-align: left; font-weight: 600; padding-bottom: 4px; }

/* OL-DEADLINE-11: the optional calculator remains usable with touch and at narrow widths. */
.cx [data-deadline-examples] input, .cx [data-deadline-examples] select, .cx [data-deadline-examples] textarea { width: 100%; max-width: 100%; min-height: 44px; box-sizing: border-box; font: inherit; }
.cx [data-deadline-examples] input[type="number"] { padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; }
.cx [data-deadline-examples] button { min-height: 44px; }
/* OL-START-31 R2: empty states that name their cause, and a link that leads to the next screen styled as the main action */
.cx-empty { max-width: var(--measure); }
.cx-empty h2 { margin-top: 0; }
.cx-actions { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: center; }
a.cx-button { display: inline-block; background: var(--primary); color: var(--primary-text); border: 1px solid var(--primary); border-radius: var(--radius); padding: var(--s2) var(--s4); font-weight: 600; text-decoration: none; }
a.cx-button:hover { background: var(--primary-hover); }
[data-state="filter-empty"] { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
/* OL-RULECHECK-37: long case identifiers and reasons remain readable on narrow screens and at 200% zoom. */
[data-rule-check] { min-width: 0; overflow-wrap: anywhere; }
[data-rule-check] button { max-width: 100%; min-height: 44px; white-space: normal; }
.cx .chip { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.cx .field { min-width: 0; }
.cx input[type="date"] { min-width: 0; max-width: 100%; }

/* OL-FINISH-43 (4.2): images read on this device, shown for comparison (never wider than the page) */
.cx-ocr-preview, .cx-ocr { margin-top: .5rem; }
.cx-ocr-fig { margin: .5rem 0; }
.cx-ocr-page { display: block; max-width: 100%; height: auto; border: 1px solid #c8c3b6; background: #fff; }

/* CUSTOMER848: the read-only customer information card of a change. Wraps instead of clipping at 320px and at 200% zoom. */
.cx .cx-customer-display { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: var(--s2) var(--s3); margin: var(--s3) 0; max-width: var(--measure); min-width: 0; overflow-wrap: anywhere; }
.cx .cx-customer-display h2 { font-size: var(--fs-small); color: var(--muted); margin: 0 0 var(--s2); }
.cx .cx-customer-display-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); min-width: 0; }
.cx .cx-customer-display-text { flex: 1 1 12rem; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cx .cx-customer-display-name { font-weight: 600; overflow-wrap: anywhere; }
.cx .cx-customer-display-id { font-family: var(--font-mono, monospace); overflow-wrap: anywhere; }
.cx .cx-customer-display-logo { flex: 0 0 auto; display: block; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.cx .cx-customer-display-logo canvas { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.cx .cx-customer-display-note { font-size: var(--fs-hint); color: var(--muted); margin: 4px 0 0; }
.cx .cx-customer-display-warn { border-left: 3px solid var(--warn-line); padding-left: var(--s2); margin: var(--s2) 0 0; max-width: 100%; }
.cx .cx-customer-display dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px var(--s3); margin: var(--s2) 0; }
.cx .cx-customer-display dt { color: var(--muted); font-size: var(--fs-small); }
.cx .cx-customer-display dd { margin: 0; min-width: 0; }
.cx .cx-customer-display-actions { margin-top: var(--s2); }
.cx .cx-customer-display button { max-width: 100%; min-height: 44px; white-space: normal; }
.cx .cx-customer-display button[aria-disabled="true"] { opacity: .7; cursor: progress; }
.cx .cx-customer-display-status:empty { display: none; }
.cx .cx-customer-display-status { font-size: var(--fs-hint); margin: 4px 0 0; }
@media (max-width: 720px) { .cx .cx-customer-display dl { grid-template-columns: minmax(0, 1fr); } }
