/* Domain consumers share these presentation rules. */
:root{--nexa-layout-gap:var(--nexa-space-4);--nexa-layout-min:280px}
html,body{background:var(--nexa-background);color:var(--nexa-text-primary)}
.nexa-layout-picker{display:inline-flex;align-items:center;gap:var(--nexa-space-2);font-size:var(--nexa-font-body-small)}
.nexa-layout-picker select,[data-nexa-theme-picker],select[data-nexa-density]{background:var(--nexa-surface);color:var(--nexa-text-primary);border:1px solid var(--nexa-border);border-radius:var(--nexa-radius);padding:var(--nexa-space-2);font:inherit;min-height:36px;max-width:100%}
[data-shared-layout="grid"],.nexa-layout-cards{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,var(--nexa-layout-min)),1fr))!important;gap:var(--nexa-layout-gap)!important;align-items:start}
[data-shared-layout="masonry"]{display:block!important;min-height:160px}
[data-shared-layout="compact"]{display:flex!important;flex-direction:column;gap:var(--nexa-space-2)!important}
[data-shared-layout="compact"]>.home-card{min-height:0!important;padding:var(--nexa-space-3) var(--nexa-space-4);display:grid;grid-template-columns:minmax(160px,1fr) 2fr auto;gap:var(--nexa-space-3);text-align:left}
[data-shared-layout]>*,.nexa-layout-cards>*{min-width:0;overflow-wrap:anywhere}
[data-shared-layout]:not([data-layout-geometry="dashboard"])>*,.nexa-layout-cards:not([data-layout-geometry="dashboard"])>*{grid-column:auto!important}
[data-nexa-density="Compact"] .nexa-card,[data-nexa-density="Compact"] .dm-record{padding:var(--nexa-space-3)}
.nexa-tree{list-style:none;padding-inline-start:var(--nexa-space-3);margin-block:var(--nexa-space-2)}
.nexa-tree ul{list-style:none;padding-inline-start:var(--nexa-space-5);border-inline-start:1px solid var(--nexa-border)}
.nexa-tree li{margin-block:var(--nexa-space-2)}
.nexa-tree summary{padding:var(--nexa-space-2);cursor:pointer}
.nexa-graph{min-width:0;overflow:auto}.nexa-graph svg{width:100%;min-width:600px;max-height:1800px;color:var(--nexa-edge)}
.nexa-graph rect{fill:var(--nexa-surface);stroke:var(--nexa-border)}.nexa-graph text{fill:var(--nexa-text-primary);font:14px var(--nexa-font-family)}.nexa-graph marker path{fill:var(--nexa-edge)}.nexa-graph-edge{stroke:var(--nexa-edge);fill:none;stroke-width:2}
.nexa-graph [data-edge-type*="Dependency"] path{stroke-dasharray:7 4}.nexa-graph [data-edge-type*="Reference"] path{stroke-dasharray:2 4}.nexa-graph [data-selected="true"] rect{stroke:var(--nexa-focus);stroke-width:3;fill:var(--nexa-selection)}
.nexa-graph-nodes{display:flex;flex-wrap:wrap;gap:var(--nexa-space-3);list-style:none;padding:0}
.nexa-presentation-tools{display:flex;flex-wrap:wrap;align-items:center;gap:var(--nexa-space-2)}
.nexa-preview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:var(--nexa-space-4)}
.nexa-preview-card{border:1px solid var(--nexa-border);border-radius:var(--nexa-card-radius);background:var(--nexa-surface);padding:var(--nexa-space-4);margin:0;min-width:0}
.nexa-preview-card h3{font-size:var(--nexa-font-h3);margin-block:0 var(--nexa-space-3)}
.nexa-preview-card p{line-height:var(--nexa-line-body)}
.nexa-preview-statuses{display:flex;flex-wrap:wrap;gap:var(--nexa-space-3)}
.nexa-preview-width{container-type:inline-size;max-width:100%;margin:auto;min-width:0}
.nexa-preview-width[data-width="Narrow"]{width:360px}.nexa-preview-width[data-width="Medium"]{width:760px}.nexa-preview-width[data-width="Wide"]{width:100%}
.nexa-preview-columns{display:grid;grid-template-columns:minmax(180px,1fr) minmax(0,2fr);gap:var(--nexa-space-4)}
.nexa-preference-note{font-size:var(--nexa-font-body-small);color:var(--nexa-text-secondary)}
.nexa-status-badge{border:1px solid currentColor}.nexa-status-badge[data-status-tone="review"],.nexa-status-badge[data-status-tone="partial"],.nexa-status-badge[data-status-tone="stale"]{border-style:dashed}
.nexa-status-badge[data-status-tone="partial"]{color:var(--nexa-status-partial)}.nexa-status-badge[data-status-tone="stale"]{color:var(--nexa-status-stale)}.nexa-status-badge[data-status-tone="attention"]{color:var(--nexa-status-attention)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:var(--nexa-focus-ring);outline-offset:var(--nexa-focus-offset)}
button:disabled,select:disabled{opacity:1;cursor:not-allowed;color:var(--nexa-text-secondary);border-style:dashed;background:var(--nexa-surface-subtle)}
.nexa-button:active:not(:disabled){box-shadow:inset 0 0 0 1px var(--nexa-accent)}
.nexa-button[data-variant="Danger"],.nexa-button[data-variant="Destructive"]{color:var(--nexa-status-danger);border-color:currentColor;background:var(--nexa-surface)}
[data-shared-component="input"],[data-shared-component="select"]{display:grid;gap:var(--nexa-space-2)}
.nexa-skeleton{min-height:100px;border-radius:var(--nexa-radius);background:var(--nexa-surface-subtle);padding:var(--nexa-space-4)}
@container(max-width:600px){.nexa-preview-columns{grid-template-columns:1fr}}
@media(max-width:650px){[data-shared-layout="compact"]>.home-card{display:flex;flex-direction:column;align-items:flex-start}.nexa-presentation-tools{max-width:100%}.nexa-preview-columns{grid-template-columns:1fr}.dm-module-filters{grid-template-columns:1fr}.nexa-layout-picker{max-width:100%}.topbar{flex-wrap:wrap}}
@media(pointer:coarse){button,a,input,select,summary{min-height:var(--nexa-touch-target)}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:0s!important;transition-duration:0s!important}}

.nexa-button[data-variant="Primary"]{color:var(--nexa-on-accent)}
dialog{background:var(--nexa-surface);color:var(--nexa-text-primary)}

[data-nexa-density="Compact"] .nexa-preview-card{padding:var(--nexa-space-3)}
[data-nexa-density="Compact"] .nexa-tree li{margin-block:var(--nexa-space-1)}

.nexa-focus-workspace{font-weight:var(--nexa-weight-body)}
.nexa-focus-workspace :is(h1,h2,h3){font-weight:var(--nexa-weight-heading)}
.nexa-layout-picker{font-weight:var(--nexa-weight-label)}
.nexa-focus-workspace code{line-height:var(--nexa-line-code)}

/* Existing picker carries Current / Trial actions outside the candidate content. */
[data-nexa-picker]{max-width:100%;min-width:0;align-items:center;padding-block:var(--nexa-space-2)}
.nexa-layout-current,.nexa-trial-state,.nexa-layout-capability{font-size:.875rem;line-height:1.5;overflow-wrap:anywhere}
.nexa-trial-state{padding:var(--nexa-space-2);border:1px dashed var(--nexa-border);border-radius:var(--nexa-radius);background:var(--nexa-surface-subtle);color:var(--nexa-text-primary)}
[data-nexa-picker] button{white-space:normal;min-height:44px}
.nexa-layout-capability{color:var(--nexa-text-secondary)}
