/* K1 (RULES 10): the Matter is a full-bleed frame (sticky header, its own scrolling body), so its outer gutter is the page margin; above 1920 the view is capped at 1440 and centred, which is the margin */
#view-matter { --mx-gutter: var(--v3-margin-1366); }
@media (min-width: 1440px) { #view-matter { --mx-gutter: var(--v3-margin-1440); } }
@media (min-width: 1920px) { #view-matter { --mx-gutter: 0px; } }
/* ALFRED MATTER, brand pack v2. Rebuilt 2 Oct 2026 from docs/brand-pack-v2/ (RULES, SHELL, pictures D02 D06 D07 D11 D12 D13 D14 P02 P10).
   Only v2 variables. Nothing from the 21 Sep package or the 7 Sep look survives here. */

/* ── Base ─────────────────────────────────────────────────────────────────── */
#view-matter { color: var(--al-text); font-family: var(--al-font-ui); font-size: var(--al-fs-ui); line-height: var(--al-lh-ui); min-width: 0; }
#view-matter * { box-sizing: border-box; }
#view-matter h1, #view-matter h2, #view-matter h3 { font-family: var(--al-font-ui); color: var(--al-text); margin: 0; letter-spacing: 0; }
#view-matter h2 { font-size: var(--al-fs-card); font-weight: 600; }
#view-matter h3 { font-size: var(--al-fs-read); font-weight: 600; }
#view-matter a { color: var(--al-action); }
#view-matter button, #view-matter input, #view-matter select, #view-matter textarea { font-family: inherit; }
#view-matter :is(button, a, input, select, textarea, summary):focus-visible { outline: none; box-shadow: var(--al-focus); }
#view-matter .al-meta, #view-matter .al-absent { color: var(--al-text-2); font-size: var(--al-fs-label); font-style: normal; }
#view-matter .al-eyebrow { color: var(--al-text-2); font-size: var(--al-fs-label); margin: 0 0 6px; }
#view-matter .mx-mono { font-family: var(--al-font-id); font-size: var(--al-fs-ui); font-variant-numeric: tabular-nums; }
#view-matter .mx-money { font-variant-numeric: tabular-nums; }
#view-matter .mx-text-button { background: none; border: 0; padding: 0; color: var(--al-action); font-size: var(--al-fs-label); font-weight: 600; cursor: pointer; text-align: left; }
#view-matter .mx-text-button:hover { text-decoration: underline; }

/* ── Tabs (ported from the previous build, v2 variables only) ── */
#view-matter {
  color: var(--al-text);
  font-family: var(--al-font-ui);
  font-size: 14px;
  line-height: 1.5;
  min-width: 0;
}
#view-matter * { box-sizing: border-box; }
#view-matter h1, #view-matter h2, #view-matter h3 { font-family: var(--al-font-ui); color: var(--al-text); letter-spacing: 0; }
#view-matter h2 { font-size: 18px; font-weight: 600; margin: 0; }
#view-matter h3 { font-size: 14px; font-weight: 600; margin: 0; }
#view-matter a { color: var(--al-action); }
#view-matter button, #view-matter input, #view-matter select, #view-matter textarea { font-family: inherit; }
#view-matter .mx-heading { display: flex; gap: 24px; align-items: flex-start; justify-content: space-between; }
#view-matter .mx-heading > div:first-child { flex:1; min-width:0; }
#view-matter [data-matter-ask] { max-width:280px; white-space:normal; }
#view-matter .mx-aml-evidence + button { margin-bottom:8px; }
#view-matter .al-title { font-size: 27px; font-weight: 600; line-height: 1.25; margin: 0; overflow-wrap: anywhere; }
#view-matter .al-title-link { color: inherit; }
#view-matter .al-title-link:hover { text-decoration: underline; }
#view-matter .mx-subtitle { color: var(--al-text-2); font-size: 13px; margin: 7px 0 0; }
#view-matter .mx-record-status { flex: none; padding-top: 24px; }
#view-matter .mx-actions-menu { position: relative; flex: none; padding-top: 24px; }
#view-matter .mx-briefing-main, #view-matter .mx-briefing-aside { display: grid; gap: 22px; min-width: 0; }
#view-matter #mx-cronologia-body { max-height: none; overflow: visible; }
#view-matter #mx-cronologia-body.is-overflowing { -webkit-mask-image:linear-gradient(to bottom, black calc(100% - 24px), transparent 100%); mask-image:linear-gradient(to bottom, black calc(100% - 24px), transparent 100%); }
#view-matter #mx-cronologia-body::-webkit-scrollbar { width: 8px; }
#view-matter #mx-cronologia-body::-webkit-scrollbar-thumb { background: var(--al-divider); border-radius: var(--al-r-control); }
#view-matter .mx-fact-table td:first-child { color: var(--al-text-2); width: 26%; }
#view-matter .mx-fact-table td:last-child { width: 30%; white-space: nowrap; }
#view-matter [data-since-visit] { display: block; margin-top: 4px; color: var(--al-text-2); font-size: 11px; }
#view-matter .mx-journey-steps { padding: 0 20px; }
#view-matter .mx-status { display: inline-flex; align-items: center; flex: none; gap: 4px; padding: 3px 7px; font-size: 12px; font-weight: 400; line-height: 1.5; color: var(--al-text-2); background: var(--al-divider); border-radius: var(--al-r-mark); }
#view-matter .mx-status.is-confirmed { color: var(--al-success); background: var(--al-success-wash); }
#view-matter .mx-status.is-attention { color: var(--al-attention); background: var(--al-attention-wash); }
#view-matter .mx-date { font-size: 12px; width: 63px; flex: none; color: var(--al-text-2); font-variant-numeric: tabular-nums; }
#view-matter .mx-matter-actions { margin-top: 22px; font-size: 13px; color: var(--al-text-2); }
#view-matter .mx-matter-actions > summary { cursor: pointer; padding: 8px 0; }
#view-matter .al-action { display: inline-flex; align-items: center; gap: 8px; width: auto; border: 1px solid var(--al-line-control); background: var(--al-card); color: var(--al-action); }
#view-matter .al-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#view-matter :is(input,textarea,select):not([type="checkbox"]):not([type="radio"]) { font-size: var(--al-fs-read); background: var(--al-field); color: var(--al-text); border: 0; box-shadow: inset 0 0 0 1px var(--al-line-control); border-radius: var(--al-r-control); min-height: var(--al-control-h); padding: 8px 12px; max-width: 100%; }
#view-matter :is(input,textarea,select):not([type="checkbox"]):not([type="radio"]):hover { box-shadow: inset 0 0 0 1px var(--al-action); }
#view-matter label > :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) { display: block; width: 100%; margin-top: 5px; }
#view-matter form label { font-size: var(--al-fs-label); font-weight: 500; }
#view-matter .al-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
#view-matter .mx-docs-layout { display: grid; grid-template-columns: 208px minmax(0,1fr) 360px; gap: var(--al-gap-card); min-height:0; }
#view-matter .mx-docs-sidebar { display: flex; flex-direction: column; gap: 2px; min-height:0; overflow-y:auto; }
#view-matter .mx-docs-list { display:flex; flex-direction:column; background: var(--al-card);  border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); min-height:0; overflow:hidden; }
#view-matter .mx-docs-list-hd { display:grid; grid-template-columns:minmax(0,1fr) 130px 90px; gap:12px; align-items:center; min-height:44px; padding:0 16px; font-size:var(--al-fs-label); font-weight:600; letter-spacing:0; color:var(--al-text-2); border-bottom:1px solid var(--al-divider); flex:none; }
#view-matter .mx-docs-rows { flex:1; min-height:0; overflow-y:auto; }
#view-matter .mx-docs-row { display:grid; grid-template-columns:minmax(0,1fr) 130px 90px; gap:12px; align-items:center; width:100%; min-height:var(--al-row); padding:0 16px; border:0; border-bottom:1px solid var(--al-divider); background: transparent; text-align:left; font-size:var(--al-fs-ui); color:var(--al-text); cursor:pointer; }
#view-matter .mx-docs-row:hover { background:var(--al-card); }
#view-matter .mx-docs-row[aria-current="true"] { background:var(--al-page); }
#view-matter .mx-docs-row > span:first-child { font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#view-matter .mx-docs-row > span:nth-child(2) { color:var(--al-text-2); }
#view-matter .mx-docs-row > span:last-child { font-variant-numeric:tabular-nums; font-size:var(--al-fs-label); color:var(--al-text-2); text-align:left; white-space:nowrap; }
#view-matter .mx-docs-row > span:nth-child(2) { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#view-matter .mx-docs-detail { display:flex; flex-direction:column; background: var(--al-card);  border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); min-height:0; overflow-y:auto; }
#view-matter .mx-docs-detail-hd { padding:14px 18px 12px; border-bottom:1px solid var(--al-divider); flex:none; }
#view-matter .mx-docs-detail-hd .mx-docs-detail-name { font-size:15px; font-weight:600; overflow-wrap:anywhere; }
#view-matter .mx-docs-detail-hd p { margin:2px 0 0; font-size:12px; color:var(--al-text-2); }
#view-matter .mx-docs-detail-body { padding:12px 18px; }
#view-matter .mx-docs-detail-actions { display:flex; flex-direction:column; gap:8px; padding:12px 18px 16px; border-top:1px solid var(--al-divider); margin-top:auto; position:relative; }
#view-matter .mx-docs-detail-actions .al-actions { display:flex; gap:8px; }
#view-matter .mx-docs-detail-actions .al-actions .al-btn { flex:1; }
#view-matter .mx-docs-more-menu { position:absolute; right:18px; bottom:56px; width:240px; background: var(--al-card); border:1px solid var(--al-divider); border-radius: var(--al-r-popover); box-shadow: var(--al-shadow-menu); padding:6px; z-index:60; }
#view-matter .mx-docs-more-menu button { display:block; width:100%; text-align:left; border:0; background:none; border-radius: var(--al-r-control); padding:7px 10px; font-size:13px; color:var(--al-text); cursor:pointer; }
#view-matter .mx-docs-more-menu button:hover { background:var(--al-selected); }
#view-matter .mx-docs-more-menu button.is-danger { color:var(--al-critical); }
#view-matter .mx-docs-more-menu button.is-danger:hover { background:var(--al-critical-wash); }
@media(max-width:1300px) { #view-matter .mx-docs-layout { grid-template-columns:180px minmax(0,1fr) 300px; } }
@media(max-width:900px) { #view-matter .mx-docs-layout { grid-template-columns:1fr; height:auto; } #view-matter .mx-docs-detail { grid-column:1; } }
#view-matter .mx-docs-folder { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; min-height: var(--al-row-compact); border: 0; border-radius: var(--al-r-control); padding: 0 12px; background: transparent; color: var(--al-text); font-size: var(--al-fs-ui); text-align: left; cursor: pointer; }
#view-matter .mx-docs-folder:hover { background: var(--al-selected); }
#view-matter .mx-docs-folder.is-archive { color: var(--al-text-2); font-size: 12px; }
#view-matter .mx-docs-folder[aria-pressed="true"] { background: var(--al-selected); color: var(--al-action); font-weight: 600; }
#view-matter .mx-docs-folder span:last-child { color: var(--al-text-2); font-variant-numeric: tabular-nums; }
#view-matter .mx-docs-folder[aria-pressed="true"] span:last-child { color: inherit; font-weight: 400; }
#view-matter .mx-docs-sidebar-sep { height: 1px; background: var(--al-divider); margin: 8px 10px; }
#view-matter .mx-docs-missing { margin-top: 12px; padding: 12px 10px 4px; border-top: 1px solid var(--al-divider); }
#view-matter .mx-docs-missing ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
#view-matter .al-chip { display: inline-flex; align-items: center; height: var(--al-chip-h); border-radius: var(--al-r-chip); border: 0; box-shadow: inset 0 0 0 1px var(--al-line-control); padding: 0 12px; background: var(--al-card); color: var(--al-text); font-size: var(--al-fs-label); font-weight: 500; }
#view-matter .al-chip[aria-pressed="true"] { color: var(--al-action); background: var(--al-selected); box-shadow: none; }
#view-matter .al-table { background: var(--al-card);  border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); width: 100%; font-size: 13px; table-layout: auto; }
#view-matter .al-table th { color: var(--al-text-2); font-size: var(--al-fs-label); font-weight: 600; padding: 0 16px; height: 44px; text-align: left; }
#view-matter .al-table td { padding: 0 16px; height: var(--al-row); white-space: normal; overflow-wrap: anywhere; vertical-align: middle; border-bottom: 1px solid var(--al-divider); }
#view-matter .al-table tr:last-child td { border-bottom: 0; }
#view-matter #mx-waiting-editor { padding-top: 6px; border-top: 0; }
#view-matter #mx-waiting-editor summary { cursor: pointer; color: var(--al-action); font-size: 13px; }
#view-matter #mx-waiting-form { padding: 12px 0; }
#view-matter [role="alert"] { color: var(--al-critical); background: var(--al-critical-wash); border: 0; border-radius: var(--al-r-control); padding: 12px 16px; font-size: var(--al-fs-ui); }
#view-matter .mx-searchbar { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 18px; }
#view-matter .mx-search-label { display: block; width: min(520px,75%); }
#view-matter .mx-search-label > span { display: block; font-size: 12px; color: var(--al-text-2); margin-bottom: 5px; }
#view-matter .mx-register-scroll { overflow-x: auto; }
#view-matter .mx-correspondence th:first-child { width: 40%; }
#view-matter .mx-correspondence td:first-child strong { font-weight: 500; }
#view-matter .mx-correspondence td:nth-child(2) { color: var(--al-text-2); font-size: 12px; }
#view-matter .mx-correspondence td:nth-child(n+3) { white-space: nowrap; }
#view-matter .mx-pagination { display: flex; gap: 14px; align-items: center; margin-top: 16px; font-size: 12px; color: var(--al-text-2); }
#view-matter.mx-inspecting .mx-heading .al-title { font-size: 20px; }
#view-matter.mx-inspecting .mx-subtitle { margin-top: 4px; }
#view-matter .mx-reader-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
#view-matter .mx-comms-layout { display: grid; grid-template-columns: 380px minmax(0,1fr); gap: var(--al-gap-card); align-items: start; }
#view-matter .mx-comms-layout.has-panel { grid-template-columns: 380px minmax(0,1fr) 320px; }
#view-matter .mx-comms-panel { display: flex; flex-direction: column; background: var(--al-card);  border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); min-height: 0; overflow: hidden; }
#view-matter .mx-comms-panel-hd { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--al-divider); }
#view-matter .mx-comms-panel-hd .mx-alfred-mark { width: 20px; height: 20px; border-radius: 50%; background: var(--al-shell); color: var(--al-brass); display: grid; place-items: center; font-family: var(--al-font-identity); font-size: 13px; flex: none; }
#view-matter .mx-comms-panel-hd h3 { font-size: var(--al-fs-card); font-weight: 600; flex: 1; }
#view-matter .mx-comms-panel-body { flex: 1; overflow-y: auto; min-height: 0; }
#view-matter .mx-comms-panel-tools { display: flex; gap: 6px; padding: 0 16px 12px; flex-wrap: wrap; }
#view-matter .mx-comms-panel-tools button { border: 1px solid var(--al-divider); background: var(--al-field); color: var(--al-action); border-radius: var(--al-r-control); padding: 4px 9px; font-size: 12px; cursor: pointer; }
#view-matter .mx-comms-panel-tools button[aria-pressed="true"] { border-color: var(--al-action); background: var(--al-selected); font-weight: 600; }
#view-matter .mx-comms-panel-section { padding: 12px 16px; border-bottom: 1px solid var(--al-divider); }
#view-matter .mx-comms-panel-invite { padding: 16px; }
#view-matter .mx-comms-panel-invite p { text-wrap: pretty; margin: 0 0 12px; }
#view-matter .mx-comms-list-pane { display: flex; flex-direction: column; background: var(--al-card);  border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); min-height: 0; overflow: hidden; }
#view-matter .mx-comms-list-pane .mx-comms-toolbar { display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid var(--al-divider); }
#view-matter .mx-comms-list-pane form { flex: 1; display: flex; gap: 6px; }
#view-matter .mx-comms-list-pane form input { flex: 1; }
#view-matter .mx-comms-rows { flex: 1; overflow-y: auto; min-height: 0; }
#view-matter .mx-comms-row { display: block; width: 100%; min-height: var(--al-row-2line); text-align: left; border: 0; border-bottom: 1px solid var(--al-divider); padding: 10px 16px; background: transparent; cursor: pointer; font-size: var(--al-fs-ui); color: var(--al-text); }
#view-matter .mx-comms-row:hover { background: var(--al-selected); }
#view-matter .mx-comms-row[aria-current="true"] { background: var(--al-selected); }
#view-matter .mx-comms-row[aria-current="true"] .mx-comms-row-top > span:first-child { color: var(--al-action); }
#view-matter .mx-comms-row-top { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
#view-matter .mx-comms-row-top > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#view-matter .mx-comms-row-top > span:last-child { flex: none; font-variant-numeric: tabular-nums; font-weight: 400; font-size: 12px; color: var(--al-text-2); }
#view-matter .mx-comms-row-bottom { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--al-text-2); margin-top: 2px; }
#view-matter .mx-comms-row-bottom > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#view-matter .mx-comms-list-footer { padding: 9px 14px; border-top: 1px solid var(--al-divider); font-size: 12px; color: var(--al-text-2); }
#view-matter .mx-comms-reader-pane { display: flex; flex-direction: column; background: var(--al-card);  border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); min-height: 0; overflow-y: auto; }
#view-matter .mx-comms-reader-pane .mx-thread { max-width: none; margin: 0; padding: 16px 20px 20px; }
#view-matter .mx-comms-empty { color: var(--al-text-2); padding: var(--al-pad-card); }
#view-matter .mx-thread { max-width: 1200px; margin: 0 auto; }
#view-matter .mx-message { background: var(--al-card); padding: 24px 28px;  border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); margin-bottom: 18px; box-shadow: var(--al-shadow-card); }
#view-matter .mx-message-heading { display: flex; align-items: baseline; gap: 20px; justify-content: space-between; }
#view-matter .mx-message-heading h3 { font-size: 18px; margin: 0; }
#view-matter .mx-message-heading time { font-size: 12px; color: var(--al-text-2); flex: none; }
#view-matter .mx-message-addresses { display: grid; grid-template-columns: 38px 1fr; gap: 4px 12px; font-size: 12px; padding-bottom: 18px; margin: 12px 0 0; border-bottom: 1px solid var(--al-divider); }
#view-matter .mx-message-addresses dt { color: var(--al-text-2); }
#view-matter .mx-message-addresses dd { margin: 0; overflow-wrap: anywhere; }
#view-matter .mx-message-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.75; max-width: 95ch; padding: 24px 0; }
#view-matter .mx-message-attachments { padding-top: 16px; border-top: 1px solid var(--al-divider); }
#view-matter .mx-message-attachments > span { display: block; font-size: 12px; color: var(--al-text-2); margin-bottom: 8px; }
#view-matter .mx-message-actions { margin-top: 18px; }
#view-matter .mx-document-heading { padding: 18px 22px; background: var(--al-card);  border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); }
#view-matter .mx-document-heading p { font-size: 12px; color: var(--al-text-2); margin: 6px 0 0; }
#view-matter .mx-document-canvas { background: var(--al-page); border: 1px solid var(--al-divider); border-top: 0; padding: 24px; min-height: 60vh; border-radius: 0 0 var(--al-r-card) var(--al-r-card); }
#view-matter .mx-file-frame { display: block; width: 100%; height: 72vh; border: 0; background: var(--al-card); }
#view-matter .mx-file-image { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; }
#view-matter .mx-file-text { margin: 0 auto; max-width: 1000px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--al-paper); padding: 40px; color: var(--al-text); font: 14px/1.8 var(--al-font-ui); box-shadow: var(--al-shadow-paper); }
#view-matter .mx-reader-notice { padding: 20px; background: var(--al-card); border-radius: var(--al-r-card); }
#view-matter .mx-dates-section { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--al-divider); }
#view-matter [data-task-feedback]:not(:empty), #view-matter [data-date-feedback]:not(:empty) { display:block; margin:0 0 12px; padding:12px 16px; background:var(--al-critical-wash); border:0; border-radius: var(--al-r-control); color:var(--al-critical); font-size:var(--al-fs-ui); }
#view-matter .mx-task-hd { display:flex; margin-bottom:6px; }
#view-matter .mx-task-list .mx-task-row { align-items:center; }
#view-matter .mx-task-actions { display:flex; align-items:center; gap:10px; flex:none; flex-wrap:nowrap; }
#view-matter .mx-task-x { font-size:16px; line-height:1; padding:2px 4px; color:var(--al-text-2); }
#view-matter .mx-task-x:hover { color:var(--al-critical); }
#view-matter .mx-dates-hd { margin-bottom: 16px; }
#view-matter .mx-dates-hd h2 { margin: 0; }
#view-matter .mx-dates-hd p { margin: 4px 0 0; font-size: 13px; color: var(--al-text-2); }
#view-matter .mx-dates-actions { margin-top: 12px; flex-wrap: wrap; }
#view-matter .mx-date-when { flex: none; width: 96px; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--al-text-2); }
#view-matter .mx-edit-form { background: transparent; border: 0; display: grid; gap: 16px; padding: 16px 0; margin: 0 0 8px; max-width: 780px; }
#view-matter .mx-edit-form h3 { margin: 0; }
#view-matter #mx-journey-editor .mx-edit-form { margin: 16px 20px; }
#view-matter .mx-step-attribution { display: block; margin-top: 4px; font-size: 12px; color: var(--al-text-2); }
#view-matter #mx-journey-start { margin: 0 0 18px; }
#view-matter #mx-personas-body .al-table td, #view-matter #mx-personas-body .al-table th { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
#view-matter #mx-personas-body .al-table { table-layout: auto; width: 100%; max-width: 100%; }
#view-matter .mx-personas-main { min-width: 0; }
#view-matter #mx-personas-body .al-table td:last-child, #view-matter #mx-personas-body .al-table th:last-child { white-space: nowrap; max-width: none; width: 1%; }
#view-matter .mx-personas-frame { display:grid; grid-template-columns:minmax(0,1fr) 360px; gap:var(--al-gap-card); align-items:start; }
@media(max-width:1150px) { #view-matter .mx-personas-frame { grid-template-columns:1fr; } }
@media(max-width:1366px) {
  #view-matter #mx-personas-body .al-table :is(td,th):nth-child(4) { display: none; } 
}
#view-matter #mx-personas-body p { margin: 6px 0 0; }
#view-matter .mx-upload-results { background: var(--al-page);  border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); padding: 16px; margin-bottom: 18px; font-size: 13px; }
#view-matter .mx-upload-results p { margin: 0 0 8px; }
@media(min-width:1650px) {
  #view-matter .mx-briefing { grid-template-columns: minmax(0,1.35fr) minmax(400px,1fr); }
}
@media(max-width:1050px) {
  #view-matter .mx-briefing { grid-template-columns: 1fr; }
  #view-matter .mx-context { grid-template-columns: 1fr 1fr; gap: 18px; }
  #view-matter .mx-context > div { border: 0; padding: 0; }
  #view-matter .mx-resumen-strip { grid-template-columns: 1fr; }
  #view-matter .mx-resumen-strip > div { border-left: 0; border-top: 1px solid var(--al-divider); }
  #view-matter .mx-resumen-strip > div:first-child { border-top: 0; }
  #view-matter .mx-resumen-cards { grid-template-columns: 1fr; }
}
@media(max-width:650px) {
  #view-matter .mx-context { grid-template-columns: 1fr; }
  #view-matter .mx-heading { flex-direction: column; gap: 8px; }
  #view-matter .mx-record-status { padding: 0; }
  #view-matter #mx-tabs [data-tab] { margin-left: 0; }
  #view-matter .al-kv { grid-template-columns: 1fr; gap: 5px; }
  #view-matter .al-kv dd { margin-bottom: 10px; }
}
#view-matter .mx-document-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:16px; }
#view-matter .mx-document-analysis { padding:28px; background: var(--al-card); font-size:14px; line-height:1.7; overflow-wrap:anywhere; }
#view-matter .mx-document-analysis .copilot-clause-hdr { min-height:44px; }
#view-matter .mx-document-analysis .copilot-compare { grid-template-columns:repeat(2,minmax(0,1fr)); }
#fees-panel[data-matter-fees] { width:760px !important; max-width:94vw !important; background: var(--al-card) !important; color:var(--al-text); font-family: var(--al-font-ui); }
#fees-panel[data-matter-fees] :is(input,textarea) { min-height:var(--al-control-h); font-size:15px !important; color:var(--al-text); }
#fees-panel[data-matter-fees] input[type=checkbox] { min-height:18px; width:18px; height:18px; accent-color:var(--al-action); }
#fees-panel[data-matter-fees] .btn { min-height:34px; border-radius: var(--al-r-control); font:400 13px var(--al-font-ui) !important; text-transform:none; letter-spacing:normal; }
#fees-panel[data-matter-fees] .btn-primary { background:var(--al-action); color: var(--al-text-inverse); }
#view-matter .mx-sharing { max-width:780px; padding:18px 0; font-size:13px; line-height:1.6; }
#view-matter .mx-note-list { margin-top:18px; }
#view-matter .mx-note-list .mx-message { border:0; border-bottom:1px solid var(--al-divider); border-radius: 0; box-shadow:none; padding:14px 0; margin-bottom:0; }
#view-matter .mx-note-list .mx-message:last-child { border-bottom:0; }
#view-matter .mx-note-text { white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; line-height:1.7; }
#view-matter .mx-specialist-section { margin:24px 0; padding:24px; background: var(--al-card);  border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); }
/* MA3-17 (CD, 17 Oct): a closed KYC group is one compact row, not a 74 px band */
#view-matter .mx-record-group { padding:0; border-bottom:1px solid var(--al-divider); }
#view-matter .mx-record-group summary { display:flex; align-items:center; min-height:var(--al-row-compact); cursor:pointer; font-size:14px; font-weight:500; }
#view-matter .mx-record-group[open] { padding-bottom:12px; }
#view-matter .mx-edit-form fieldset { border:0; margin:0; padding:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
#view-matter .mx-edit-form legend { font-size:var(--al-fs-ui); font-weight:600; margin-bottom:16px; }
#view-matter .mx-edit-form label:has(input[type=checkbox]) { display:flex; justify-content:space-between; align-items:center; gap:16px; }
#view-matter .mx-edit-form input[type=checkbox] { width:18px; height:18px; flex:none; accent-color:var(--al-action); }
#view-matter [data-workspace=financiero].mx-money-open { display:block; }
#view-matter .mx-money-line { display:flex; justify-content:space-between; gap:24px; padding:18px 0; border-bottom:1px solid var(--al-divider); font-size:14px; }
#view-matter .mx-money-line small { display:block; color:var(--al-text-2); font-size:12px; margin-top:6px; }
@media(max-width:650px) { #view-matter .mx-edit-form fieldset { grid-template-columns:1fr; } }
#dw-workspace[data-matter-draft] { position:fixed; inset:0; z-index:30; background:var(--al-card); color:var(--al-text); font-family: var(--al-font-ui); display:flex; flex-direction:column; }
#dw-workspace[data-matter-draft] .mx-draft-toolbar { display:flex; flex:none; align-items:center; justify-content:space-between; gap:24px; padding:20px 28px; background: var(--al-card); border-bottom:1px solid var(--al-divider); }
#dw-workspace[data-matter-draft] .mx-draft-toolbar p { font-size:12px; color:var(--al-text-2); margin:0 0 4px; }
#dw-workspace[data-matter-draft] .mx-draft-toolbar h2 { font-size:22px; margin:0; }
#dw-workspace[data-matter-draft] .mx-draft-toolbar > div:last-child { display:flex; gap:12px; }
#dw-workspace[data-matter-draft] #mx-draft-mount { flex:1; overflow:auto; padding:24px 28px; }
#dw-workspace[data-matter-draft] .cw2-draft-grid { display:grid; grid-template-columns:minmax(280px,340px) minmax(0,1fr); gap:24px; }
#dw-workspace[data-matter-draft] .cw2-draft-card { background: var(--al-card);  border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); }
#dw-workspace[data-matter-draft] .cw2-draft-right { min-width:0; min-height:70vh; }
#dw-workspace[data-matter-draft].mx-draft-tools-hidden .cw2-draft-left { display:none; }
#dw-workspace[data-matter-draft].mx-draft-tools-hidden .cw2-draft-grid { grid-template-columns:1fr; }
#dw-workspace[data-matter-draft] .cw2-draft-links { display:flex; flex-wrap:wrap; gap:8px; }
#dw-workspace[data-matter-draft] .cw2-draft-left .al-field-row { grid-template-columns:1fr; flex-direction:column; gap:16px; }
#dw-workspace[data-matter-draft] .cw2-draft-left .al-field { min-width:0; width:100%; }
#dw-workspace[data-matter-draft] .cw2-draft-left .al-seg { display:flex; width:100%; }
#dw-workspace[data-matter-draft] .cw2-draft-left .al-seg button { flex:1; white-space:normal; }
@media(max-width:900px) { #dw-workspace[data-matter-draft] .cw2-draft-grid { grid-template-columns:1fr; } }
#view-matter #mx-redaccion-mount { height:100%; display:flex; flex-direction:column; min-height:0; scrollbar-width:thin; }
#view-matter #mx-redaccion-mount::-webkit-scrollbar { width:9px; }
#view-matter #mx-redaccion-mount::-webkit-scrollbar-thumb { background:var(--al-divider); border-radius: var(--al-r-control); }
#view-matter #mx-redaccion-mount.is-overflowing { -webkit-mask-image:linear-gradient(to bottom, black calc(100% - 28px), transparent 100%); mask-image:linear-gradient(to bottom, black calc(100% - 28px), transparent 100%); }
#view-matter #mx-redaccion-mount .cw2-draft-grid { display:grid; grid-template-columns:minmax(280px,340px) minmax(0,1fr); gap:24px; align-items:start; }
#view-matter #mx-redaccion-mount .cw2-draft-card { background: var(--al-card);  border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); }
#view-matter #mx-redaccion-mount .cw2-draft-left { min-width:0; }
#view-matter #mx-redaccion-mount .cw2-draft-right { min-width:0; }
#view-matter #mx-redaccion-mount .cw2-draft-links { display:flex; flex-wrap:wrap; gap:8px; }
#view-matter #mx-redaccion-mount .cw2-draft-tpls { display:flex; flex-direction:column; gap:2px; }
#view-matter #mx-redaccion-mount .cw2-draft-tpl { font-family: var(--al-font-ui); background:transparent; border:0; border-radius: var(--al-r-control); padding:8px 10px; }
#view-matter #mx-redaccion-mount .cw2-draft-tpl:hover { border-color:transparent; background:var(--al-selected); }
#view-matter #mx-redaccion-mount .cw2-draft-tpl.active { background:var(--al-selected); border-color:transparent; color:var(--al-action); font-weight:600; }
#view-matter #mx-redaccion-mount .cw2-draft-empty-title { font-family: var(--al-font-ui); font-size:15px; font-weight:600; color:var(--al-text); }
#view-matter #mx-redaccion-mount .cw2-draft-empty-sub { font-size:13px; color:var(--al-text-2); }
#view-matter #mx-redaccion-mount .cw2-draft-tog { white-space:nowrap; }
#view-matter #mx-redaccion-mount .cw2-aura-dot { background:var(--al-action); }
#view-matter #mx-redaccion-mount .cw2-aura-dot span { color: var(--al-text-inverse); }
#view-matter #mx-redaccion-mount .alfred-dictate-pill { color:var(--al-text-2); background:var(--al-page); border-color:var(--al-divider); }
#view-matter #mx-redaccion-mount .alfred-dictate-pill .alfred-dictate-glyph span { background:var(--al-text-2); }
#view-matter #mx-redaccion-mount .al-seg { background:var(--al-page); border-color:var(--al-divider); padding:2px; gap:2px; }
#view-matter #mx-redaccion-mount .al-seg button { border:0; border-radius: var(--al-r-mark); color:var(--al-text-2); }
#view-matter #mx-redaccion-mount .al-seg button[aria-pressed="true"] { background: var(--al-field); color:var(--al-action); font-weight:600; box-shadow: var(--al-shadow-card); }
#view-matter .mx-seg { display:inline-flex; flex-wrap:nowrap; background:var(--al-page); border:1px solid var(--al-divider); border-radius: var(--al-r-control); padding:2px; gap:2px; margin-bottom:12px; position:relative; }
#view-matter .mx-seg button { border:0; background:transparent; padding:6px 10px; font-size:13px; color:var(--al-text-2); border-radius: var(--al-r-mark); cursor:pointer; white-space:nowrap; }
#view-matter .mx-seg button[aria-pressed="true"] { background: var(--al-field); color:var(--al-action); font-weight:600; box-shadow: var(--al-shadow-card); }
#view-matter .mx-seg .mx-docs-more-menu { top:36px; right:0; left:auto; }
@media(max-width:900px) { #view-matter #mx-redaccion-mount .cw2-draft-grid { grid-template-columns:1fr; } }
#modal-nota-simple[data-matter-review] > .modal { max-width:1180px !important; width:calc(100% - 64px) !important; background: var(--al-card); border:1px solid var(--al-line-control); border-radius: var(--al-r-card); }
#modal-nota-simple[data-matter-review] { padding:4vh 0 !important; overflow:hidden !important; }
#modal-nota-simple[data-matter-review] > .modal { max-height:92vh; margin:0 !important; display:flex; flex-direction:column; }
#modal-nota-simple[data-matter-review] > .modal > :nth-child(2) { overflow:auto; min-height:0; }
#modal-nota-simple[data-matter-review] .nc-header { color:var(--al-text); background: var(--al-card) !important; flex-shrink:0; }
#modal-nota-simple[data-matter-review] .nc-title { font:600 var(--al-fs-card) var(--al-font-ui); }
#modal-nota-simple[data-matter-review] .nc-close { color:var(--al-action); }
#modal-nota-simple[data-matter-review] > .modal > :last-child { flex-shrink:0; background: var(--al-card) !important; }
#modal-nota-simple[data-matter-review] :is(input,textarea,select) { max-width:100%; }
#modal-nota-simple[data-matter-review] .ns-table { table-layout:fixed; }
#modal-nota-simple[data-matter-review] .ns-table td { overflow-wrap:anywhere; padding:8px; }
#modal-nota-simple[data-matter-review] .ns-label { width:28%; }
/* Step 9 (10 Oct 2026, live picture): the old button rule set spaced capitals and the long first label was cut mid-word */
#modal-nota-simple[data-matter-review] .btn { text-transform:none; letter-spacing:0; font:600 var(--al-fs-ui) var(--al-font-ui); }
#modal-nota-simple[data-matter-review] .ns-label { white-space:normal; overflow:visible; text-overflow:clip; }
#modal-nota-simple[data-matter-review] .ns-table :is(input,textarea,select) { width:100%; box-sizing:border-box; }
#modal-nota-simple[data-matter-review] .ns-table :is(input,textarea,select) { min-height:36px; padding:6px 10px; border:1px solid var(--al-line-control); border-radius: var(--al-r-control); font:14px var(--al-font-ui); color:var(--al-text); background: var(--al-field); }
#view-matter [hidden] { display:none !important; }
#modal-nota-simple[data-matter-review] .ns-approval { display:block; margin:18px 0; line-height:1.6; }
#modal-nota-simple[data-matter-review] input[type=checkbox] { width:18px; height:18px; vertical-align:middle; accent-color:var(--al-action); }
#view-matter .mx-service-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
#view-matter .mx-service-form > :is(h3,p,.al-actions,label:has(textarea)) { grid-column:1/-1; }
@media(max-width:650px) { #view-matter .mx-service-form { grid-template-columns:1fr; } }
#view-matter .mx-aml-evidence { margin:16px 0; }
#view-matter .mx-evidence-row { display:flex; justify-content:space-between; align-items:flex-start; gap:24px; padding:18px 0; border-bottom:1px solid var(--al-divider); font-size:14px; }
#view-matter .mx-evidence-row > div:first-child { min-width:0; overflow-wrap:anywhere; }
#view-matter .mx-evidence-row p { font-size:13px; color:var(--al-text-2); margin:7px 0 0; line-height:1.6; }
#view-matter .mx-evidence-row .al-actions { flex-shrink:0; }
#view-matter .mx-evidence-picker { margin-top:20px; padding:24px; background:var(--al-card);  border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); }
#view-matter .mx-evidence-options { list-style:none; margin:16px 0; padding:0; max-height:320px; overflow:auto; }
#view-matter .mx-evidence-options li { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:8px 0; }
#view-matter .mx-evidence-options button { text-align:left; white-space:normal; overflow-wrap:anywhere; }
@media(max-width:650px) { #view-matter .mx-evidence-row { flex-direction:column; } #view-matter .mx-evidence-picker { padding:16px; } }
#view-matter .mx-ocr-text { white-space:pre-wrap; word-break:break-word; max-height:420px; overflow:auto; background:var(--al-card);  border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); padding:14px; font-size:13px; line-height:1.5; }
#view-matter { display:flex; flex-direction:column; height:100%; overflow:hidden; }
@media(max-width:650px) { #view-matter { height:auto; overflow:visible; } body.matter-frame main.main { overflow:auto; } #view-matter #mx-tabbody { overflow-y:visible; } }
#view-matter .mx-split { display:grid; grid-template-columns:1fr 1fr; gap:var(--al-gap-card); min-height:0; align-items:start; }
#view-matter .mx-split.is-journey { grid-template-columns:minmax(300px,1fr) minmax(0,1.6fr); }
@media(max-width:1050px) { #view-matter .mx-split { grid-template-columns:1fr; height:auto; } }
#view-matter .mx-journey-row { display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--al-divider); }
#view-matter .mx-journey-row:last-child { border-bottom:0; }
#view-matter .mx-journey-check { flex:none; width:20px; height:20px; border-radius: 50%; background:var(--al-action); color: var(--al-text-inverse); display:flex; align-items:center; justify-content:center; font-size:12px; }
#view-matter .mx-journey-dot { flex:none; width:8px; height:8px; border-radius: 50%; background:var(--al-text-2); margin:0 6px; }
#view-matter .mx-journey-dot.is-empty { width:12px; height:12px; margin:0 4px; background:transparent; border:1.5px dashed var(--al-text-2); }
#view-matter .mx-journey-label { flex:1; min-width:0; font-size:14px; color:var(--al-text); }
#view-matter .mx-journey-row.is-future .mx-journey-label { color:var(--al-text-2); }
#view-matter .mx-journey-row.is-skipped .mx-journey-label { color:var(--al-text-2); text-decoration:line-through; }
#view-matter .mx-journey-row.is-current .mx-journey-label { font-weight:600; }
#view-matter .mx-journey-date { flex:none; font-variant-numeric:tabular-nums; font-size:12px; color:var(--al-text-2); }
#view-matter .mx-journey-actions { flex:none; display:flex; gap:6px; }
#view-matter .mx-journey-undo { flex:none; opacity:0; transition:opacity var(--al-t-hover); background:none; border:0; color:var(--al-action); font-size:var(--al-fs-label); font-weight:500; cursor:pointer; padding:2px 4px; }
#view-matter .mx-journey-row:hover .mx-journey-undo, #view-matter .mx-journey-undo:focus-visible { opacity:1; }
#view-matter .mx-subnav-frame { display:grid; grid-template-columns:208px minmax(0,1fr); gap:var(--al-gap-card); min-height:0; align-items:start; }
#view-matter .mx-subnav { flex:none; display:flex; flex-direction:column; gap:2px; }
#view-matter .mx-subnav button { display:flex; align-items:center; width:100%; min-height:var(--al-row-compact); text-align:left; border:0; background:transparent; border-radius: var(--al-r-control); padding:0 12px; font-size:var(--al-fs-ui); color:var(--al-text); cursor:pointer; }
#view-matter .mx-subnav button:hover { background:var(--al-selected); }
#view-matter .mx-subnav button[aria-current="true"] { background:var(--al-selected); color:var(--al-action); font-weight:600; }
#view-matter .mx-subnav-body { min-height:0; }
@media(max-width:1050px) { #view-matter .mx-subnav-frame { grid-template-columns:1fr; height:auto; } #view-matter .mx-subnav { flex-direction:row; flex-wrap:wrap; } }
#view-matter .mx-list-detail { display:grid; grid-template-columns:minmax(0,1fr) 360px; gap:0; min-height:0;  border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); overflow:hidden; background: var(--al-card); }
#view-matter .mx-list-pane { min-height:0; overflow-y:auto; border-right:1px solid var(--al-divider); }
#view-matter .mx-detail-pane { min-height:0; overflow-y:auto; padding:20px; }
@media(max-width:1050px) { #view-matter .mx-list-detail { grid-template-columns:1fr; height:auto; } }
#view-matter .mx-aml-frame { display:grid; grid-template-columns:minmax(0,1fr) 380px; gap:var(--al-gap-card); min-height:0; align-items:start; }
#view-matter .mx-aml-side { display:flex; flex-direction:column; gap:16px; min-height:0; }
#view-matter .mx-ps-hd { display:flex; align-items:center; gap:10px; padding:12px 18px; border-bottom:1px solid var(--al-divider); }
#view-matter .mx-ps-hd h3 { font-size:var(--al-fs-card); font-weight:600; margin:0; }
#view-matter .mx-ps-hd p { font-size:var(--al-fs-label); color:var(--al-text-2); margin:2px 0 0; }
#view-matter .mx-ps-grid { flex:1; min-height:0; overflow-y:auto; display:grid; grid-template-columns:1fr 1fr; align-content:start; scrollbar-width:thin; }
#view-matter .mx-ps-grid.is-overflowing { -webkit-mask-image:linear-gradient(to bottom, black calc(100% - 28px), transparent 100%); mask-image:linear-gradient(to bottom, black calc(100% - 28px), transparent 100%); }
#view-matter .mx-ps-grid::-webkit-scrollbar { width:9px; }
#view-matter .mx-ps-grid::-webkit-scrollbar-thumb { background:var(--al-divider); border-radius: var(--al-r-control); }
#view-matter .mx-ps-box { padding:14px 18px; border-bottom:1px solid var(--al-divider); border-right:1px solid var(--al-divider); }
#view-matter .mx-ps-box:nth-child(2n) { border-right:0; }
#view-matter .mx-ps-box.is-full { grid-column:1/3; border-right:0; }
#view-matter .mx-ps-box-label { font-size:13px; font-weight:500; letter-spacing:0; color:var(--al-text-2); margin-bottom:8px; }
#view-matter .mx-ps-check-grid { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
#view-matter .mx-ps-box.is-full .mx-ps-check-grid { grid-template-columns:repeat(3,1fr); }
#view-matter .mx-ps-check { display:flex; gap:8px; align-items:center; font-size:13px; }
#view-matter .mx-ps-check input[type=checkbox] { margin:0; accent-color:var(--al-action); width:16px; height:16px; flex:none; }
#view-matter .mx-ps-field { margin-top:8px; }
#view-matter .mx-ps-field-label { font-size:12px; color:var(--al-text-2); margin-bottom:4px; }
#view-matter .mx-ps-field input, #view-matter .mx-ps-field textarea { width:100%; }
#view-matter .mx-ps-field input[type=date] { max-width:180px; }
#view-matter .mx-ps-field input[type=text], #view-matter .mx-ps-field input[type=number] { max-width:360px; }
@media(max-width:1050px) { #view-matter .mx-ps-grid { grid-template-columns:1fr; } #view-matter .mx-ps-box, #view-matter .mx-ps-box.is-full { grid-column:1; border-right:0; } }
@media(max-width:1150px) { #view-matter .mx-aml-frame { grid-template-columns:1fr; height:auto; } }
#view-matter .mx-title-eyebrow { font-size:12px; font-weight:500; letter-spacing:0; color:var(--al-text-2); margin:0 0 5px; }
#view-matter .mx-status-dot { width:7px; height:7px; border-radius: 50%; background:var(--al-success); flex:none; }
@media(max-width:1050px) { #view-matter .mx-head-row { flex-direction:column; align-items:flex-start; gap:12px; } #view-matter .mx-head-right { flex-direction:column; align-items:flex-start; gap:14px; } }
#view-matter .mx-journey-row.is-skipped .mx-journey-label { text-decoration: none; }
#view-matter .mx-waiting-details > summary, #view-matter .mx-waiting-details > .mx-waiting-open { list-style: none; display: inline-flex; margin-top: 10px; }
#view-matter .mx-waiting-details > summary::before { display: none; }
#view-matter .mx-reader-toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
#view-matter .mx-reader-toolbar > button { margin: 0; }
#view-matter .mx-draft-wrap { flex: 1 1 auto; min-height: 420px; display: flex; flex-direction: column; }
#view-matter #mx-redaccion-mount { height: auto; }
#view-matter #mx-redaccion-mount .cw2-draft-grid { grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); }
#view-matter #mx-redaccion-mount .cw2-draft-right { background: var(--al-paper); box-shadow: var(--al-shadow-paper); border-color: var(--al-divider); border-radius: var(--al-r-card); }
#view-matter #mx-redaccion-mount .cw2-draft-card { border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); padding: 16px 18px; }
#view-matter #mx-redaccion-mount .cw2-draft-card-lbl { font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--al-text-2); text-transform: none; margin-bottom: 10px; }
#view-matter #mx-redaccion-mount .cw2-draft-ta { min-height: 150px; width: 100%; resize: vertical; }
#view-matter #mx-redaccion-mount .cw2-draft-dictate { position: static; margin-top: 8px; }
#view-matter #mx-redaccion-mount .cw2-draft-toggles { margin-top: 12px; }
#view-matter .mx-ps-grid { display: block; columns: 2; column-gap: 0; overflow: visible; }
#view-matter .mx-ps-box { break-inside: avoid; border-right: 0; }
#view-matter .mx-ps-box.is-full { column-span: all; }
#view-matter .mx-ps-check-grid.is-one { grid-template-columns: 1fr; gap: 10px; }
#view-matter #mx-ps-section-body { min-height: 0; }
#view-matter .mx-task-row .alf-status { margin-right: 10px; }
#view-matter .mx-task-actions { display: flex; gap: 4px; flex: none; }
#view-matter [data-task-feedback]:not(:empty), #view-matter [data-date-feedback]:not(:empty) { background: transparent; border: 0; padding: 0; }
#view-matter #mx-redaccion-mount .cw2-draft-ta { field-sizing: content; min-height: 150px; max-height: 340px; }
#view-matter .mx-ps-field .alf-date, #view-matter .mx-ps-field .alf-select { max-width: 360px; }
#view-matter .mx-ps-field .fe-date-entry input { max-width: none; }
#view-matter .al-table th { background: transparent; text-transform: none; letter-spacing: 0; border-bottom: 1px solid var(--al-divider); }
#view-matter .al-table { overflow: hidden; }
#view-matter .mx-aml-critical { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--al-divider); }
#view-matter .mx-aml-critical .alf-label { margin: 0 0 10px; }
#view-matter #mx-aml-main-body details + * { margin-top: 20px; }
#view-matter #mx-aml-main-body .al-actions { margin-top: 12px; }
#view-matter .mx-aml-frame .al-actions + .al-actions, #view-matter .mx-aml-frame .al-actions + p { margin-top: 12px; }
#view-matter #mx-propiedad-body h3, #view-matter [data-property-memory] h3 { margin: 0 0 8px; font-size: var(--al-fs-ui); font-weight: 600; }
#view-matter [data-property-memory] p { margin: 0 0 8px; line-height: 1.6; }
#view-matter [data-property-memory] { padding: 0 0 16px; margin-bottom: 16px; border-bottom: 1px solid var(--al-divider); background: transparent; border-radius: 0; box-shadow: none; }
#view-matter [data-property-memory] .al-btn { margin-top: 6px; }
#view-matter .mx-docs-rows.is-overflowing, #view-matter .mx-comms-rows.is-overflowing, #view-matter .mx-docs-sidebar.is-overflowing, #view-matter .mx-subnav-body.is-overflowing, #view-matter #mx-comms-reader.is-overflowing { -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 28px), transparent 100%); mask-image: linear-gradient(to bottom, black calc(100% - 28px), transparent 100%); }
#view-matter .mx-docs-layout:has(#mx-docs-detail > p.al-absent) { grid-template-columns: 208px minmax(0, 1fr); }
#view-matter #mx-docs-detail:has(> p.al-absent) { display: none; }
@media (min-width: 1700px) {
  #view-matter .mx-head-row { justify-content: flex-start; gap: 48px; }
  #view-matter .mx-head-left { flex: 0 1 680px; }
  #view-matter .mx-head-right { flex: 1 1 auto; justify-content: space-between; min-width: 0; }
}
#view-matter .alf-state[role="alert"] { background: transparent; border: 0; padding: 36px 24px; border-radius: 0; }
#view-matter .mx-aml-start { max-width: none; padding-top: 0; }
#view-matter .mx-aml-start .alf-select, #view-matter .mx-aml-start select { max-width: 320px; }
#view-matter .mx-aml-start button[type="submit"] { justify-self: start; width: auto; }
#view-matter #mx-tl-lenses { padding: 0; margin: 12px 20px 0; }
#view-matter .mx-docs-more-menu { right: auto; left: 0; top: calc(100% + 6px); bottom: auto; z-index: 90; min-width: 180px; }
#view-matter [data-note-editor] .mx-edit-form, #view-matter [data-notebook-editor] .mx-edit-form { border: 0; padding: 0; margin: 0 0 18px; box-shadow: none; background: transparent; }
#view-matter [data-note-editor] textarea, #view-matter [data-notebook-editor] textarea { field-sizing: content; min-height: 110px; max-height: 320px; }
#view-matter .mx-note-list .mx-message { padding: 16px 0; border-bottom: 1px solid var(--al-divider); }
#view-matter .mx-note-list .mx-message:last-child { border-bottom: 0; }
#view-matter .mx-message-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
#view-matter .mx-comms-reader-pane .mx-message { border: 0; box-shadow: none; background: transparent; padding: 24px 28px; margin: 0; }
#view-matter .mx-comms-panel-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px; }
#view-matter .mx-task-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
#view-matter .mx-task-hd h3 { margin: 0; font-size: var(--al-fs-card); font-weight: 600; }
#view-matter .mx-task-empty { padding: 8px 0 0; color: var(--al-text-2); }
#view-matter .mx-stack { display: flex; flex-direction: column; gap: var(--al-gap-card); min-height: 0; }
#view-matter .mx-docs-row:hover { background: var(--al-selected); }
#view-matter .mx-docs-row[aria-current="true"], #view-matter .mx-docs-row[aria-pressed="true"] { background: var(--al-selected); }
#view-matter .mx-docs-rows { padding: 0 0 72px; }

/* ── The frame: header and tabs stay put, only the tab body scrolls, never the page ── */
body.matter-frame { height: 100vh; overflow: hidden; }
body.matter-frame main.main { padding: 0; overflow: hidden; }
#view-matter { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
#view-matter #mx-tabbody { flex: 1; min-height: 0; overflow-y: auto; padding: var(--al-pad-card) var(--mx-gutter) 72px; position: relative; scrollbar-width: thin; scrollbar-color: var(--al-scroll-thumb) transparent; }
#view-matter #mx-tabbody::-webkit-scrollbar { width: 6px; }
#view-matter #mx-tabbody::-webkit-scrollbar-thumb { background: var(--al-scroll-thumb); border-radius: var(--al-r-chip); }
@media (max-width: 650px) { #view-matter { height: auto; overflow: visible; } body.matter-frame main.main { overflow: auto; } #view-matter #mx-tabbody { overflow-y: visible; } }

/* ── The header: full on Summary (a card), one 56px line on every other tab (RULES section 5) ── */
#view-matter #mx-head { flex: none; margin: 0; padding: 0; background: transparent; border: 0; box-shadow: none; height: auto; position: static; color: var(--al-text); }
#view-matter #mx-head[data-mode="full"] { margin: var(--al-pad-card) var(--mx-gutter) 0; padding: var(--al-pad-card); background: var(--al-card); border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); }
#view-matter #mx-head .mx-head-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
#view-matter #mx-head .al-title { font-size: var(--al-fs-title); font-weight: 800; line-height: 1.25; margin: 0; overflow-wrap: anywhere; }
#view-matter #mx-head .al-title-link { color: inherit; }
#view-matter #mx-head .al-title-link:hover { text-decoration: underline; }
#view-matter #mx-head .mx-head-ref { margin: 8px 0 0; font-size: var(--al-fs-ui); color: var(--al-text-2); overflow-wrap: anywhere; }
#view-matter #mx-head .mx-head-case { color: var(--al-text-2); }
#view-matter #mx-head .mx-head-meta { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 10px 0 0; font-size: var(--al-fs-ui); color: var(--al-text-2); }
#view-matter #mx-head .mx-head-meta b { color: var(--al-text); font-weight: 500; }
#view-matter #mx-head .mx-assign { background: none; border: 0; padding: 9px 4px; margin: -9px 0 -9px 0; margin-left: 4px; font: inherit; font-weight: 600; color: var(--al-action); text-decoration: underline; cursor: pointer; }
#view-matter #mx-head .mx-actions-menu { position: relative; margin: 0 0 0 auto; flex: none; }
#view-matter #mx-head[data-mode="line"] { display: flex; align-items: center; gap: 12px; height: var(--al-sticky-h); padding: 0 var(--mx-gutter); margin: 0; }
#view-matter #mx-head[data-mode="line"] .mx-head-top { display: contents; }
#view-matter #mx-head[data-mode="line"] .al-title { order: 1; font-size: var(--al-fs-card); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#view-matter #mx-head[data-mode="line"] .mx-head-ref { order: 2; margin: 0; white-space: nowrap; }
#view-matter #mx-head[data-mode="line"] .mx-head-place, #view-matter #mx-head[data-mode="line"] .mx-head-meta { display: none; }
#view-matter #mx-head[data-mode="line"] .alf-status { order: 3; }
#view-matter #mx-head[data-mode="line"] .mx-actions-menu { order: 9; margin: 0 0 0 auto; }
#view-matter #mx-actions-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: var(--al-z-attached); width: 300px; background: var(--al-raised); border-radius: var(--al-r-popover); box-shadow: var(--al-shadow-menu); padding: 6px; }
#view-matter #mx-head[data-mode="full"] #mx-actions-panel { left: auto; right: 0; }
#view-matter #mx-actions-panel .al-actions { margin: 0; display: flex; flex-direction: column; gap: 2px; }
#view-matter #mx-actions-panel .al-action { width: 100%; min-height: var(--al-control-h); padding: 0 12px; border: 0; border-radius: var(--al-r-control); background: transparent; color: var(--al-text); font-size: var(--al-fs-ui); cursor: pointer; }
#view-matter #mx-actions-panel .al-action:hover { background: var(--al-selected); }

/* ── Tabs: the selected plate + action text 600; counts quiet; a hairline before People ── */
#view-matter #mx-tabs { flex: none; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin: 16px var(--mx-gutter) 0; padding: 0; border: 0; overflow: visible; }
#view-matter #mx-tabs .mx-tab-count:not(:empty) { margin-left: 6px; color: var(--al-text-2); font-weight: 400; font-size: var(--al-fs-label); font-variant-numeric: tabular-nums; }
#view-matter #mx-tabs [data-tab="personas"] { margin-left: 12px; }
#view-matter #mx-tabs [data-tab="personas"]::before { content: ""; position: absolute; left: -8px; top: 9px; bottom: 9px; width: 1px; background: var(--al-line-control); opacity: .5; }
#view-matter #mx-covering-banner .mx-covering-notice.al-band { margin: 16px var(--mx-gutter) 0; padding: 8px 14px; gap: 8px; }
#view-matter .mx-covering-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--al-attention); flex: none; }
#view-matter .mx-covering-notice span:last-child { font-size: var(--al-fs-ui); color: var(--al-attention); }

/* ── Card primitives: no outline, 12px corners, the card shadow; padding 24; no rule under the title ── */
#view-matter .mx-card { background: var(--al-card); border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); display: flex; flex-direction: column; min-height: 0; }
#view-matter .mx-card-hd { flex: none; padding: var(--al-pad-card) var(--al-pad-card) var(--al-gap-title); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#view-matter .mx-card-hd h2, #view-matter .mx-card-hd h3 { font-size: var(--al-fs-card); font-weight: 600; margin: 0; }
#view-matter .mx-card-hd p { margin: 4px 0 0; font-size: var(--al-fs-label); color: var(--al-text-2); }
#view-matter .mx-card-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 var(--al-pad-card) var(--al-pad-card); scrollbar-width: thin; scrollbar-color: var(--al-scroll-thumb) transparent; }
#view-matter .mx-card-body::-webkit-scrollbar { width: 6px; }
#view-matter .mx-card-body::-webkit-scrollbar-thumb { background: var(--al-scroll-thumb); border-radius: var(--al-r-chip); }
#view-matter .mx-card-body.is-overflowing { -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 24px), transparent 100%); mask-image: linear-gradient(to bottom, black calc(100% - 24px), transparent 100%); }
#view-matter .mx-card-body.is-flush { padding: 0; }
#view-matter #mx-head[data-mode="full"] { display: block; }

/* ── Summary: one strip card (waiting, progress, last contact), then three cards that fit their content ── */
#view-matter .mx-resumen-strip { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 2.4fr) minmax(160px, 1fr); gap: 32px; background: var(--al-card); border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); padding: var(--al-pad-card); align-items: start; }
#view-matter .mx-resumen-strip > div > .al-meta { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
#view-matter .mx-resumen-strip .al-btn { margin-top: 12px; }
#view-matter .mx-resumen-strip > div > div[style] { font-size: var(--al-fs-read) !important; font-weight: 600; }
#view-matter .mx-progress-bar { display: grid; gap: 4px; margin: 4px 0 16px; }
#view-matter .mx-progress-bar span { height: 8px; border-radius: var(--al-r-chip); background: var(--al-divider); }
#view-matter .mx-progress-bar span.is-done { background: var(--al-success); }
#view-matter .mx-progress-bar span.is-current { background: var(--al-action); }
#view-matter .mx-progress-split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 0; }
#view-matter .mx-progress-split dt { font-size: var(--al-fs-label); color: var(--al-text-2); margin: 0 0 2px; }
#view-matter .mx-progress-split dd { margin: 0; font-weight: 600; }
#view-matter .mx-resumen-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--al-gap-card); margin-top: var(--al-gap-card); align-items: start; }
#view-matter .mx-resumen-cards > .al-region { background: var(--al-card); border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); padding: 0 0 var(--al-pad-card); min-width: 0; }
#view-matter .mx-resumen-cards .al-region-hd { padding: var(--al-pad-card) var(--al-pad-card) var(--al-gap-title); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#view-matter .mx-resumen-cards .al-region-hd h2, #view-matter .mx-resumen-cards .al-region-hd > span:first-child { font-size: var(--al-fs-card); font-weight: 600; color: var(--al-text); }
#view-matter .mx-resumen-cards .al-region > :not(.al-region-hd) { margin-left: var(--al-pad-card); margin-right: var(--al-pad-card); }
#view-matter .al-kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
#view-matter .al-kv dt { color: var(--al-text-2); font-size: var(--al-fs-label); }
#view-matter .al-kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
#view-matter .mx-money-headline { font-size: var(--al-fs-title); font-weight: 600; margin: 0 0 4px; font-variant-numeric: tabular-nums; }
#view-matter .al-sec-title { font-size: var(--al-fs-label); color: var(--al-text-2); margin: 12px 0 6px; }
#view-matter .mx-card-footer { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--al-divider); }
#view-matter .mx-card-footer .al-btn { border: 0; background: none; padding: 0; height: auto; color: var(--al-action); font-weight: 600; box-shadow: none; }
#view-matter .mx-commitment-list { display: flex; flex-direction: column; }
#view-matter .mx-commitment { display: flex; gap: 12px; align-items: baseline; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--al-divider); padding: 10px 0; cursor: pointer; font: inherit; color: var(--al-text); }
#view-matter .mx-commitment small { display: block; color: var(--al-text-2); font-size: var(--al-fs-label); }
#view-matter .mx-commitment .mx-date { width: 56px; flex: none; color: var(--al-text-2); font-size: var(--al-fs-label); }
#view-matter .mx-completion-entry { margin-top: var(--al-gap-card); background: var(--al-card); border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); padding: var(--al-pad-card); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#view-matter .mx-completion-entry h3 { margin: 0; font-size: var(--al-fs-card); font-weight: 600; }
@media (max-width: 1100px) { #view-matter .mx-resumen-strip { grid-template-columns: 1fr; } #view-matter .mx-resumen-cards { grid-template-columns: 1fr; } }

/* ── Lists inside cards: a date, a title that wraps, an action at the end; rows 44px, hairline between ── */
#view-matter .al-flow { display: flex; flex-direction: column; }
#view-matter .al-flow-row { display: flex; gap: 12px; align-items: baseline; min-height: var(--al-row-compact); padding: 10px 0; border-bottom: 1px solid var(--al-divider); }
#view-matter .al-flow-row:last-child { border-bottom: 0; }
#view-matter .al-flow-key { flex: none; width: 56px; font-family: var(--al-font-ui); font-size: var(--al-fs-label); color: var(--al-text-2); white-space: nowrap; }
#view-matter .al-flow-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
#view-matter .al-flow-row .al-meta { display: block; }
#view-matter .mx-resumen-strip .al-btn.al-btn-standard { width: auto; }

#view-matter #mx-tabs .al-tab { position: relative; height: var(--al-control-h); padding: 0 12px; border: 0; border-radius: var(--al-r-control); background: transparent; color: var(--al-action); font-size: var(--al-fs-ui); cursor: pointer; }
#view-matter #mx-tabs .al-tab:hover { background: transparent; box-shadow: inset 0 0 0 1px var(--al-divider); }
#view-matter #mx-tabs .al-tab[aria-selected="true"]:hover { box-shadow: none; }
#view-matter #mx-tabs .al-tab[aria-selected="true"] { background: var(--al-selected); font-weight: 600; }
#view-matter .al-flow-row > .al-btn { justify-self: end; }
#view-matter #mx-tabs { flex-wrap: nowrap; gap: 2px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: var(--al-scroll-thumb) transparent; }
#view-matter #mx-tabs::-webkit-scrollbar { height: 6px; }
#view-matter #mx-tabs::-webkit-scrollbar-thumb { background: var(--al-scroll-thumb); border-radius: var(--al-r-mark); }
#view-matter #mx-tabs::-webkit-scrollbar-track { background: transparent; }
#view-matter #mx-tabs .al-tab { padding: 0 10px; white-space: nowrap; flex: none; }
#view-matter #mx-tabs [data-tab="personas"] { margin-left: 10px; }
#view-matter #mx-head[data-mode="full"] { position: relative; }
#view-matter #mx-tabs .al-tab { padding: 0 8px; }
#view-matter #mx-tabs [data-tab="personas"] { margin-left: 8px; }
#view-matter #mx-cronologia .al-flow-row > .al-btn { display: none; }
#view-matter #mx-tabs { gap: 0; }
#view-matter #mx-tabs .al-tab { padding: 0 7px; }
#view-matter #mx-tabs [data-tab="personas"] { margin-left: 6px; }
#view-matter #mx-tabs [data-tab="personas"]::before { left: -4px; }

/* ── Line mode: the header line and the tab strip are one white band with a divider under it (P02, P05, P10) ── */
#view-matter:has(#mx-head[data-mode="line"]) #mx-head { background: var(--al-card); }
#view-matter:has(#mx-head[data-mode="line"]) #mx-tabs { margin: 0; padding: 4px var(--mx-gutter) 8px; background: var(--al-card); border-bottom: 1px solid var(--al-divider); }

/* ── Drafting, step 1: choose (P01-P03, D8). One card, the Alfred rail beside it. ── */
#view-matter .dr-grid { display: grid; grid-template-columns: minmax(0, 1fr) 352px; gap: var(--al-gap-card); align-items: start; }
#view-matter .dr-card { background: var(--al-card); border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); min-width: 0; }
#view-matter .dr-hd { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: var(--al-pad-card) var(--al-pad-card) var(--al-gap-title); }
#view-matter .dr-hd h2 { font-size: var(--al-fs-card); font-weight: 600; }
#view-matter .dr-body { padding: 0 var(--al-pad-card) var(--al-pad-card); }
#view-matter .dr-quiet { color: var(--al-text-2); font-size: var(--al-fs-label); }
#view-matter .dr-label { color: var(--al-text-2); font-size: var(--al-fs-label); margin: 8px 0; display: block; }
#view-matter .dr-id { font-family: var(--al-font-id); font-size: var(--al-fs-label); }
#view-matter .dr-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--al-r-control); box-shadow: inset 0 0 0 1px var(--al-line-control); background: var(--al-field); }
#view-matter .dr-seg button { height: 32px; padding: 0 14px; border: 0; border-radius: var(--al-r-control); background: transparent; color: var(--al-text); font-size: var(--al-fs-ui); cursor: pointer; white-space: nowrap; }
#view-matter .dr-seg button[aria-pressed="true"] { background: var(--al-action); color: var(--al-text-inverse); font-weight: 600; }
#view-matter .dr-source { display: flex; align-items: center; gap: 10px; padding: 0 var(--al-pad-card) 8px; flex-wrap: wrap; font-size: var(--al-fs-ui); color: var(--al-text-2); }
#view-matter .dr-chip { display: inline-flex; align-items: center; height: var(--al-chip-h); padding: 0 12px; border-radius: var(--al-r-chip); background: var(--al-selected); color: var(--al-text); font-weight: 500; }
#view-matter .dr-tpls { display: flex; flex-direction: column; }
#view-matter .dr-tpl { display: flex; align-items: center; gap: 14px; min-height: var(--al-row-compact); padding: 0 14px; border: 0; border-radius: var(--al-r-control); background: transparent; color: var(--al-text); font-size: var(--al-fs-read); text-align: left; cursor: pointer; }
#view-matter .dr-tpl:hover { background: var(--al-selected); }
#view-matter .dr-tpl[aria-checked="true"] { background: var(--al-selected); }
#view-matter .dr-radio { width: 20px; height: 20px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1.5px var(--al-line-control); background: var(--al-field); }
#view-matter .dr-tpl[aria-checked="true"] .dr-radio { box-shadow: inset 0 0 0 6px var(--al-action); }
#view-matter .dr-note { color: var(--al-text-2); font-size: var(--al-fs-label); margin: 20px 0 0; }
#view-matter .dr-ta { width: 100%; min-height: 180px; padding: 12px; border: 0; border-radius: var(--al-r-control); box-shadow: inset 0 0 0 1px var(--al-line-control); background: var(--al-field); font-size: var(--al-fs-read); resize: vertical; }
#view-matter .dr-ta:focus-visible { box-shadow: var(--al-focus); outline: none; }
#view-matter .dr-dictate { margin-top: 8px; }
#view-matter .dr-foot { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; padding: 20px var(--al-pad-card) var(--al-pad-card); border-top: 1px solid var(--al-divider); }
#view-matter .dr-chips { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; width: 100%; }
#view-matter .dr-toggle { display: inline-flex; align-items: center; height: var(--al-chip-h); padding: 0 14px; border-radius: var(--al-r-chip); background: var(--al-selected); font-size: var(--al-fs-ui); font-weight: 500; cursor: pointer; position: relative; }
#view-matter .dr-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
#view-matter .dr-toggle span::before { content: "\2713\00a0"; }
#view-matter .dr-toggle input:not(:checked) + span { color: var(--al-text-2); text-decoration: line-through; }
#view-matter .dr-toggle input:not(:checked) + span::before { content: ""; }
#view-matter .dr-toggle:has(input:focus-visible) { box-shadow: var(--al-focus); }
#view-matter .dr-options > .al-rule, #view-matter .dr-options > .al-label { display: none; }
#view-matter .dr-options .al-field-row { display: flex; gap: 10px; align-items: center; margin: 0; }
#view-matter .dr-options .al-field { margin: 0; display: flex; align-items: center; gap: 8px; }
#view-matter .dr-options .al-field label { margin: 0; color: var(--al-text-2); font-size: var(--al-fs-ui); }
#view-matter .dr-options .al-field-hint:empty { display: none; }
#view-matter .dr-side { display: flex; flex-direction: column; gap: var(--al-gap-card); min-width: 0; }
#view-matter .dr-use { padding: 10px 0; border-bottom: 1px solid var(--al-divider); display: flex; flex-direction: column; gap: 2px; }
#view-matter .dr-use:last-child { border-bottom: 0; }
#view-matter .dr-use strong { font-weight: 600; }
#view-matter .dr-use span { color: var(--al-text-2); font-size: var(--al-fs-label); overflow-wrap: anywhere; }
#view-matter .dr-session { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--al-divider); }
#view-matter .dr-session:last-child { border-bottom: 0; }
#view-matter .dr-session strong { display: block; font-weight: 500; overflow-wrap: anywhere; }
#view-matter .dr-session span { color: var(--al-text-2); font-size: var(--al-fs-label); }

/* ── Drafting, step 2: the draft (P04-P06, D9). The A4 paper is 794px, the ask bar sits under it. ── */
#view-matter .dr-step2:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) 352px; gap: var(--al-gap-card); align-items: start; }
#view-matter .dr2-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
#view-matter .dr2-hd { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
#view-matter .dr2-title h2 { font-size: var(--al-fs-card); font-weight: 600; }
#view-matter .dr2-title p { margin: 4px 0 0; color: var(--al-text-2); font-size: var(--al-fs-label); }
#view-matter .dr2-gap { color: var(--al-attention); font-weight: 600; }
#view-matter .dr2-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#view-matter .dr2-note { display: flex; gap: 10px; align-items: flex-start; font-size: var(--al-fs-ui); color: var(--al-text); }
#view-matter .dr2-note p { margin: 0; }
#view-matter .dr2-a { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--al-brass); color: var(--al-brass-read); font-family: var(--al-font-identity); font-weight: 600; font-size: 14px; }
#view-matter .dr2-scroll { max-height: calc(100vh - 470px); min-height: 300px; overflow-y: auto; padding: 4px 4px 72px; scrollbar-width: thin; scrollbar-color: var(--al-scroll-thumb) transparent; }
#view-matter .dr2-paper-wrap { display: flex; flex-direction: column; align-items: center; }
#view-matter .dr2-paper { width: 100%; max-width: var(--al-paper-w); background: var(--al-paper); box-shadow: var(--al-shadow-paper); border: 0; }
#view-matter .dr2-paper-wait { aspect-ratio: 1 / 1.414; padding: 56px 48px; display: flex; flex-direction: column; gap: 14px; }
#view-matter .dr2-paper-wait span { display: block; height: 8px; border-radius: var(--al-r-chip); background: var(--al-divider); }
#view-matter .dr2-paper-wait span:nth-child(1) { width: 55%; height: 14px; margin: 0 auto 20px; }
#view-matter .dr2-paper-wait span:nth-child(2) { width: 90%; }
#view-matter .dr2-paper-wait span:nth-child(3) { width: 82%; }
#view-matter .dr2-paper-wait span:nth-child(4) { width: 88%; }
#view-matter .dr2-paper-wait span:nth-child(5) { width: 70%; }
#view-matter .dr2-status { margin-top: 12px; text-align: center; }
#view-matter .dr2-frame { display: none; height: 1123px; }
#view-matter .dr2-ask { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--al-card); border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); }
#view-matter .dr2-ask input { flex: 1; height: var(--al-control-h); padding: 0 12px; border: 0; border-radius: var(--al-r-control); box-shadow: inset 0 0 0 1px var(--al-line-control); background: var(--al-field); font-size: var(--al-fs-read); }
#view-matter .dr2-ask input:focus-visible { box-shadow: var(--al-focus); outline: none; }
#view-matter .dr2-side { display: flex; flex-direction: column; gap: var(--al-gap-card); min-width: 0; }
#view-matter .dr2-src { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: var(--al-row-compact); padding: 10px 0; border: 0; border-bottom: 1px solid var(--al-divider); background: none; text-align: left; font: inherit; cursor: pointer; color: var(--al-text); }
#view-matter .dr2-src small { display: block; color: var(--al-text-2); font-size: var(--al-fs-label); }
#view-matter .dr2-src small.is-warn { color: var(--al-attention); }
#view-matter .dr2-n { font-variant-numeric: tabular-nums; font-weight: 600; }
#view-matter .dr2-compare { align-self: flex-start; }
@media (max-width: 1100px) { #view-matter .dr-grid, #view-matter .dr-step2:not([hidden]) { grid-template-columns: 1fr; } }

#view-matter [hidden] { display: none !important; }
#view-matter .mx-draft-wrap { display: block; }
#view-matter #mx-redaccion-mount { overflow: visible !important; }

/* ── Chronology (D13): a day heading that stays in view, a type mark on the left, the whole row opens, runs fold ── */
#view-matter .tl-list { display: flex; flex-direction: column; }
#view-matter .tl-day { position: sticky; top: 0; z-index: 1; background: var(--al-card); margin: 0; padding: 14px 0 6px; font-size: var(--al-fs-label); font-weight: 600; color: var(--al-text-2); }
#view-matter .tl-row, #view-matter .tl-more { display: flex; align-items: center; gap: 14px; width: 100%; min-height: var(--al-row); padding: 6px 0; border: 0; border-bottom: 1px solid var(--al-divider); background: transparent; color: var(--al-text); font: inherit; text-align: left; }
#view-matter .tl-row.is-open { cursor: pointer; }
#view-matter .tl-row.is-open:hover { background: var(--al-selected); }
#view-matter .tl-mark { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--al-r-control); background: var(--al-selected); color: var(--al-text-2); font-size: 15px; }
#view-matter .tl-mark.tl-hito { background: var(--al-success-wash); color: var(--al-success); }
#view-matter .tl-mark.tl-caida { background: var(--al-critical-wash); color: var(--al-critical); }
#view-matter .tl-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
#view-matter .tl-title small { display: block; color: var(--al-text-2); font-size: var(--al-fs-label); }
#view-matter .tl-type { flex: none; color: var(--al-text-2); font-size: var(--al-fs-ui); }
#view-matter .tl-go { flex: none; width: 16px; color: var(--al-text-2); }
#view-matter .tl-more .tl-title { color: var(--al-text-2); }

/* ── Financial, client account (D12): the figure that matters first, one ledger, figures you can compare ── */
#view-matter .fin-head { display: flex; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin: 0 0 20px; }
#view-matter .fin-held, #view-matter .fin-side { display: flex; flex-direction: column; gap: 2px; }
#view-matter .fin-label { color: var(--al-text-2); font-size: var(--al-fs-label); }
#view-matter .fin-big { font-size: 36px; font-weight: 600; line-height: 1.1; }
#view-matter .fin-side b { font-size: var(--al-fs-read); font-weight: 600; }
#view-matter .fin-record { margin-left: auto; }
#view-matter .fin-ledger { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
/* Step 9 (10 Oct 2026): style.css's global `thead`/`thead th` (navy band, spaced capitals) leaked into the ledger; the pack's header is a line */
#view-matter .fin-ledger thead, #view-matter .fin-ledger thead tr { background: none; }
#view-matter .fin-ledger th { text-transform: none; letter-spacing: 0; white-space: nowrap; background: none; }
#view-matter .fin-ledger th { text-align: left; color: var(--al-text-2); font-size: var(--al-fs-label); font-weight: 500; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--al-divider); }
#view-matter .fin-ledger td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--al-divider); vertical-align: baseline; }
#view-matter .fin-ledger .num { text-align: right; white-space: nowrap; padding-right: 0; padding-left: 12px; }
#view-matter .fin-ledger small { display: block; color: var(--al-text-2); font-size: var(--al-fs-label); }
#view-matter .fin-date { color: var(--al-text-2); white-space: nowrap; }
#view-matter .fin-dir { font-weight: 600; }
#view-matter .fin-dir.is-in { color: var(--al-success); }
#view-matter .fin-dir.is-out { color: var(--al-critical); }

/* ── Shared parts A1 A2 A3 A6 A8 A9 A10 (SPEC §A, 3 Oct 2026). One rule each; proven with 12 live shots at 1366. ── */
/* A1 · the tab body is the one scroll area; Documents and Chronology are list tabs whose cards fill the tab and scroll inside (RULES §4–5, RECIPES B2) */
#view-matter #mx-tabbody[data-workspace="documentos"], #view-matter #mx-tabbody[data-workspace="cronologia"] { display: flex; flex-direction: column; overflow: hidden; padding-bottom: var(--al-pad-card); }
#view-matter #mx-tabbody[data-workspace="documentos"] .mx-docs-layout, #view-matter #mx-tabbody[data-workspace="cronologia"] .mx-split { flex: 1; min-height: 0; align-items: stretch; }
#view-matter #mx-tabbody[data-workspace="cronologia"] .mx-card { min-height: 0; }
#view-matter #mx-tabbody[data-workspace="cronologia"] .mx-card-body { padding-bottom: 72px; }
#view-matter .mx-docs-list, #view-matter .mx-docs-sidebar, #view-matter .mx-docs-detail { min-height: 0; }
#view-matter .mx-docs-rows.is-overflowing, #view-matter .mx-card-body.is-overflowing, #view-matter .mx-docs-sidebar.is-overflowing { -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 24px), transparent 100%); mask-image: linear-gradient(to bottom, black calc(100% - 24px), transparent 100%); }
#view-matter .mx-docs-rows, #view-matter .mx-docs-sidebar, #view-matter .mx-card-body { scrollbar-width: thin; scrollbar-color: var(--al-scroll-thumb) transparent; }
/* A2 · one selected look (plate + action 600) — side lists, rows, folders, chips; the only filled switch is a one-view-on switch (D6 §4) */
#view-matter .mx-subnav button[aria-current="true"], #view-matter .mx-docs-folder[aria-pressed="true"] { background: var(--al-selected); color: var(--al-action); font-weight: 600; }
#view-matter .alf-filter { height: var(--al-chip-h); padding: 0 12px; border: 0; border-radius: var(--al-r-chip); box-shadow: inset 0 0 0 1px var(--al-line-control); background: var(--al-card); color: var(--al-text); font-size: var(--al-fs-label); font-weight: 500; }
#view-matter .alf-filter[aria-pressed="true"] { background: var(--al-selected); color: var(--al-action); box-shadow: inset 0 0 0 1px var(--al-action); font-weight: 700; }
/* A3 · card titles 18/600, no rule under them, 14px to the content; in-card sub-headings are interface text 14/600 */
#view-matter .mx-card-hd h2, #view-matter .mx-card-hd h3, #view-matter .mx-task-hd h3, #view-matter .mx-ps-hd h3, #view-matter .al-region-hd h2, #view-matter .al-region-hd > span:first-child, #view-matter .dr-hd h2, #view-matter .dr2-title h2, #view-matter .mx-section-hd > h2 { font-size: var(--al-fs-card); font-weight: 600; letter-spacing: 0; }
#view-matter .mx-section-hd { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 var(--al-gap-title); }
#view-matter .mx-section-hd > h3 { font-size: var(--al-fs-ui); font-weight: 600; margin: 0; }
#view-matter .mx-card-hd { border-bottom: 0; }
/* A6 · empty cards fit their content */
#view-matter .mx-card, #view-matter .mx-subnav-body .mx-card, #view-matter #mx-fin-body, #view-matter #mx-ps-section-body { height: auto !important; min-height: 0; }
/* A8 · one focus ring, keyboard only, never clipped */
#view-matter :focus { outline: none; }
#view-matter :is(button, a, input, select, textarea, summary, [tabindex]):focus-visible { outline: none; box-shadow: var(--al-focus); }
#view-matter #mx-tabs { padding-top: 4px; padding-bottom: 8px; }
/* A9 · nothing ends under the Alfred pill */
#view-matter #mx-tabbody { padding-bottom: 72px; }
#view-matter .mx-docs-rows { padding-bottom: 72px; }
#view-matter .mx-comms-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 16px; }
#view-matter .mx-comms-head p { margin: 0; }
#view-matter .al-btn:disabled { opacity: .45; cursor: default; }

/* ── Shared parts A4 A5 A7 (SPEC §A) ── */
/* A4 · controls as wide as their text; the drafting settings row reads Case documents · Clause bank · Letterhead · Language · value ▾ · Draft (P02) */
#view-matter .dr-options > .al-rule, #view-matter .dr-options > .al-label, #view-matter .dr-options .al-seg, #view-matter .dr-options .al-field:has(.al-seg) > label { display: none; }
#view-matter .dr-options .al-field-row { display: contents; }
#view-matter .dr-options { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; flex: 1 1 100%; }
#view-matter .dr-options .al-field { display: contents; }
#view-matter .dr-options .al-field > label { margin: 0; color: var(--al-text-2); font-size: var(--al-fs-ui); font-weight: 400; white-space: nowrap; }
#view-matter .dr-options .al-field > label::after { content: " ·"; }
#view-matter .dr-options select { width: auto; min-width: 0; height: var(--al-chip-h); min-height: var(--al-chip-h); padding: 0 32px 0 12px; font-size: var(--al-fs-label); font-weight: 600; border-radius: var(--al-r-chip); box-shadow: inset 0 0 0 1px var(--al-line-control); background: var(--al-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%231A2433' stroke-width='1.8'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center / 14px; appearance: none; }
#view-matter .dr-options .al-field-hint { flex: 1 1 100%; margin: 0; font-size: var(--al-fs-label); color: var(--al-text-2); }
#view-matter .dr-options .al-field:has(.al-seg) .al-field-hint { order: 9; }
#view-matter .dr-options .al-field-hint:empty { display: none; }
#view-matter .dr-chips { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }
#view-matter .dr-foot { gap: 12px; }
#view-matter .dr-foot .al-btn { white-space: nowrap; }
#view-matter .al-btn, #view-matter select, #view-matter .alf-button { white-space: nowrap; min-width: max-content; }
/* A5 · names never break mid-word; at most two lines; full name on hover */
#view-matter .mx-file { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: normal; word-break: normal; }
#view-matter .al-flow-title, #view-matter .tl-title { overflow-wrap: normal; }
/* A7 · the ⋯ menu (RECIPES B8 / C2): a 32px target, 16px icon, items 40 high, destructive last in critical after a divider */
#view-matter .mx-more { position: relative; display: inline-flex; flex: none; }
#view-matter .mx-more-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 32px; height: 32px; padding: 0 6px; border: 0; border-radius: var(--al-r-control); background: transparent; color: var(--al-text-2); font: inherit; font-size: var(--al-fs-ui); font-weight: 500; cursor: pointer; }
#view-matter .mx-more-btn > span { color: var(--al-action); }
#view-matter .mx-more-btn:hover, #view-matter .mx-more-btn[aria-expanded="true"] { background: var(--al-selected); color: var(--al-text); }
#view-matter .mx-more-btn .alf-icon { width: 16px; height: 16px; stroke: currentColor; fill: currentColor; stroke-width: 1.8; }
#view-matter .mx-more-btn .alf-icon path { fill: none; }
#view-matter .mx-more-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: var(--al-z-attached); min-width: 220px; padding: 6px; background: var(--al-raised); border-radius: var(--al-r-popover); box-shadow: var(--al-shadow-menu); display: flex; flex-direction: column; gap: 2px; }
#view-matter .mx-more-menu .al-action, #view-matter #mx-actions-panel .al-action { display: flex; width: 100%; min-height: var(--al-control-h); padding: 0 12px; border: 0; border-radius: var(--al-r-control); background: transparent; color: var(--al-text); font-size: var(--al-fs-ui); text-align: left; cursor: pointer; }
#view-matter .mx-more-menu .al-action:hover, #view-matter #mx-actions-panel .al-action:hover { background: var(--al-selected); }
#view-matter .al-action.is-danger { color: var(--al-critical); }
#view-matter .al-action.is-danger:hover { background: var(--al-critical-wash); }
#view-matter .al-menu-divider { height: 1px; margin: 6px 4px; background: var(--al-divider); }
#view-matter #mx-actions-panel .al-actions { gap: 2px; }
#view-matter .mx-dates-actions { gap: 8px; }
#view-matter .mx-will-card { margin-top: var(--al-gap-card); }
#view-matter .mx-will-note { margin: 0 0 12px; }
#view-matter #mx-personas-body .al-table td:last-child { text-align: right; }

/* Drafting fills the tab (P01): the choice card takes the height, its list scrolls, the settings row and Draft stay in view */
#view-matter #mx-tabbody[data-workspace="redaccion"] { display: flex; flex-direction: column; overflow: hidden; padding-bottom: var(--al-pad-card); }
#view-matter #mx-tabbody[data-workspace="redaccion"] .mx-draft-wrap { flex: 1; min-height: 0; }
#view-matter #mx-tabbody[data-workspace="redaccion"] #mx-redaccion-mount { height: 100%; min-height: 0; overflow: visible; }
#view-matter .dr-grid { height: 100%; min-height: 0; align-items: stretch; }
#view-matter .dr-choose { display: flex; flex-direction: column; min-height: 0; }
#view-matter .dr-choose .dr-body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--al-scroll-thumb) transparent; }
#view-matter .dr-choose .dr-foot { flex: none; }
#view-matter .dr-side { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--al-scroll-thumb) transparent; padding-bottom: 72px; }
#view-matter .dr-step2:not([hidden]) { height: 100%; min-height: 0; align-items: stretch; }
#view-matter .dr2-main { min-height: 0; }
#view-matter .dr2-scroll { flex: 1; min-height: 0; max-height: none; }
#view-matter .dr2-side { min-height: 0; overflow-y: auto; padding-bottom: 72px; }
/* no stray rule at the top of a card section */
#view-matter .mx-card-body > .mx-dates-section:first-child, #view-matter #mx-legal-body > .mx-dates-section:first-child, #view-matter #mx-aml-main-body > .mx-dates-section:first-child, #view-matter .mx-dates-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
#view-matter .dr-use .mx-file { display: inline; }
#view-matter .tl-mark.is-blank { background: transparent; }

/* ── Summary (SPEC C1): Where it stands + Progress (D11), then three cards; links bottom-left; client account as D12-small ── */
#view-matter .mx-resumen-top { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2.2fr); gap: var(--al-gap-card); align-items: start; }
#view-matter .mx-resumen-cards { margin-top: var(--al-gap-card); }
#view-matter .mx-card-hd .al-meta { margin-left: 0; flex: 1; }
#view-matter .mx-card-hd .mx-text-button { flex: none; }
#view-matter .mx-field { display: flex; flex-direction: column; gap: 2px; padding: 0 0 14px; }
#view-matter .mx-field + .mx-field { padding-top: 14px; border-top: 1px solid var(--al-divider); }
#view-matter .mx-field:last-child { padding-bottom: 0; }
#view-matter .mx-field-label { font-size: var(--al-fs-label); color: var(--al-text-2); }
#view-matter .mx-field-value { font-size: var(--al-fs-read); font-weight: 600; }
#view-matter .mx-stands .mx-waiting-details > summary, #view-matter .mx-stands .mx-waiting-details > .mx-waiting-open { margin-top: 8px; }
#view-matter .mx-steps { display: grid; gap: 8px; align-items: start; }
#view-matter .mx-step { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
#view-matter .mx-step-bar { display: block; height: 8px; border-radius: var(--al-r-chip); background: var(--al-divider); }
#view-matter .mx-step.is-done .mx-step-bar { background: var(--al-action); }
#view-matter .mx-step.is-current .mx-step-bar { background: transparent; box-shadow: inset 0 0 0 1.5px var(--al-action); }
#view-matter .mx-step.is-skipped .mx-step-bar { background: repeating-linear-gradient(90deg, var(--al-line-control) 0 4px, transparent 4px 8px); }
#view-matter .mx-step-name { font-size: var(--al-fs-label); line-height: 1.3; color: var(--al-text); overflow-wrap: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#view-matter .mx-step.is-upcoming .mx-step-name, #view-matter .mx-step.is-skipped .mx-step-name { color: var(--al-text-2); }
#view-matter .mx-conflict { margin: 16px 0 0; padding: 0; background: none; color: var(--al-attention); font-size: var(--al-fs-ui); font-weight: 600; }
#view-matter .mx-card-footer { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--al-divider); }
#view-matter .mx-card-footer .mx-text-button { font-size: var(--al-fs-ui); }
#view-matter .fin-head.is-small { gap: 20px; margin-bottom: 12px; }
#view-matter .fin-head.is-small .fin-big { font-size: 28px; }
#view-matter .al-flow-row.is-open { width: 100%; border-left: 0; border-right: 0; border-top: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; }
#view-matter .al-flow-row.is-open:hover { background: var(--al-selected); }
#view-matter .al-flow-go { flex: none; color: var(--al-text-2); }
#view-matter .mx-money.is-in { color: var(--al-success); }
#view-matter .mx-money.is-out { color: var(--al-critical); }
@media (max-width: 1500px) { #view-matter .mx-resumen-top { grid-template-columns: 1fr; } #view-matter .mx-stands .mx-card-body { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px; } #view-matter .mx-stands .mx-field { padding: 0; } #view-matter .mx-stands .mx-field + .mx-field { padding-top: 0; border-top: 0; border-left: 1px solid var(--al-divider); padding-left: 32px; } }
#view-matter .mx-stands .mx-card-body { display: flex; gap: 32px; align-items: flex-start; }
#view-matter .mx-stands .mx-field { flex: 1; padding: 0; }
#view-matter .mx-stands .mx-field + .mx-field { padding-top: 0; border-top: 0; border-left: 1px solid var(--al-divider); padding-left: 32px; }
#view-matter .mx-stands .mx-waiting-details > summary, #view-matter .mx-stands .mx-waiting-details > .mx-waiting-open { margin-top: 8px; }
@media (max-width: 1500px) { #view-matter .mx-stands .mx-card-body { display: flex; } }

/* ── Property (SPEC C9): key-values as a two-column grid with the value next to its label (B3); the reference in mono; one surface ── */
#view-matter .al-kv.is-property { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr); gap: 12px 24px; align-items: baseline; max-width: 1100px; }
#view-matter .al-kv.is-property dd { text-align: left; }
#view-matter .al-kv.is-property dt:first-child + dd { font-family: var(--al-font-id); font-size: var(--al-fs-ui); }
#view-matter .al-kv.is-property + .al-sec-title { margin-top: 20px; }
#view-matter #mx-prop-body .al-sec-title { font-size: var(--al-fs-ui); font-weight: 600; color: var(--al-text); margin: 20px 0 8px; }
#view-matter #mx-prop-body .al-absent + .al-meta { margin-top: 4px; }
#view-matter .mx-fact-table th:first-child, #view-matter .mx-fact-table td:first-child { padding-left: 0; }
#view-matter .mx-fact-table td:last-child { white-space: normal; }
@media (max-width: 1100px) { #view-matter .al-kv.is-property { grid-template-columns: max-content minmax(0, 1fr); } }
/* ── Post-sale (SPEC C11): one field width per column, section dividers, save actions at the end of the form ── */
#view-matter .mx-ps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; columns: auto; }
#view-matter .mx-ps-box { padding: 16px 0; border-bottom: 1px solid var(--al-divider); border-right: 0; }
#view-matter .mx-ps-box.is-full { grid-column: 1 / -1; }
#view-matter .mx-ps-box-label { font-size: var(--al-fs-ui); font-weight: 600; color: var(--al-text); margin-bottom: 10px; }
#view-matter .mx-ps-field { margin-top: 12px; }
#view-matter .mx-ps-field-label { font-size: var(--al-fs-label); font-weight: 500; color: var(--al-text); margin-bottom: 6px; }
#view-matter .mx-ps-field input, #view-matter .mx-ps-field textarea, #view-matter .mx-ps-field input[type=text], #view-matter .mx-ps-field input[type=number], #view-matter .mx-ps-field input[type=date], #view-matter .mx-ps-field .alf-date, #view-matter .mx-ps-field .alf-select { width: 100%; max-width: none; }
#view-matter .mx-ps-hd { padding: var(--al-pad-card) var(--al-pad-card) 0; border-bottom: 0; }
#view-matter #mx-ps-section-body form.mx-ps-grid { padding: 0 var(--al-pad-card); }
#view-matter .mx-ps-foot { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; padding: 16px var(--al-pad-card); margin-top: 8px; background: var(--al-card); border-top: 1px solid var(--al-divider); border-radius: 0 0 var(--al-r-card) var(--al-r-card); }
#view-matter #mx-ps-handoff-feedback { padding: 0 var(--al-pad-card); }
#view-matter #mx-ps-handoff-feedback:empty { display: none; }
@media (max-width: 1050px) { #view-matter .mx-ps-grid { grid-template-columns: 1fr; } }
#view-matter .mx-card > .mx-card-body:first-child { padding-top: var(--al-pad-card); }
#view-matter #mx-head .mx-actions-menu { padding: 0; }

/* ── Communications (SPEC C2, D10, P08–P12): two cards, the thread on paper, the reply in place ── */
#view-matter #mx-tabbody[data-workspace="comunicaciones"] { display: flex; flex-direction: column; overflow: hidden; padding-bottom: var(--al-pad-card); }
#view-matter #mx-tabbody[data-workspace="comunicaciones"] .mx-comms-layout { flex: 1; min-height: 0; align-items: stretch; }
#view-matter .mx-comms-layout { display: grid; grid-template-columns: minmax(300px, 26%) minmax(0, 1fr); gap: var(--al-gap-card); }
#view-matter .mx-comms-list-pane { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
#view-matter .mx-comms-list-pane .mx-card-hd { flex: none; }
#view-matter .mx-comms-list-pane .mx-card-hd .al-actions { gap: 12px; }
#view-matter .mx-comms-search { flex: none; padding: 0 var(--al-pad-card) 12px; }
#view-matter .mx-comms-search input { width: 100%; }
#view-matter .mx-comms-rows { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 72px; scrollbar-width: thin; scrollbar-color: var(--al-scroll-thumb) transparent; }
#view-matter .mx-comms-row { display: block; width: 100%; min-height: var(--al-row-2line); padding: 10px 16px; border: 0; border-radius: var(--al-r-control); background: transparent; text-align: left; font: inherit; color: var(--al-text); cursor: pointer; }
#view-matter .mx-comms-row + .mx-comms-row { border-top: 1px solid var(--al-divider); border-radius: 0; }
#view-matter .mx-comms-row:hover { background: var(--al-selected); }
#view-matter .mx-comms-row[aria-current="true"] { background: var(--al-selected); }
#view-matter .mx-comms-row[aria-current="true"] .mx-comms-who { color: var(--al-action); }
#view-matter .mx-comms-row-top, #view-matter .mx-comms-row-bottom { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; min-width: 0; }
#view-matter .mx-comms-who { font-weight: 600; font-size: var(--al-fs-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#view-matter .mx-comms-when { flex: none; font-size: var(--al-fs-label); color: var(--al-text-2); font-variant-numeric: tabular-nums; }
#view-matter .mx-comms-subject { font-size: var(--al-fs-label); color: var(--al-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
#view-matter .mx-comms-count { flex: none; font-size: var(--al-fs-label); color: var(--al-text-2); font-variant-numeric: tabular-nums; }
#view-matter .mx-comms-none-rows { padding: 12px 16px; }
#view-matter .mx-comms-list-footer { flex: none; display: flex; justify-content: center; align-items: center; gap: 12px; padding: 12px var(--al-pad-card); border-top: 1px solid var(--al-divider); font-size: var(--al-fs-label); color: var(--al-text-2); }
#view-matter .mx-comms-reader-pane { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--al-scroll-thumb) transparent; padding: 0; }
#view-matter .mx-comms-empty { padding: var(--al-pad-card); }
#view-matter .mx-thread-hd { position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: var(--al-pad-card) var(--al-pad-card) 16px; background: var(--al-card); border-bottom: 1px solid var(--al-divider); }
#view-matter .mx-thread-title { min-width: 0; }
#view-matter .mx-thread-title h2 { font-size: var(--al-fs-card); font-weight: 600; overflow-wrap: anywhere; }
#view-matter .mx-thread-title p { margin: 2px 0 0; }
#view-matter .mx-thread-acts { gap: 16px; }
#view-matter .mx-thread-editor:empty, #view-matter .mx-thread-hd [data-mx-msg-feedback]:empty { display: none; }
#view-matter .mx-thread-editor { flex-basis: 100%; }
#view-matter .mx-thread { padding: 16px var(--al-pad-card) 72px; display: flex; flex-direction: column; gap: 16px; }
#view-matter .mx-message { padding: 20px 24px; background: var(--al-paper); border: 0; border-radius: var(--al-r-card); box-shadow: var(--al-shadow-paper); margin: 0; }
#view-matter .mx-message-hd { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
#view-matter .mx-message-av { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--al-selected); color: var(--al-text); font-size: var(--al-fs-label); font-weight: 600; }
#view-matter .mx-message-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#view-matter .mx-message-who b { font-weight: 600; }
#view-matter .mx-message-hd time { flex: none; }
#view-matter .mx-message-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--al-fs-read); line-height: var(--al-lh-read); max-width: 75ch; padding: 0; }
#view-matter .mx-message-attachments { margin-top: 16px; border-top: 1px solid var(--al-divider); padding-top: 4px; }
#view-matter .mx-att-row { display: flex; align-items: center; gap: 12px; min-height: var(--al-row); padding: 6px 0; border-bottom: 1px solid var(--al-divider); }
#view-matter .mx-att-row:last-child { border-bottom: 0; }
#view-matter .mx-att-type { flex: none; width: 36px; height: 36px; border-radius: var(--al-r-control); display: grid; place-items: center; background: var(--al-critical-wash); color: var(--al-critical); font-size: 10px; font-weight: 700; }
#view-matter .mx-att-main { flex: 1; min-width: 0; }
#view-matter .mx-att-main .mx-file { display: inline; }
#view-matter .mx-att-main small { display: block; font-size: var(--al-fs-label); color: var(--al-text-2); }
#view-matter .mx-att-main small.is-filed { color: var(--al-success); }
#view-matter .mx-att-row .al-btn.al-btn-quiet { height: 32px; min-height: 32px; padding: 0 10px; }
#view-matter .mx-thread-foot { display: flex; justify-content: flex-start; }
#view-matter .mx-thread-foot[hidden] { display: none; }
/* the composer in place (P09): paper, the pack's faces and sizes, one primary */
#view-matter #mx-reply-mount .cx-compose.cx-compose-inline { position: static; width: auto; max-width: none; max-height: none; margin: 0; background: var(--al-paper); border: 0; border-radius: var(--al-r-card); box-shadow: var(--al-shadow-paper); font-family: var(--al-font-ui); color: var(--al-text); }
#view-matter #mx-reply-mount .cx-cmp-hd { padding: 20px 24px 8px; border: 0; background: transparent; }
#view-matter #mx-reply-mount .cx-cmp-title { font-family: var(--al-font-ui); font-size: var(--al-fs-card); font-weight: 600; color: var(--al-text); line-height: 1.25; }
#view-matter #mx-reply-mount .cx-draft-chip { display: none; }
#view-matter #mx-reply-mount .cx-ep-toggle { background: var(--al-selected); border-radius: var(--al-r-chip); padding: 3px; }
#view-matter #mx-reply-mount .cx-ep-opt { font-family: var(--al-font-ui); font-size: var(--al-fs-ui); font-weight: 500; color: var(--al-text); padding: 0 14px; height: 30px; border-radius: var(--al-r-chip); background: transparent; border: 0; }
#view-matter #mx-reply-mount .cx-ep-opt.cx-ep-on { background: var(--al-action); color: var(--al-text-inverse); font-weight: 600; }
#view-matter #mx-reply-mount .cx-cmp-identity { background: transparent; padding: 0 24px 8px; gap: 0; }
#view-matter #mx-reply-mount .cx-idw-row { min-height: 40px; gap: 12px; border-bottom: 1px solid var(--al-divider); }
#view-matter #mx-reply-mount .cx-idw-lbl { font-family: var(--al-font-ui); font-size: var(--al-fs-ui); letter-spacing: 0; color: var(--al-text-2); width: 64px; }
#view-matter #mx-reply-mount .cx-idw-name, #view-matter #mx-reply-mount .cx-idw-inp { font-family: var(--al-font-ui); font-size: var(--al-fs-ui); color: var(--al-text); }
#view-matter #mx-reply-mount .cx-idw-inp { background: transparent; border: 0; box-shadow: none; min-height: 32px; padding: 0; }
#view-matter #mx-reply-mount .cx-idw-inp:focus-visible { box-shadow: var(--al-focus); border-radius: var(--al-r-chip); }
#view-matter #mx-reply-mount .cx-idw-identity, #view-matter #mx-reply-mount .cx-idw-hint { font-family: var(--al-font-ui); font-style: normal; font-size: var(--al-fs-ui); color: var(--al-text-2); }
#view-matter #mx-reply-mount .cx-idw-av { width: 24px; height: 24px; font-size: 11px; background: var(--al-selected); color: var(--al-text); }
#view-matter #mx-reply-mount .cx-idw-ccbcc { font-family: var(--al-font-ui); font-size: var(--al-fs-ui); color: var(--al-action); font-weight: 500; }
#view-matter #mx-reply-mount .cx-matter-chip { font-family: var(--al-font-id); font-size: var(--al-fs-label); background: var(--al-selected); color: var(--al-text); border-radius: var(--al-r-chip); padding: 2px 10px; }
#view-matter #mx-reply-mount .cx-idw-seam { display: none; }
#view-matter #mx-reply-mount .cx-cmp-body-wrap { padding: 0 24px; }
#view-matter #mx-reply-mount .cx-cmp-body { font-family: var(--al-font-ui); font-size: var(--al-fs-read); line-height: var(--al-lh-read); color: var(--al-text); min-height: 120px; max-width: 75ch; padding: 16px 0; }
#view-matter #mx-reply-mount .cx-cmp-body-pane { max-height: none; }
#view-matter #mx-reply-mount .cx-cmp-toolbar { padding: 8px 24px; gap: 4px 16px; flex-wrap: wrap; border-top: 1px solid var(--al-divider); }
#view-matter #mx-reply-mount .cx-cmp-toolbar .cx-aa-btn, #view-matter #mx-reply-mount .cx-cmp-toolbar .cx-tool-icon, #view-matter #mx-reply-mount .cx-cmp-toolbar .cx-ask-chip, #view-matter #mx-reply-mount .cx-cmp-toolbar .cx-reg-chip, #view-matter #mx-reply-mount .mx-tool { height: 32px; padding: 0 6px; border: 0; background: transparent; border-radius: var(--al-r-control); color: var(--al-action); font-family: var(--al-font-ui); font-size: var(--al-fs-ui); font-weight: 500; box-shadow: none; }
#view-matter #mx-reply-mount .cx-cmp-toolbar :is(.cx-aa-btn, .cx-tool-icon, .cx-ask-chip, .cx-reg-chip, .mx-tool):hover { background: var(--al-selected); }
#view-matter #mx-reply-mount .cx-cmp-toolbar svg { stroke: currentColor; }
#view-matter #mx-reply-mount .cx-cmp-toolbar .cx-tool-sep { width: 1px; height: 20px; background: var(--al-divider); margin: 0 4px; }
#view-matter #mx-reply-mount .cx-ask-chip, #view-matter #mx-reply-mount .cx-reg-chip { display: none; }
#view-matter #mx-reply-mount .cx-send-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px 20px; background: transparent; border-top: 1px solid var(--al-divider); }
#view-matter #mx-reply-mount .cx-foot-pledge { font-family: var(--al-font-ui); font-style: normal; font-size: var(--al-fs-label); color: var(--al-text-2); }
#view-matter #mx-reply-mount .cx-foot-dot, #view-matter #mx-reply-mount .cx-foot-steps { display: none; }
#view-matter #mx-reply-mount .cx-foot-choke { font-family: var(--al-font-ui); font-size: var(--al-fs-label); color: var(--al-text-2); letter-spacing: 0; text-transform: none; }
#view-matter #mx-reply-mount .cx-send-btn { height: var(--al-control-h); padding: 0 16px; border-radius: var(--al-r-control); background: var(--al-action); color: var(--al-text-inverse); font-family: var(--al-font-ui); font-size: var(--al-fs-ui); font-weight: 600; }
#view-matter #mx-reply-mount .cx-send-btn:hover { background: var(--al-action-hover); }
#view-matter #mx-reply-mount .cx-icon-btn { width: 32px; height: 32px; border-radius: var(--al-r-control); }
#view-matter #mx-reply-mount .cx-icon-btn:hover { background: var(--al-selected); }
/* the side panel (B7) */
#view-matter .mx-side { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw); z-index: var(--al-z-layer); background: var(--al-raised); box-shadow: var(--al-shadow-menu); transform: translateX(100%); transition: transform var(--al-t-panel) var(--al-ease); display: flex; flex-direction: column; }
#view-matter .mx-side.is-open { transform: none; }
#view-matter .mx-side[hidden] { display: none; }
#view-matter .mx-side-hd { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--al-sticky-h); padding: 0 var(--al-pad-card); border-bottom: 1px solid var(--al-divider); }
#view-matter .mx-side-hd h2 { font-size: var(--al-fs-card); font-weight: 600; }
#view-matter .mx-side-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px var(--al-pad-card) 72px; scrollbar-width: thin; scrollbar-color: var(--al-scroll-thumb) transparent; }
#view-matter .mx-side .mx-comms-panel-section { padding: 12px 0; border-bottom: 1px solid var(--al-divider); }
#view-matter .mx-side .mx-comms-panel-invite { padding: 12px 0; }
@media (max-width: 1100px) { #view-matter .mx-comms-layout { grid-template-columns: 1fr; } }

/* ── Communications polish after the live look ── */
#view-matter .mx-comms-list-pane form.mx-comms-search { flex: none; display: block; padding: 0 var(--al-pad-card) 12px; }
#view-matter .mx-comms-list-pane form.mx-comms-search input { width: 100%; min-height: var(--al-control-h); }
#view-matter .mx-comms-reader-pane .mx-thread { max-width: none; margin: 0; padding: 16px var(--al-pad-card) 72px; }
#view-matter #mx-reply-mount .cx-cmp-body-pane { border: 0; box-shadow: inset 0 0 0 1px var(--al-line-control); border-radius: var(--al-r-control); padding: 4px 16px; margin: 12px 0 0; }
#view-matter #mx-reply-mount .cx-cmp-body-pane:focus-within { box-shadow: var(--al-focus); }
#view-matter #mx-reply-mount .cx-cmp-body:focus, #view-matter #mx-reply-mount .cx-cmp-body:focus-visible { outline: none; box-shadow: none; }
#view-matter #mx-reply-mount .cx-cmp-body-pane.is-quote-folded [data-mx-quoted] { max-height: 72px; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%); mask-image: linear-gradient(to bottom, black 40%, transparent 100%); }
#view-matter #mx-reply-mount [data-mx-quoted] { border-left-color: var(--al-divider) !important; color: var(--al-text-2) !important; font-size: var(--al-fs-ui) !important; }
#view-matter #mx-reply-mount .mx-quote-toggle { margin: 8px 0 0; font-size: var(--al-fs-label); }
#view-matter #mx-reply-mount .cx-cmp-body-wrap { flex-direction: column; }
#view-matter #mx-reply-mount .cx-sig-chip { background: var(--al-card); border: 0; box-shadow: inset 0 0 0 1px var(--al-line-control); border-radius: var(--al-r-control); font-family: var(--al-font-ui); font-size: var(--al-fs-label); color: var(--al-text-2); }
#view-matter #mx-reply-mount .cx-sig-chip-txt i { font-style: normal; color: var(--al-text-2); }
#view-matter #mx-reply-mount .cx-sig-chip-txt b { color: var(--al-text); }
#view-matter #mx-reply-mount .cx-sig-chip-seal { display: none; }
#view-matter #mx-reply-mount .mx-tool .alf-icon { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; vertical-align: -2px; }
#view-matter #mx-reply-mount .cx-cmp-toolbar .alfred-dictate-glyph { display: none; }
/* CD 71: Held now, Received and Paid out on one baseline */
#view-matter .fin-head { display: grid; grid-template-columns: auto auto auto 1fr; grid-template-rows: auto auto; grid-auto-flow: column; column-gap: 32px; row-gap: 2px; align-items: baseline; }
#view-matter .fin-held, #view-matter .fin-side { display: contents; }
#view-matter .fin-head .fin-label { grid-row: 1; }
#view-matter .fin-head .fin-big, #view-matter .fin-head .fin-side b { grid-row: 2; }
#view-matter .fin-head .fin-record { grid-row: 1 / 3; grid-column: 4; justify-self: end; align-self: center; margin: 0; }
#view-matter .fin-head.is-small { column-gap: 20px; }
#view-matter .fin-head.is-small .fin-big { font-size: 28px; }
#view-matter .dr2-note p .cw2-muted { color: inherit; }
/* a flex item with a z-index paints above every layer; the header is a flex item of #view-matter, so it must have none (found 3 Oct: the Matter actions button sat on top of the Advice side panel) */
#view-matter #mx-head { z-index: auto; }
#view-matter #mx-actions-panel .al-action.is-danger { color: var(--al-critical); }
#view-matter #mx-actions-panel .al-action.is-danger:hover { background: var(--al-critical-wash); }
#view-matter #mx-actions-panel .al-menu-divider { background: var(--al-line-control); opacity: .5; }
#view-matter #mx-reply-mount .cx-attach-wrap { margin-right: 12px; }
#view-matter .mx-side #mx-ask-form .al-btn-strong { background: var(--al-card); color: var(--al-action); box-shadow: inset 0 0 0 1px var(--al-line-control); justify-self: start; width: auto; }
#view-matter .mx-side #mx-ask-form { display: grid; gap: 8px; justify-items: start; }
#view-matter .mx-side #mx-ask-form textarea { width: 100%; }
/* RULES §5: a button may never sit under the Alfred pill. The tabs whose cards fill the window end 72px above the bottom edge. */
#view-matter #mx-tabbody[data-workspace="documentos"], #view-matter #mx-tabbody[data-workspace="cronologia"], #view-matter #mx-tabbody[data-workspace="redaccion"], #view-matter #mx-tabbody[data-workspace="comunicaciones"] { padding-bottom: 72px; }
body.al-alfred-working #view-matter .dr2-a { animation: al-breathe var(--al-t-breath) var(--al-ease) infinite; }
@media (prefers-reduced-motion: reduce) { body.al-alfred-working #view-matter .dr2-a { animation: none; } }

/* P09: the reply box is compact enough to sit whole under the last message at 1440x900 */
#view-matter #mx-reply-mount .cx-cmp-hd { padding: 16px 24px 4px; }
#view-matter #mx-reply-mount .cx-idw-row { min-height: 36px; }
#view-matter #mx-reply-mount .cx-cmp-identity { padding-bottom: 4px; }
#view-matter #mx-reply-mount .cx-cmp-body { min-height: 96px; padding: 12px 0; }
#view-matter #mx-reply-mount .cx-cmp-body-pane { margin-top: 8px; }
#view-matter #mx-reply-mount .cx-cmp-toolbar { padding: 6px 24px; }
#view-matter #mx-reply-mount .cx-send-foot { padding: 10px 24px 16px; }
#view-matter #mx-reply-mount .cx-sig-block { margin-top: 6px; }
#view-matter #mx-reply-mount .mx-quote-toggle { margin-top: 4px; }
/* while a reply is open the thread head scrolls with the thread, so the whole reply box can be in view (P08 at 1366) */
#view-matter .mx-comms-reader-pane.has-reply .mx-thread-hd { position: static; }
@media (max-height: 800px) { #view-matter #mx-reply-mount .cx-cmp-body { min-height: 80px; } #view-matter #mx-reply-mount .cx-idw-row { min-height: 32px; } }

#view-matter .mx-comms-layout { grid-template-columns: minmax(340px, 26%) minmax(0, 1fr); }
#view-matter #mx-reply-mount .cx-cmp-hd > div:first-child { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#view-matter .mx-matter-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: var(--al-r-chip); background: var(--al-selected); color: var(--al-text); font-size: var(--al-fs-label); }
#view-matter .mx-matter-chip .mx-mono { font-size: var(--al-fs-label); }
#view-matter #mx-reply-mount .cx-cmp-body-pane.is-quote-folded [data-mx-quoted] { display: none; }
#view-matter #mx-reply-mount [hidden] { display: none !important; }
#view-matter .dr-options .al-field-hint { display: none; }
#view-matter .dr-foot { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
#view-matter .dr-chips { width: auto; flex: 1 1 auto; }
#view-matter .dr-options { flex: 0 1 auto; }

/* ── Round 2 (CD, 3 Oct 2026) ── */
/* MA3-D3 (CD, 17 Oct): the side lists are open lists on the page, not a boxed card beside the content card; the selected plate is the chip tint */
#view-matter .mx-subnav, #view-matter .mx-docs-sidebar { background: transparent; border: 0; box-shadow: none; border-radius: 0; padding: 0; }
#view-matter .mx-docs-sidebar .al-eyebrow { padding: 8px 12px 2px; margin: 0; font-size: var(--v3-fs-label); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--al-text-2); } /* MA3-W4: the pack's label style */
#view-matter .mx-docs-sidebar-sep { margin: 8px 4px; }
#view-matter .mx-docs-missing { margin: 8px 4px 0; padding: 12px 8px 4px; }
/* P1-8 · the tab strip is a white band on every tab, Summary too */
#view-matter #mx-tabs { background: var(--al-card); border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); margin: 16px var(--mx-gutter) 0; padding: 6px 8px; }
#view-matter:has(#mx-head[data-mode="line"]) #mx-tabs { margin: 0; border-radius: 0; box-shadow: none; padding: 4px var(--mx-gutter) 8px; border-bottom: 1px solid var(--al-divider); }
/* P1-1 · Post-sale: the card fills the tab, the form scrolls inside it, the save bar is pinned to the card's bottom edge */
#view-matter #mx-tabbody[data-workspace="postventa"] { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 72px; }
#view-matter #mx-tabbody[data-workspace="postventa"] .mx-subnav-frame { flex: 1; min-height: 0; align-items: start; }
#view-matter #mx-tabbody[data-workspace="postventa"] .mx-subnav-body { display: flex; flex-direction: column; min-height: 0; max-height: 100%; }
#view-matter #mx-ps-section-body { display: flex; flex-direction: column; min-height: 0; max-height: 100%; }
#view-matter #mx-ps-section-body form.mx-ps-grid { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--al-scroll-thumb) transparent; }
#view-matter .mx-ps-foot { position: static; flex: none; }
#view-matter #mx-ps-section-body > .mx-ps-hd { flex: none; }
/* P1-5 · the quoted-message toggle keeps 8px from the editor */
#view-matter #mx-reply-mount .mx-quote-toggle { margin: 8px 0 0; }
/* P1-6 · Advice docked in the thread (B7a) */
#view-matter .mx-advice { border-top: 1px solid var(--al-line-control); margin: 8px 0 0; padding: 12px 0 0; }
#view-matter .mx-advice-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
#view-matter .mx-advice-hd h3 { font-size: 16px; font-weight: 600; }
#view-matter .mx-advice-body { padding: 4px 0 8px; }
#view-matter .mx-advice .mx-comms-panel-section { padding: 12px 0; border-bottom: 1px solid var(--al-divider); }
#view-matter .mx-advice .mx-comms-panel-invite { padding: 8px 0 12px; }
#view-matter .mx-advice #mx-ask-form { display: grid; gap: 8px; justify-items: start; }
#view-matter .mx-advice #mx-ask-form textarea { width: 100%; resize: none; }
#view-matter .mx-advice #mx-ask-form .al-btn-strong { background: var(--al-card); color: var(--al-action); box-shadow: inset 0 0 0 1px var(--al-line-control); width: auto; }
#view-matter .mx-side { display: none !important; }
/* P2-9 · the two facts inside the Progress card */
#view-matter .mx-progress-facts { display: flex; gap: 32px; align-items: flex-start; margin: 0 0 20px; padding: 0 0 16px; border-bottom: 1px solid var(--al-divider); }
#view-matter .mx-progress-facts .mx-field { flex: 1; padding: 0; }
#view-matter .mx-progress-facts .mx-field + .mx-field { border-left: 1px solid var(--al-divider); padding-left: 32px; }
#view-matter .mx-progress-facts .mx-waiting-details > summary, #view-matter .mx-progress-facts .mx-waiting-details > .mx-waiting-open { margin-top: 8px; }
/* P2-10 · step names wrap; never truncated */
#view-matter .mx-step-name { display: block; -webkit-line-clamp: unset; overflow: visible; }
/* P2-12 · the extension in quiet text */
#view-matter .mx-ext { color: var(--al-text-2); font-size: inherit; margin-left: 0; }
/* P2-13 · the rail's document list */
#view-matter .dr-list { margin: 2px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; color: var(--al-text-2); font-size: var(--al-fs-label); }
#view-matter .dr-list .mx-file { display: inline; }
/* P2-15 · the check icon on the chips, not a typed character */
#view-matter .dr-toggle span::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3.2L13 5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3.2L13 5'/%3E%3C/svg%3E") center / contain no-repeat; }
#view-matter .dr-toggle input:not(:checked) + span::before { display: none; }
/* P2-16 · "Language", no dot */
#view-matter .dr-options .al-field > label::after { content: ""; }
/* P2-17 · every row has its mark */
#view-matter .tl-mark.is-blank { background: var(--al-selected); }
/* P2-21 · one size in a deadline row */
#view-matter #mx-legal-body .al-flow-title, #view-matter #mx-legal-body .al-meta, #view-matter #mx-legal-body .al-flow-row { font-size: var(--al-fs-ui); }
/* P2-23 · a labelled menu trigger is outlined like every other trigger */
#view-matter .mx-more-btn:has(> span) { height: var(--al-control-h); padding: 0 14px; box-shadow: inset 0 0 0 1px var(--al-line-control); background: var(--al-card); }
/* P2-24 · 8px between the property memory buttons */
#view-matter [data-property-memory] .al-btn { margin: 8px 8px 0 0; }
/* P2-25 · one surface: the facts table has no shadow of its own */
#view-matter #mx-prop-body .al-table { box-shadow: none; border-radius: 0; background: transparent; }
/* P2-26 · a disabled text button looks disabled */
#view-matter .mx-text-button:disabled { color: var(--al-text-2); opacity: .7; cursor: default; text-decoration: none; }
#view-matter .mx-text-button:disabled:hover { text-decoration: none; }
/* P3-33 · Draft stays at the right end of the settings row */
#view-matter .dr-foot .al-btn-strong { margin-left: auto; }
#view-matter .mx-docs-row > span:first-child { white-space: normal; overflow: visible; text-overflow: clip; }
#view-matter .mx-docs-row .mx-file { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Spanish labels are ~20% longer: the Summary tab band keeps 4px side padding so all twelve tabs fit at 1366 (B15: never wrap) */
#view-matter #mx-tabs { padding: 6px 4px; }
#view-matter:has(#mx-head[data-mode="line"]) #mx-tabs { padding: 4px var(--mx-gutter) 8px; }
#view-matter .mx-docs-row .mx-file { text-align: left; }

/* B16: the 1px divider under the tab strip shows only while content scrolls beneath it */
#view-matter #mx-tabs.is-scrolled-under { box-shadow: 0 1px 0 var(--al-divider); }
/* M1: header + tab strip are one opaque band; a card scrolled up is clipped 8px below the tabs, never against them or in a gap */
#view-matter #mx-tabs { position: relative; z-index: 2; }
#view-matter:has(#mx-head[data-mode="full"]) #mx-tabs { margin-bottom: 8px; }
#view-matter:has(#mx-head[data-mode="full"]) #mx-tabbody { padding-top: 16px; }
/* S-26 (audit, 8 Oct 2026): one layer above the tab strip, so the open "Acciones del expediente" menu is never painted under the tabs */
#view-matter #mx-head[data-mode="line"] { background: var(--al-card); position: relative; z-index: 3; }

/* People: the table fits its column at every width; long cells wrap instead of widening it past the 24px gap */
#view-matter #mx-personas-body .al-table { table-layout: fixed; }
#view-matter #mx-personas-body .al-table td, #view-matter #mx-personas-body .al-table th { white-space: normal; overflow-wrap: normal; word-break: normal; max-width: none; }
#view-matter #mx-personas-body .al-table td:nth-child(3) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#view-matter #mx-personas-body .al-table :is(td,th):last-child { width: 48px; white-space: nowrap; }

/* M2: the reader's body keeps its line breaks, 72ch; the quoted history and the signature/notice fold behind quiet buttons */
#view-matter .mx-message-body { max-width: 72ch; }
#view-matter .mx-fold-btn { display: inline-flex; align-items: center; height: var(--al-chip-h); padding: 0 12px; margin: 8px 0 0; border: 0; border-radius: var(--al-r-control); background: transparent; color: var(--al-action); font: inherit; font-size: var(--al-fs-label); font-weight: 600; cursor: pointer; }
#view-matter .mx-fold-btn:hover { box-shadow: inset 0 0 0 1px var(--al-divider); }
#view-matter .mx-fold { margin-top: 8px; color: var(--al-text-2); }
#view-matter .mx-fold-quoted { border-left: 2px solid var(--al-divider); padding-left: 16px; }

/* M3 (B9): the Post-sale form is the scroller above the save bar: a 56px fade at its foot (a field cut by the edge is nearly gone, not sliced), 24px of space after the last field */
#view-matter #mx-ps-section-body form.mx-ps-grid { padding-bottom: var(--al-pad-card); }
#view-matter #mx-ps-section-body form.mx-ps-grid.is-overflowing { -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 56px), transparent 100%); mask-image: linear-gradient(to bottom, black calc(100% - 56px), transparent 100%); }

/* M9 (B1): "Historical property sources" opens with the card title, like every other card */
#view-matter [data-property-memory] > h3 { font-size: var(--al-fs-card); font-weight: 600; line-height: 1.25; margin: 0 0 var(--al-gap-title); }

/* M11: one hairline, between the two halves, full height; no rule under them */
#view-matter .mx-progress-facts { align-items: stretch; border-bottom: 0; padding-bottom: 0; margin-bottom: 16px; }

/* M14: a cut list always fades (C3): the template list and the Earlier-sessions column */
#view-matter .dr-choose .dr-body.is-overflowing, #view-matter .dr-side.is-overflowing { -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 24px), transparent 100%); mask-image: linear-gradient(to bottom, black calc(100% - 24px), transparent 100%); }

/* M15: People column widths: Name 26 / Role 16 / Email 30 / Phone 22 / menu 6 */
#view-matter #mx-personas-body .al-table th:nth-child(1) { width: 26%; }
#view-matter #mx-personas-body .al-table th:nth-child(2) { width: 16%; }
#view-matter #mx-personas-body .al-table th:nth-child(3) { width: 30%; }
#view-matter #mx-personas-body .al-table th:nth-child(4) { width: 22%; }
#view-matter #mx-personas-body .al-table th:last-child { width: 6%; min-width: 48px; }
#view-matter #mx-personas-body .al-table td:nth-child(4) { white-space: nowrap; }

/* M16: Recorded dates keeps its actions in the card's top-right (like Tareas); legal-deadline rows are hairlines, not shadowed plates */
#view-matter .mx-dates-hd { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: start; }
#view-matter .mx-dates-hd > h2, #view-matter .mx-dates-hd > p { grid-column: 1; }
#view-matter .mx-dates-hd > .mx-dates-actions { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; gap: 8px; margin: 0; }
#view-matter .al-flow.is-compact .al-flow-row { margin-top: 0; padding: 10px 0; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--al-divider); }
#view-matter .al-flow.is-compact .al-flow-row:last-child { border-bottom: 0; }
#view-matter .al-flow.is-compact .al-flow-title { font-size: var(--al-fs-ui); color: var(--al-text); }

/* M17: the hairline before "Eliminar expediente…" is the same one the list's row menu draws */
#view-matter #mx-actions-panel .al-menu-divider { display: block; flex: none; height: 1px; margin: 6px 4px; background: var(--al-divider); opacity: 1; }

/* M19 (and the field recipe): no grey box round the date icon */
#view-matter .fe-date-button { background: transparent; box-shadow: none; }
#view-matter .fe-date-button:hover { background: var(--al-selected); }

/* M11 (second pass): the generic "field after field" top rule must not reach the Progress facts — the only line is the vertical one */
#view-matter .mx-progress-facts .mx-field + .mx-field { border-top: 0; padding-top: 0; }
/* M12: the Email card keeps its two buttons on one row beside the title; the not-yet-built one is a quiet button */
#view-matter .mx-card-hd .al-actions { flex-wrap: nowrap; gap: 4px; }
#view-matter .al-btn-quiet[disabled] { opacity: .45; }

/* M7: the Source column of the facts table ends 136px before the right edge, so the Alfred pill never rests on it at any scroll position */
#view-matter .mx-fact-table th:last-child, #view-matter .mx-fact-table td:last-child { padding-right: 136px; }
#view-matter #mx-actions-panel .al-menu-divider { align-self: stretch; width: auto; }
/* M14 (second pass): the template list's fade is tall enough to be seen when the sixth row sits just below the cut */
#view-matter .dr-choose .dr-body.is-overflowing { -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 48px), transparent 100%); mask-image: linear-gradient(to bottom, black calc(100% - 48px), transparent 100%); }
#view-matter .mx-fold-btn { padding: 0 12px; margin-left: -12px; }
#view-matter .mx-fold-btn { display: flex; width: max-content; }

/* R4-2: Client account on Summary — "Held now" large, Received and Paid out as one line beneath it; the card's lower right stays empty where the pill rests */
#view-matter .fin-head.is-small { display: block; margin-bottom: 12px; }
#view-matter .fin-head.is-small .fin-held { display: flex; flex-direction: column; gap: 2px; }
#view-matter .fin-head.is-small .fin-line { margin: 6px 0 0; font-size: var(--al-fs-ui); color: var(--al-text-2); }
#view-matter .fin-head.is-small .fin-line b { color: var(--al-text); font-weight: 600; }
/* R4-3: the People menu column keeps the card's 24px inner padding */
#view-matter #mx-personas-body .al-table :is(td,th):last-child { padding-right: var(--al-pad-card); }
#view-matter #mx-personas-body .al-table th:last-child { width: 72px; min-width: 72px; }
/* R4-4 */
#view-matter .mx-soon { margin-left: 4px; white-space: nowrap; }
/* G-PILL (Matter r5 P3): at laptop height the Progress card gives the money card room. The two facts read label-beside-value on one line, the card head is tighter,
   so the Client account's first lines clear the bottom edge and the Alfred pill (target: Received / Paid out at least 16 px above the window's edge). */
@media (min-width: 1100px) and (max-height: 900px) {
  #view-matter .mx-progress .mx-card-hd { min-height: 52px; padding-top: 12px; padding-bottom: 8px; }
  #view-matter .mx-progress-facts { margin-bottom: 12px; gap: 24px; }
  #view-matter .mx-progress-facts .mx-field { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 0; }
  #view-matter .mx-progress-facts .mx-field + .mx-field { padding-left: 24px; }
  #view-matter .mx-progress-facts .mx-field-label { margin: 0; }
  #view-matter .mx-progress-facts .mx-field > .al-meta { flex-basis: 100%; }
}

/* GB-32/M19: the post-sale form's sections sit in two columns, each under the shorter one */
#view-matter .mx-ps-cols { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; align-items: start; }
#view-matter .mx-ps-col { min-width: 0; }
@media (max-width: 1050px) { #view-matter .mx-ps-cols { grid-template-columns: 1fr; } }

/* P-24 (audit, 8 Oct 2026): an actions row under its sentence keeps the C6 gap (12 px); "Firmar KYC" sat 4 px under its line. */
#view-matter p + .al-actions { margin-top: 12px; }

/* S-59: the hand-off labels are real <label>s now, tied to their fields; they keep the block layout the div had. */
#view-matter label.mx-ps-field-label { display: block; }

.mx-glass { display: contents; }


/* ── Resumen, brand pack v3.1 (recipe 01): layout only; every look is a shared part ───────────────────────────────────── */
#view-matter .mx-head-acts { display: flex; align-items: center; gap: var(--v3-s-2); margin-left: auto; flex: none; }
#view-matter .mx-head-acts .mx-actions-menu { margin: 0; }
#view-matter .mx-sum { display: flex; flex-direction: column; gap: var(--al-gap-card); }
#view-matter .mx-sum-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: var(--al-gap-card); align-items: start; grid-template-areas: "ws acct" "coming acct" "recent acct"; }
#view-matter .mx-sum-grid.is-solo { grid-template-columns: minmax(0, 1fr); grid-template-areas: "ws" "coming" "recent"; }
#view-matter .mx-sum-ws { grid-area: ws; } #view-matter .mx-sum-coming { grid-area: coming; } #view-matter .mx-sum-acct { grid-area: acct; } #view-matter .mx-sum-recent { grid-area: recent; }
#view-matter .mx-sum-ws > *, #view-matter .mx-sum-coming > *, #view-matter .mx-sum-acct > *, #view-matter .mx-sum-recent > * { min-width: 0; }
@media (min-width: 1440px) { #view-matter .mx-sum-grid:not(.is-solo) { grid-template-areas: "ws acct" "coming acct" "recent recent"; } }
#view-matter .mx-sum-conflict { flex: 1 1 100%; }
#view-matter .pt-b2-foot .mx-progress-facts { display: flex; flex-wrap: wrap; gap: var(--v3-s-3) var(--v3-s-6); }
#view-matter .pt-b2-foot .mx-field { display: flex; flex-direction: column; gap: 4px; }
#view-matter #mx-completion-entry .pt-card-hd { align-items: center; }
#view-matter #mx-head[data-mode="line"] .mx-head-acts { order: 9; margin-left: auto; }
#view-matter #mx-head[data-mode="line"] .mx-head-acts .alf-button--primary { display: none; }

#view-matter .mx-aml-stages { margin-bottom: var(--al-gap-card); }
#view-matter .mx-ps-track { margin-bottom: var(--al-gap-card); }
#view-matter .mx-comms-empty-link { display: flex; justify-content: center; }
#view-matter .tl-go { display: inline-grid; place-items: center; align-self: center; }
#view-matter .mx-more-menu [data-danger] { color: var(--al-critical); border-top: 1px solid var(--al-divider); margin-top: 4px; padding-top: 8px; }
#view-matter .mx-aml-critical { display: flex; flex-direction: column; gap: var(--v3-s-2); align-items: flex-start; }

/* MA-19 (CD audit v1.1): the header buttons stay on the title row; a long matter name gives way with an ellipsis, the chips and the menu never wrap below it */
#view-matter #mx-head[data-mode="full"] .mx-head-top { flex-wrap: nowrap; }
#view-matter #mx-head[data-mode="full"] .mx-head-top .al-title { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
#view-matter #mx-head[data-mode="full"] .mx-head-top > :not(.al-title) { flex: none; }

/* MA-20 (CD audit v1.1): a task row reads checkbox, date block, title, person; Edit and Cancel task sit in the row's menu, Cancel last and red */
#view-matter .pt-wrow-lead { flex: none; display: flex; align-items: center; }
#view-matter .mx-task-tick { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; cursor: pointer; }
#view-matter .mx-more-menu [data-task-cancel] { color: var(--al-critical); }

/* MA-6 (CD audit v1.1): Held now on the left with Received and Paid out quiet beside it; an empty account is one line with its act */
#view-matter .mx-acct-figs { margin: 4px 0 12px; }
#view-matter .mx-acct-none { margin: 4px 0 0; color: var(--al-text-2); font-size: var(--al-fs-ui); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }

/* eyes round e1: one card-title size (MA-8), the money labels on one line (MA-23), text buttons keep a 40 px hit area and their own line */
#view-matter .mx-dates-section h3, #view-matter .mx-dates-section > h2 { font-size: var(--al-fs-card); font-weight: 600; letter-spacing: 0; }
#view-matter .pt-fig-row { align-items: flex-start; }
#view-matter .mx-text-button { padding-top: 11px; padding-bottom: 11px; margin-top: -11px; margin-bottom: -11px; }
#view-matter .mx-acct-open { margin: 16px 0 8px; }

/* MA-18 (CD audit v1.1): the Draft button keeps its place at the right of the foot; the toggles and the language wrap inside their own block, never under the button */
#view-matter .dr-foot { flex-wrap: nowrap; gap: 16px; align-items: center; }
#view-matter .dr-chips { flex: 1 1 0; min-width: 0; flex-wrap: wrap; }
#view-matter .dr-options { flex: none; }
#view-matter .dr-toggle { flex: none; }
#view-matter .dr-foot > .al-btn { flex: none; }

/* MA-8: every card title on the Matter is one size, the dates card included */
#view-matter .mx-dates-hd h2, #view-matter #mx-dates-register > h2 { font-size: var(--al-fs-card); font-weight: 600; letter-spacing: 0; margin: 0; }
#view-matter .mx-text-button { padding-top: 12px; padding-bottom: 12px; margin-top: -12px; margin-bottom: -12px; }

/* MA-27 (CD r2a): no journey = one line above the chronology; the chronology takes the full width */
#view-matter .mx-split.is-full { grid-template-columns: minmax(0, 1fr); }
#view-matter #mx-tabbody .mx-card.mx-journey-line { display: flex; flex-direction: row; justify-content: flex-start; text-align: left; min-height: 0; height: auto; align-items: center; gap: var(--v3-s-4, 16px); padding: var(--v3-s-3, 12px) var(--v3-s-5, 24px); margin-bottom: var(--al-gap-card); flex: none; }
#view-matter #mx-tabbody .mx-journey-line .al-absent { margin: 0; padding: 0; line-height: 1.4; }

/* MA-32 (CD r2a, ruling a): Financial › Client account is two cards, the ledger and the recorded bank transfers */
#view-matter #mx-fin-body.is-cards { background: none; border: 0; box-shadow: none; padding: 0; height: auto !important; display: flex; flex-direction: column; gap: var(--al-gap-card); }
#view-matter #mx-fin-body.is-cards > .mx-card { margin: 0; }
#view-matter .mx-fin-acts { display: flex; align-items: center; gap: var(--v3-s-2, 8px); }

/* MA3-08: on a short window the shared material rule (.al-main grows to its content, never shrinks) pushed the Drafting foot below the window with nothing to scroll; the Matter fills the window and its own panes scroll */
body.matter-frame.al .main-wrap > .al-main { flex: 1 1 0; min-height: 0; }
/* MA3-D1 (CD, 17 Oct): an empty journey is a third column beside 'waiting on' and 'days without contact', not two stacked blocks in a half-blank card */
#view-matter .mx-progress-facts { display: flex; gap: 32px; align-items: flex-start; }
#view-matter .mx-progress-facts > .mx-field { flex: 1; min-width: 0; }
#view-matter .mx-progress-facts > .mx-field + .mx-field { border-left: 1px solid var(--al-divider); padding-left: 32px; }
#view-matter .mx-progress-facts > .mx-field > .alf-button { margin-top: 8px; align-self: flex-start; }
/* MA3-D4 (CD, 17 Oct): side-by-side cards end on one line; a card still fits its own content (A6), the shorter peer is stretched to its neighbour */
#view-matter .mx-split, #view-matter .mx-personas-frame { align-items: stretch; }
#view-matter .mx-stack > .mx-card:last-child { flex: 1; }
#view-matter .mx-personas-main { display: flex; flex-direction: column; }
#view-matter .mx-personas-main > #mx-personas-body { flex: 1; display: flex; flex-direction: column; }
#view-matter .mx-personas-main > #mx-personas-body > .mx-card, #view-matter .mx-personas-main > #mx-personas-body > .pt-card { flex: 1; }
/* MA3-10: inside a folder the Folder column folds; the date is left-aligned like every other date */
#view-matter .mx-docs-list.is-in-folder .mx-docs-list-hd, #view-matter .mx-docs-list.is-in-folder .mx-docs-row { grid-template-columns: minmax(0, 1fr) 90px; }
#view-matter .mx-docs-list.is-in-folder .mx-docs-list-hd > :nth-child(2), #view-matter .mx-docs-list.is-in-folder .mx-docs-row > span:nth-child(2) { display: none; }
/* CX1-MA-06 (RULES hit size: at least 40 x 40 for every control): the chip stays the pack's 30 px to the eye (B14); its hit area is 40 px tall */
#view-matter .alf-filter { position: relative; }
#view-matter .alf-filter::after { content: ""; position: absolute; left: 0; right: 0; top: -5px; bottom: -5px; }
