/**
 * END-UX-001 — Regression verification fixes
 * Restores natural layout flow after Phase A/B without undoing tier semantics.
 */

/* ─── Property profile: contracts first, reference collapsed ─── */
.ed-property-contracts-heading {
  margin-top: var(--ed-space-2);
}

.ed-property-contracts-zone {
  margin-bottom: var(--ed-space-4);
}

.ed-property-reference-details {
  margin-top: var(--ed-space-2);
  border-top: 1px solid var(--ed-border-light);
  padding-top: var(--ed-space-2);
}

.ed-property-reference-details summary {
  cursor: pointer;
  font-size: var(--ed-text-sm);
  font-weight: 600;
  color: var(--ed-text-muted);
  padding: var(--ed-space-2) 0;
  list-style: none;
}

.ed-property-reference-details summary::-webkit-details-marker {
  display: none;
}

.ed-property-reference-details summary::before {
  content: "▸ ";
  font-size: 11px;
}

.ed-property-reference-details[open] summary::before {
  content: "▾ ";
}

.ed-property-reference-details[open] summary {
  margin-bottom: var(--ed-space-2);
}

.ed-property-identity-line {
  margin: 0 0 var(--ed-space-2);
}

.ed-property-actions {
  margin: var(--ed-space-2) 0;
}

/* ─── Commercial Record: restore section padding (cw-section class) ─── */
.cw-record-shell--embedded .cw-section.cw-section-task {
  padding: var(--ed-space-4) 0 0;
}

.cw-record-shell--embedded .cw-section-task {
  min-width: 0;
}

body.ed-contract-loading-view .cw-workspace--embedded {
  max-width: none;
  width: 100%;
}

/* Embedded spine: compact, flows above task */
/* Tier typography on workflow blocks — full width, not 52ch prose cap */
.cw-record-shell--embedded .cw-workflow-guide--embedded.ed-tier-t2,
.cw-record-shell--embedded .cw-record-sections--embedded.ed-tier-t2,
.cl-panel--documents .cl-doc-list.ed-tier-t2,
.review-command-centre .review-zone.ed-tier-t2 {
  max-width: none;
  width: 100%;
}

.cw-record-shell--embedded .cw-record-sections--embedded {
  padding-top: var(--ed-space-2);
  border-top: 1px solid var(--ed-border-light);
}

/* ─── Contract loading panels: natural vertical flow ─── */
.cl-panel--setup,
.cl-panel--documents {
  display: flex;
  flex-direction: column;
  gap: var(--ed-space-3);
}

.cl-panel--flush.cl-panel--commercial {
  width: 100%;
}

/* ─── Review: avoid sticky side column layout glitches ─── */
.review-command-centre[data-ed-mode="review"] .review-command-side {
  position: static;
}

body.ed-contract-loading-view .review-command-centre .review-command-grid {
  align-items: start;
}

/* ─── Experience frame: no phantom horizontal gaps ─── */
.ed-experience-frame__next {
  align-self: flex-start;
}
