/* Native case-study diagrams. Editor styles are scoped to the new blocks only. */
#project-overlay .po-block--ux { max-width: none; padding: 0 24px; }
.mp-block--ux { min-width: 0; margin: 0 20px 32px; }
.uxb-block { min-width: 0; margin: 0 auto; color: var(--uxb-ink); font-size: var(--uxb-font-size); line-height: 1.4; letter-spacing: 0; }
.uxb-block *, .uxe * { box-sizing: border-box; letter-spacing: 0; }
.uxb-block > h2 { margin: 0 0 24px; font-size: 28px; line-height: 1.25; color: inherit; text-align: var(--uxb-align); overflow-wrap: anywhere; }
.uxb-block .uxb-caption { margin: 14px 0 0; font: 400 13px/1.5 'Space Grotesk', sans-serif; text-align: center; color: inherit; overflow-wrap: anywhere; }
.uxb-viewport { width: 100%; overflow: auto; background: var(--uxb-bg); border: 1px solid var(--uxb-border); border-radius: var(--uxb-radius); scrollbar-width: thin; }
.uxb-viewport:focus-visible { outline: 2px solid var(--uxb-accent); outline-offset: 3px; }
.uxb-plane { position: relative; margin: 0 auto; isolation: isolate; }
.uxb-edge { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.uxb-edge-label { font: inherit; color: var(--uxb-ink); background: var(--uxb-bg); text-align: center; overflow-wrap: anywhere; }
.uxb-edge-hit { stroke: transparent; stroke-width: 16px; fill: none; }
.uxb-node { position: absolute; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 18px; border: 1.5px solid; border-radius: var(--uxb-radius); text-align: var(--uxb-align); overflow-wrap: anywhere; }
.uxb-node > div { min-width: 0; flex: 1; }
.uxb-node strong { display: block; font-size: inherit; font-weight: 600; }
.uxb-node p { margin: 8px 0 0; font-size: inherit; line-height: 1.35; white-space: pre-wrap; }
.uxb-node small { display: block; font-size: inherit; margin-top: 8px; }
.uxb-node.is-start, .uxb-node.is-end { border-radius: 100px; text-align: center; }
.uxb-node.is-decision { padding: 24px 0; border: 0; text-align: center; isolation: isolate; }
.uxb-node.is-decision > div { flex: none; width: 52%; }
.uxb-diamond { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.uxb-icon { display: inline-block; width: 20px; height: 20px; font-size: 20px; flex: 0 0 20px; vertical-align: middle; }
.uxb-block table { width: 100%; table-layout: fixed; border-collapse: collapse; font: inherit; color: inherit; text-align: var(--uxb-align); }
.uxb-block th, .uxb-block td { padding: var(--uxb-padding); border-right: 1px solid var(--uxb-border); border-bottom: 1px solid var(--uxb-border); overflow-wrap: anywhere; white-space: pre-wrap; vertical-align: top; }
.uxb-block th { font-weight: 600; background: color-mix(in srgb, var(--uxb-accent) 7%, var(--uxb-bg)); }
.uxb-block th > .uxb-icon { margin-right: 8px; color: var(--uxb-accent); }
.uxb-block tr > :last-child { border-right: 0; }
.uxb-block tbody tr:last-child > * { border-bottom: 0; }
.uxb-status { display: inline-flex; margin-right: 8px; vertical-align: middle; }
.uxb-status.is-yes { color: #237749; }.uxb-status.is-no { color: #a7354d; }.uxb-status.is-partial { color: #8c671e; }
.uxb-emotions meter { width: 75%; accent-color: var(--uxb-accent); margin-right: 8px; }
.uxb-matrix .uxb-quadrants { position: absolute; inset: 28px 32px 44px 64px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; border: 1px solid var(--uxb-border); }
.uxb-quadrants > div { display: flex; align-items: flex-start; padding: 16px; font-size: 13px; font-weight: 500; color: var(--uxb-accent); overflow-wrap: anywhere; background: color-mix(in srgb, var(--uxb-accent) 3%, var(--uxb-bg)); }
.uxb-quadrants > div:nth-child(even) { justify-content: flex-end; text-align: right; }
.uxb-quadrants > div:nth-child(n+3) { align-items: flex-end; }
.uxb-quadrants > div:nth-child(odd) { border-right: 1px dashed var(--uxb-border); }
.uxb-quadrants > div:nth-child(-n+2) { border-bottom: 1px dashed var(--uxb-border); }
.uxb-quadrants > div:first-child { background: color-mix(in srgb, var(--uxb-accent) 8%, var(--uxb-bg)); }
.uxb-x-axis { position: absolute; bottom: 10px; left: 64px; right: 32px; display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.uxb-y-axis { position: absolute; top: 28px; bottom: 44px; left: 12px; width: 38px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; font-size: 13px; }
.uxb-y-axis strong { writing-mode: vertical-rl; transform: rotate(180deg); max-height: 200px; overflow-wrap: anywhere; }
.uxb-matrix-item { position: absolute; transform: translate(-50%, -12px); width: 160px; text-align: center; }
.uxb-dot { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--uxb-bg); border: 2px solid currentColor; font-size: 12px; font-weight: 600; }
.uxb-matrix-item strong { display: block; font-size: 14px; line-height: 1.3; color: var(--uxb-ink); overflow-wrap: anywhere; text-shadow: 0 0 4px var(--uxb-bg); }
.uxb-matrix-key { padding-left: 24px; display: grid; gap: 10px; margin: 20px 0 0; overflow-wrap: anywhere; }
.uxb-matrix-key small { display: block; font-size: 12px; margin-top: 4px; }
.uxb-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#project-overlay .po-block--ux.editing > .uxb-block { display: none; }
.uxe { min-width: 0; background: #fff; color: #20201e; border: 1px solid #d6ddda; border-radius: 8px; padding: 16px; font: 400 14px/1.4 'Space Grotesk', sans-serif; }
.uxe button, .uxe input, .uxe select, .uxe textarea { font: inherit; color: inherit; }
.uxe button { border: 1px solid #d6ddda; border-radius: 5px; background: #fff; cursor: pointer; min-height: 34px; padding: 6px 10px; }
.uxe button[aria-label] { width: 36px; padding: 6px; }
.uxe button:hover { background: #f0f4f2; }
.uxe button:disabled { opacity: .35; cursor: default; }
.uxe button[aria-pressed="true"], .uxe button[aria-selected="true"] { color: #176b87; background: #edf5f7; border-color: #176b87; }
.uxe :is(button,input,textarea,select):focus-visible { outline: 2px solid #176b87; outline-offset: 2px; }
.uxe-toolbar, .uxe-actions, .uxe-section-head, .uxe-section-head > div, .uxe-row-head, .uxe-icon-field { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.uxe-toolbar { justify-content: space-between; margin-bottom: 12px; }
.uxe .uxe-zoom { display: flex; align-items: center; gap: 3px; font-size: 12px; }
.uxe label.uxe-zoom > input { width: 64px; min-width: 0; min-height: 34px; height: 34px; padding: 4px; border: 1px solid #d6ddda; border-radius: 4px; background: #fff; color: #20201e; font: inherit; }
.uxe .uxe-done { padding-inline: 20px; border-color: #20201e; }
.uxe-status { font-size: 13px; color: #176b87; min-height: 0; }
.uxe-status:not(:empty) { padding-bottom: 12px; }
.uxe-preview .uxb-block { max-width: none !important; }
.uxe-preview .uxb-block > h2, .uxe-preview .uxb-caption { display: none; }
.uxe-preview .uxb-viewport { max-height: 500px; }
.uxe-preview .uxb-node, .uxe-preview .uxb-matrix-item { cursor: grab; touch-action: none; }
.uxe-preview .uxb-node.is-selected { outline: 2px solid #176b87; outline-offset: 3px; }
.uxe-preview .uxb-matrix-item.is-selected { outline: 2px solid #176b87; outline-offset: 4px; }
.uxe-preview .uxb-edge-hit { pointer-events: stroke; cursor: pointer; }
.uxe-preview .uxb-edge-hit.is-selected { stroke: #176b8740; }
.uxe-guide { position: absolute; background: #176b87; pointer-events: none; z-index: 5; }
.uxe-guide.is-x { top: 0; bottom: 0; width: 1px; }.uxe-guide.is-y { left: 0; right: 0; height: 1px; }
.uxe-tabs { display: flex; gap: 8px; border-bottom: 1px solid #d6ddda; margin: 16px 0; padding-bottom: 10px; }
.uxe-fields { display: grid; gap: 12px; }
.uxe-grid, .uxe-cells, .uxe-column-editors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.uxe label { position: relative; display: grid; gap: 5px; min-width: 0; font-size: 12px; font-weight: 500; }
.uxe label > :is(input:not([type="checkbox"]),select,textarea) { width: 100%; min-width: 0; min-height: 36px; margin: 0; padding: 8px 10px; background: #fff; border: 1px solid #cdd5d1; border-radius: 5px; color: #20201e; font-size: 14px; }
.uxe label > textarea { resize: vertical; min-height: 74px; }
.uxe label > input[type="color"] { padding: 4px; cursor: pointer; }
.uxe .uxe-check { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.uxe .uxe-check input { width: 16px; height: 16px; accent-color: #176b87; }
.uxe-section-head { justify-content: space-between; margin-top: 12px; }
.uxe-row { border-top: 1px solid #d6ddda; padding-top: 12px; }
.uxe-row summary { cursor: pointer; padding-bottom: 12px; font-weight: 600; }
.uxe-row-head { margin-bottom: 12px; }
.uxe-row-head > label { flex: 1; min-width: 160px; }
.uxe-table-header > div { display: flex; gap: 6px; margin: 8px 0; }
.uxe-icon-field { min-height: 36px; }
@media(max-width:800px) {
    #project-overlay .po-block--ux { padding-inline: 12px; }
    .uxe-grid, .uxe-cells, .uxe-column-editors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .uxe-preview .uxb-viewport { max-height: 380px; }
}
@media(max-width:480px) {
    .uxe-grid, .uxe-cells, .uxe-column-editors { grid-template-columns: minmax(0, 1fr); }
    .uxb-block > h2 { font-size: 24px; }
    .uxe { padding: 12px; }
}
