.panel-body[data-screen="compare"] {
  display: grid;
  gap: var(--s-4);
}

.coordination-stack {
  display: grid;
  gap: var(--s-4);
}

.coordination-card,
.coordination-list-card {
  gap: var(--s-3);
}

.coordination-models-card .model-list {
  display: grid;
  gap: var(--s-2);
}

/* Model row: eye button | text column (name + badge, then schema · counts · status), actions
   under the text. Explicit placement: no auto-placed column can grow to the buttons' width and
   squeeze the name to 0 px (the overlap reported on 20/10/2026). Long IFC names without spaces
   (HUB_H3_ELE_AZ_MAQ…) wrap anywhere; the full name stays in the title. */
.coordination-models-card .model-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s-2) var(--s-3);
  align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--bg-2);
}
.coordination-models-card .model-row > .icon-button { grid-column: 1; grid-row: 1 / span 2; }
.coordination-models-card .model-main { grid-column: 2; grid-row: 1; display: grid; gap: 4px; min-width: 0; }
.coordination-models-card .model-row > .row-actions { grid-column: 2; grid-row: 2; margin-top: 0; }
.coordination-models-card .model-row .link-row { width: auto; }
.coordination-models-card .model-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--s-2); min-width: 0; }
.coordination-models-card .model-name {
  min-width: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.coordination-models-card .model-title .badge { flex: none; }
.coordination-models-card .model-meta { min-width: 0; overflow-wrap: anywhere; }
.coordination-models-card .model-load-status { display: grid; gap: 6px; max-width: 240px; margin-top: 4px; }
.coordination-models-card .model-load-status > span:first-child { display: flex; align-items: center; gap: 6px; }
.coordination-models-card .model-progress { display: block; width: 100%; }
.diff-loading-label { display: flex; align-items: center; gap: 6px; }
.diff-progress { display: block; width: min(100%, 560px); margin-top: 8px; }

.coordination-counter {
  gap: var(--s-2);
  min-height: 110px;
}

.coordination-diff-counters .coordination-counter {
  min-height: 126px;
}

.coordination-filter-box {
  margin: 0;
  padding: 0;
  border-top: 0;
}

.issue-card {
  gap: var(--s-3);
}

.issue-card .screen-card-head {
  align-items: start;
}

.issue-status-row {
  flex-wrap: wrap;
}

.change-fields {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
}

.change-fields th,
.change-fields td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.change-fields thead th {
  color: var(--text-3);
  font-size: var(--t-caption);
  text-transform: uppercase;
  letter-spacing: .05em;
  background: color-mix(in srgb, var(--bg-2) 88%, white);
}

@media (max-width: 900px) {
  .change-fields {
    display: block;
    overflow: auto;
  }
}

/* ── Clash screen (phase D): cards on the left, the 3D on the right ─────────── */
:root { --clash-a: #f2453a; --clash-b: #338cfa; }

.shell[data-layout="clash"][data-model="true"] .workspace { grid-template-columns: minmax(360px, 520px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: var(--s-4); overflow: hidden; }
.shell[data-layout="clash"] .screen-banner { display: none; }
.shell[data-layout="clash"][data-model="true"] .panel { grid-column: 1; grid-row: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: var(--s-1); }
.shell[data-layout="clash"] .panel-body { padding-bottom: var(--s-6); }
.shell[data-layout="clash"] .capability-panel { display: none; }
.shell[data-layout="clash"][data-model="true"] .stage { position: relative; grid-column: 2; grid-row: 1; width: auto; height: auto; overflow: hidden; visibility: visible; border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--shadow-1); }

.clash-screen { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); align-content: start; }
.clash-panel-card { gap: var(--s-4); }
.clash-main .screen-title { margin: 0; }
.clash-subtitle { margin: 0 0 var(--s-2); font-size: var(--t-body-strong); }

.clash-scope { display: flex; align-items: center; gap: var(--s-2); margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--bg-2); color: var(--text-2); font-size: var(--t-xs); }
.clash-scope .icon { flex: none; color: var(--ok); }
.clash-scope > span { min-width: 0; overflow-wrap: anywhere; }
.clash-scope[data-verdict-alignment="ALIGNMENT_UNKNOWN"] .icon, .clash-scope[data-verdict-alignment="ALIGNMENT_CONFLICT"] .icon { color: var(--sev-review); }

.clash-test-list { display: grid; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.clash-test { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--bg-2); }
.clash-test:has(input:checked) { border-color: color-mix(in srgb, var(--brand-a) 55%, var(--line)); }
.clash-test.is-unavailable { opacity: .72; background: transparent; border-style: dashed; }
.clash-test-label { display: flex; flex: 1 1 220px; align-items: center; gap: var(--s-3); min-width: 0; cursor: pointer; }
.clash-test.is-unavailable .clash-test-label { cursor: default; }
.clash-test-label input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--brand-a); }
.clash-test-copy { display: grid; gap: 2px; min-width: 0; }
.clash-test-name { font-weight: 700; color: var(--text-1); }
.clash-test-note { color: var(--text-3); font-size: var(--t-xs); }
.clash-test-mode { flex: none; }
.clash-test-remove { flex: none; font-size: var(--t-xs); }

.badge[data-gravity="hard"] { background: var(--sev-blocking-bg); color: var(--sev-blocking); }
.badge[data-gravity="clearance"] { background: var(--sev-review-bg); color: var(--sev-review); }

.clash-run { display: grid; gap: var(--s-2); justify-items: start; }
.clash-run-button { display: inline-flex; align-items: center; gap: var(--s-2); height: 46px; padding: 0 26px; font-size: var(--t-body-strong); }
.clash-run-button[disabled] { opacity: .5; cursor: not-allowed; transform: none; filter: none; }
.clash-run .panel-note { margin: 0; }
.clash-progress-state { width: 100%; }
.clash-progress { display: block; width: 100%; height: 6px; }
.clash-error { color: var(--sev-blocking); }

.clash-blocked-card { border-left: 3px solid var(--sev-review); }
.clash-blocked-card[data-clash-verdict="ALIGNMENT_CONFLICT"] { border-left-color: var(--sev-blocking); }
.clash-blocked-card h3 { margin: 0; }

.clash-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-2); }
.clash-kpi { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--bg-2); color: var(--text-3); font-size: var(--t-caption); }
.clash-kpi strong { color: var(--text-1); font-size: 22px; line-height: 1.1; }
.clash-kpi[data-gravity="hard"] strong { color: var(--sev-blocking); }
.clash-kpi[data-gravity="clearance"] strong { color: var(--sev-review); }
.clash-empty { display: flex; align-items: center; gap: var(--s-2); margin: 0; color: var(--ok); font-weight: 700; }
.clash-unfilled { display: grid; gap: var(--s-2); justify-items: start; margin-top: var(--s-3); padding: var(--s-3); border: 1px dashed var(--line-strong, var(--line)); border-radius: var(--r-2); }
.clash-unfilled h4 { margin: 0; font-size: var(--t-sm); }
.clash-unfilled ul { display: grid; gap: 4px; margin: 0; }

.clash-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2) var(--s-3); align-items: end; }
.clash-filter { display: grid; gap: 4px; min-width: 0; color: var(--text-3); font-size: var(--t-caption); }
.clash-filter select { width: 100%; height: 34px; }

.clash-card-list { display: grid; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.clash-card-item { display: grid; gap: 0; border: 1px solid var(--line); border-left: 3px solid var(--sev-blocking); border-radius: var(--r-2); background: var(--bg-2); transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease); }
.clash-card-item[data-gravity="clearance"] { border-left-color: var(--sev-review); }
.clash-card-item[data-status="resolved"], .clash-card-item[data-status="ignored"], .clash-card-item[data-status="accepted"] { opacity: .7; }
.clash-card-item.is-selected { border-color: var(--sel-line); box-shadow: 0 0 0 1px var(--sel-line); background: var(--sel-bg); }
.clash-card { display: grid; gap: var(--s-2); width: 100%; padding: 12px 14px 8px; border: 0; border-radius: var(--r-2) var(--r-2) 0 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.clash-card:hover { background: color-mix(in srgb, var(--brand-a) 5%, transparent); }
.clash-card:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.clash-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.clash-card-test { color: var(--text-3); font-size: var(--t-xs); }
.clash-card-measure { margin-left: auto; font-weight: 800; color: var(--text-1); }
.clash-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: var(--s-2); }
.clash-pair-sep { padding-top: 2px; color: var(--text-3); font-weight: 700; }
.clash-object { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.clash-swatch { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 3px; background: var(--clash-a); }
.clash-object[data-side="b"] .clash-swatch { background: var(--clash-b); }
.clash-object-copy { display: grid; gap: 1px; min-width: 0; }
.clash-object-name { overflow: hidden; color: var(--text-1); text-overflow: ellipsis; white-space: nowrap; }
.clash-object-meta { overflow: hidden; color: var(--text-3); font-size: var(--t-caption); text-overflow: ellipsis; white-space: nowrap; }
.clash-card-more { color: var(--text-3); font-size: var(--t-caption); }
.clash-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); padding: 0 14px 10px; }
.clash-card-status { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; color: var(--text-3); font-size: var(--t-caption); }
.clash-card-status select { height: 30px; padding: 0 8px; font-size: var(--t-xs); }

.clash-options { padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--bg-1); }
.clash-options > summary { font-weight: 700; cursor: pointer; }
.clash-settings, .clash-custom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-3); }
.clash-settings { grid-template-columns: 1fr; }
.clash-field { display: grid; gap: 4px; min-width: 0; font-size: var(--t-xs); font-weight: 700; }
.clash-field .panel-note { font-weight: 400; }
.clash-field select, .clash-field input[type="text"] { width: 100%; }
.clash-field-wide { grid-column: 1 / -1; }
.clash-input-mm { display: inline-flex; align-items: center; gap: var(--s-2); }
.clash-input-mm input { width: 96px; }
.clash-federation .coordination-models-card, .clash-federation .coordination-align-card { margin-top: var(--s-3); box-shadow: none; }

.align-modes { display: grid; gap: var(--s-2); margin: 0; padding: 0; border: 0; }
.align-mode { display: flex; align-items: flex-start; gap: var(--s-2); padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--bg-2); cursor: pointer; }
.align-mode.is-selected { border-color: var(--sel-line); background: var(--sel-bg); }
.align-mode input { margin-top: 3px; accent-color: var(--brand-a); }
.align-mode-copy { display: grid; gap: 2px; }
.align-offsets { flex-wrap: wrap; }
.align-offset { display: grid; gap: 4px; font-size: var(--t-xs); }
.align-offset input { width: 96px; }

@media (max-width: 900px) {
  .shell[data-layout="clash"][data-model="true"] .workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: max-content minmax(320px, 52vh); overflow-y: auto; }
  .shell[data-layout="clash"][data-model="true"] .panel { grid-row: 1; min-height: auto; overflow: visible; padding-right: 0; }
  .shell[data-layout="clash"][data-model="true"] .stage { grid-column: 1; grid-row: 2; min-height: 320px; }
  .clash-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clash-filters, .clash-custom { grid-template-columns: minmax(0, 1fr); }
}
.clash-tests-folded > summary { display: flex; align-items: center; gap: var(--s-2); color: var(--text-2); font-size: var(--t-xs); font-weight: 700; cursor: pointer; }
.clash-tests-folded[open] > summary { margin-bottom: var(--s-2); }
.clash-quick { display: grid; gap: var(--s-2); padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: var(--r-2); }
.clash-quick .panel-note { margin: 0; }

/* Review 20/10/2026: stale result and precision warnings, drawn objects out of every discipline,
   the progress announcement for screen readers (visually hidden, still read). */
.clash-warning { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--sev-review) 45%, var(--line)); border-left: 3px solid var(--sev-review); border-radius: var(--r-2); background: color-mix(in srgb, var(--sev-review) 7%, var(--bg-2)); color: var(--text-1); font-size: var(--t-xs); }
.clash-warning p { flex: 1 1 260px; margin: 0; }
.clash-outside { color: var(--text-3); font-size: var(--t-xs); }
.clash-outside summary { display: flex; align-items: center; gap: var(--s-2); cursor: pointer; }
.clash-outside ul { margin: var(--s-2) 0 0; }
.clash-field > label { color: inherit; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
