.pxl-engine-geometry{margin-top:var(--pxl-space-4);padding:var(--pxl-space-4);border:1px solid var(--pxl-border);border-radius:var(--pxl-radius-lg);background:var(--pxl-surface-card);color:var(--pxl-text)}
.pxl-engine-geometry[hidden],.pxl-eg-modal[hidden],.pxl-eg-history-compare[hidden],.pxl-eg-history-body[hidden],.pxl-eg-history-pair[hidden],.pxl-eg-table-wrap[hidden],.pxl-eg-baseline-strip[hidden]{display:none!important}
.pxl-eg-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--pxl-space-3)}
.pxl-eg-kicker{font-size:var(--pxl-font-size-xs);font-weight:var(--pxl-weight-semibold);color:var(--pxl-muted);letter-spacing:var(--pxl-letter-heading);text-transform:uppercase}
.pxl-eg-title{margin:var(--pxl-space-1) 0 0;font-size:var(--pxl-font-size-xl);line-height:1.25;color:var(--pxl-text-strong)}
.pxl-eg-sub{margin:var(--pxl-space-2) 0 0;color:var(--pxl-text-soft);font-size:var(--pxl-font-size-sm);line-height:var(--pxl-line-height-body);max-width:68ch}
.pxl-eg-metrics-context{margin-top:var(--pxl-space-3);color:var(--pxl-muted);font-size:var(--pxl-font-size-xs);font-weight:var(--pxl-weight-semibold);font-variant-numeric:tabular-nums}
.pxl-eg-metrics-context[hidden]{display:none!important}
.pxl-eg-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--pxl-space-2);margin-top:var(--pxl-space-4)}
.pxl-eg-metric{min-width:0;padding:var(--pxl-space-3);border:1px solid var(--pxl-subtle-border);border-radius:var(--pxl-radius-md);background:var(--pxl-surface-2)}
.pxl-eg-metric span,.pxl-eg-metric small{display:block;color:var(--pxl-muted);font-size:var(--pxl-font-size-xs)}
.pxl-eg-metric strong{display:block;margin-top:var(--pxl-space-1);color:var(--pxl-text-strong);font-size:var(--pxl-font-size-lg);font-weight:var(--pxl-weight-bold);font-variant-numeric:tabular-nums}
.pxl-eg-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--pxl-space-2);margin-top:var(--pxl-space-3)}
.pxl-eg-btn{min-height:var(--pxl-control-height);padding:0 var(--pxl-control-padding-x);border-radius:var(--pxl-radius-md);font:inherit;font-size:var(--pxl-font-size-sm);font-weight:var(--pxl-weight-semibold);cursor:pointer}
.pxl-eg-btn:focus-visible,.pxl-eg-modal-close:focus-visible,.pxl-eg-baseline-btn:focus-visible{outline:2px solid var(--pxl-primary-ring);outline-offset:2px}
.pxl-eg-btn-secondary{border:1px solid var(--pxl-action-secondary-border);background:var(--pxl-action-secondary-bg);color:var(--pxl-action-secondary-text)}
.pxl-eg-btn-secondary:hover{border-color:var(--pxl-action-secondary-hover-border);background:var(--pxl-action-secondary-hover-bg)}
.pxl-eg-btn-tertiary{border:1px solid transparent;background:transparent;color:var(--pxl-action-tertiary-text)}
.pxl-eg-btn-tertiary:hover{background:var(--pxl-action-tertiary-hover-bg);color:var(--pxl-action-tertiary-hover-text)}

.pxl-eg-modal{position:fixed;inset:0;z-index:var(--pxl-layer-modal,1000);display:flex;align-items:center;justify-content:center;padding:var(--pxl-space-4);background:var(--pxl-overlay-backdrop);overflow:auto}
.pxl-eg-modal-dialog{width:min(1040px,100%);max-height:calc(100vh - 32px);overflow:auto;padding:var(--pxl-space-4);border:1px solid var(--pxl-border);border-radius:var(--pxl-radius-lg);background:var(--pxl-surface-card);color:var(--pxl-text);box-shadow:var(--pxl-shadow);scrollbar-gutter:stable}
.pxl-eg-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--pxl-space-3)}
.pxl-eg-modal-title{margin:var(--pxl-space-1) 0 0;color:var(--pxl-text-strong);font-size:var(--pxl-font-size-xl);line-height:1.25}
.pxl-eg-modal-meta{margin:var(--pxl-space-2) 0 0;color:var(--pxl-muted);font-size:var(--pxl-font-size-sm);font-variant-numeric:tabular-nums}
.pxl-eg-modal-close{flex:0 0 auto;width:44px;height:44px;border:1px solid var(--pxl-border);border-radius:var(--pxl-radius-md);background:var(--pxl-surface-2);color:var(--pxl-text-strong);font:inherit;font-size:var(--pxl-font-size-xl);line-height:1;cursor:pointer}
.pxl-eg-modal-close:hover{background:var(--pxl-hover-surface,var(--pxl-surface-3))}
.pxl-eg-modal-open{overflow:hidden}
.pxl-eg-visual-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--pxl-space-3);margin-top:var(--pxl-space-3)}
.pxl-eg-svg-panel{min-width:0;border:1px solid var(--pxl-subtle-border);border-radius:var(--pxl-radius-md);background:var(--pxl-surface-2)}
.pxl-eg-svg-panel{padding:var(--pxl-space-2)}
.pxl-eg-svg-panel svg{display:block;width:100%;height:300px;min-height:0;color:var(--pxl-text)}
.pxl-eg-legend{display:flex;flex-wrap:wrap;gap:var(--pxl-space-3);padding:var(--pxl-space-1) var(--pxl-space-2);color:var(--pxl-muted);font-size:var(--pxl-font-size-xs)}
.pxl-eg-legend>span{display:inline-flex;align-items:center;gap:var(--pxl-space-1)}
.pxl-eg-dot{display:inline-block;width:10px;height:10px;border-radius:var(--pxl-radius-pill);background:var(--pxl-primary)}
.pxl-eg-dot-b{background:var(--pxl-warning)}
.pxl-eg-message{min-height:1em;margin:var(--pxl-space-2) 0 0;color:var(--pxl-muted);font-size:var(--pxl-font-size-xs)}

/* History comparison: Dynamic Compression history remains the sole snapshot source. */
.pxl-eg-history-compare{margin-top:var(--pxl-space-3);padding-top:var(--pxl-space-3);border-top:1px solid var(--pxl-divider);color:var(--pxl-text)}
.pxl-eg-history-compare-head{display:block}
.pxl-eg-history-heading{display:grid;gap:2px;min-width:0;padding:var(--pxl-space-2) 0}
.pxl-eg-history-heading strong{color:var(--pxl-text-strong);font-size:var(--pxl-font-size-sm);line-height:1.3}
.pxl-eg-history-summary{margin:0;color:var(--pxl-muted);font-size:var(--pxl-font-size-xs);font-weight:var(--pxl-weight-regular);line-height:1.35}
.pxl-eg-history-body{padding-top:var(--pxl-space-2)}

.pxl-eg-baseline-strip{display:flex;align-items:center;flex-wrap:wrap;gap:var(--pxl-space-1);margin-top:var(--pxl-space-2);padding:var(--pxl-space-2) var(--pxl-space-3);border:1px solid var(--pxl-subtle-border);border-radius:var(--pxl-radius-md);background:var(--pxl-surface-2);color:var(--pxl-text)}
.pxl-eg-baseline-strip strong{color:var(--pxl-text-strong);font-size:var(--pxl-font-size-sm)}
.pxl-eg-baseline-strip span{color:var(--pxl-muted);font-size:var(--pxl-font-size-sm);font-variant-numeric:tabular-nums}
.pxl-eg-history-pair{display:flex;align-items:end;gap:var(--pxl-space-3);padding-top:var(--pxl-space-2)}
.pxl-eg-pair{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:end;gap:var(--pxl-space-2);flex:1 1 auto;min-width:0}
.pxl-eg-pair label{display:grid;gap:var(--pxl-space-1);color:var(--pxl-muted);font-size:var(--pxl-font-size-xs);font-weight:var(--pxl-weight-semibold)}
.pxl-eg-pair select{width:100%;min-height:var(--pxl-control-height);padding:0 var(--pxl-control-padding-x);border:1px solid var(--pxl-border);border-radius:var(--pxl-radius-md);background:var(--pxl-input-bg);color:var(--pxl-text-input);font:inherit;font-size:var(--pxl-font-size-base)}
.pxl-eg-pair>span{padding-bottom:var(--pxl-space-3);color:var(--pxl-muted);font-size:var(--pxl-font-size-xs);font-weight:var(--pxl-weight-bold)}
.pxl-eg-table-wrap{overflow-x:auto;margin-top:var(--pxl-space-2);border:1px solid var(--pxl-subtle-border);border-radius:var(--pxl-radius-md)}
.pxl-eg-table{width:100%;border-collapse:collapse;min-width:900px;background:var(--pxl-surface)}
.pxl-eg-table th,.pxl-eg-table td{padding:var(--pxl-space-2);border-bottom:1px solid var(--pxl-divider);text-align:left;vertical-align:middle;white-space:nowrap;font-size:var(--pxl-font-size-sm);font-variant-numeric:tabular-nums}
.pxl-eg-table th{color:var(--pxl-muted);font-weight:var(--pxl-weight-semibold);background:var(--pxl-subtle-bg)}
.pxl-eg-table td{color:var(--pxl-text)}
.pxl-eg-table tr:last-child td{border-bottom:0}
.pxl-eg-history-table tr.is-baseline{background:transparent}
.pxl-eg-history-table tr.is-baseline td:first-child{box-shadow:inset 3px 0 0 var(--pxl-primary)}
.pxl-eg-baseline-btn{width:34px;height:34px;padding:0;border:1px solid var(--pxl-border);border-radius:var(--pxl-radius-pill);background:var(--pxl-surface-2);color:var(--pxl-muted);font:inherit;font-size:var(--pxl-font-size-md);cursor:pointer}
.pxl-eg-baseline-btn[aria-pressed="true"]{border-color:var(--pxl-primary);color:var(--pxl-primary);background:var(--pxl-surface-2)}
.pxl-eg-result-cell{font-weight:var(--pxl-weight-semibold);color:var(--pxl-text-strong)!important}
.pxl-eg-delta-cell{font-weight:var(--pxl-weight-semibold)}
.pxl-eg-table-tag{display:inline-flex;margin-left:var(--pxl-space-1);padding:1px var(--pxl-space-1);border-radius:var(--pxl-radius-pill);font-size:var(--pxl-font-size-xs);font-weight:var(--pxl-weight-bold);line-height:1.4}
.pxl-eg-table-tag.is-high{background:var(--pxl-danger-bg);color:var(--pxl-danger-text)}
.pxl-eg-table-tag.is-low{background:var(--pxl-success-bg);color:var(--pxl-success-text)}

@media(max-width:760px){
  .pxl-eg-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pxl-eg-visual-grid{grid-template-columns:1fr}
  .pxl-eg-deltas{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pxl-eg-modal{align-items:flex-start;padding:var(--pxl-space-2)}
  .pxl-eg-modal-dialog{max-height:none;padding:var(--pxl-space-3)}
  .pxl-eg-svg-panel svg{height:260px}
  .pxl-eg-history-pair{align-items:stretch;flex-direction:column}
  .pxl-eg-history-pair>.pxl-eg-btn{align-self:flex-end}
}
@media(max-width:680px){
  .pxl-eg-history-compare{padding-top:var(--pxl-space-3)}
  .pxl-eg-table-wrap{overflow:visible;border:0}
  .pxl-eg-history-table{min-width:0;background:transparent}
  .pxl-eg-history-table thead{display:none}
  .pxl-eg-history-table,.pxl-eg-history-table tbody,.pxl-eg-history-table tr,.pxl-eg-history-table td{display:block;width:100%}
  .pxl-eg-history-table tr{margin-top:var(--pxl-space-2);padding:var(--pxl-space-2);border:1px solid var(--pxl-subtle-border);border-radius:var(--pxl-radius-md);background:var(--pxl-surface-2)}
  .pxl-eg-history-table tr.is-baseline{border-color:var(--pxl-subtle-border);background:var(--pxl-surface-2);box-shadow:inset 3px 0 0 var(--pxl-primary)}
  .pxl-eg-history-table td{display:flex;align-items:center;justify-content:space-between;gap:var(--pxl-space-3);padding:var(--pxl-space-2) 0;border-bottom:1px solid var(--pxl-divider);white-space:normal;text-align:right}
  .pxl-eg-history-table td:last-child{border-bottom:0}
  .pxl-eg-history-table td::before{content:attr(data-label);flex:0 0 auto;color:var(--pxl-muted);font-size:var(--pxl-font-size-xs);font-weight:var(--pxl-weight-semibold);text-align:left}
  .pxl-eg-history-table td:first-child{justify-content:flex-end}
  .pxl-eg-history-table td:first-child::before{margin-right:auto}
  .pxl-eg-table-tag{margin-left:auto}
}
@media(max-width:480px){
  .pxl-engine-geometry{padding:var(--pxl-space-3)}
  .pxl-eg-head,.pxl-eg-modal-head{align-items:stretch;flex-direction:column}
  .pxl-eg-modal-close{align-self:flex-end}
  .pxl-eg-metrics{grid-template-columns:1fr 1fr}
  .pxl-eg-modal-actions{justify-content:stretch}
  .pxl-eg-modal-actions .pxl-eg-btn{flex:1 1 100%}
  .pxl-eg-pair{grid-template-columns:1fr}
  .pxl-eg-pair>span{padding:0;text-align:center}
  .pxl-eg-history-pair>.pxl-eg-btn{width:100%}
}

/* Mounted inside Dynamic Compression as a full-width subordinate analysis row. */
.crv1-progressiveMode #crv1_dynamicSpotlight.crv1-dynamicStableFlow .crv1-dynamicBody > .pxl-engine-geometry{grid-column:1 / -1;width:100%;max-width:none;min-width:0}
.crv1-dynamicSpotlight .pxl-engine-geometry{margin-top:var(--pxl-space-4);padding:var(--pxl-space-4) 0 0;border:0;border-top:1px solid var(--pxl-divider);border-radius:0;background:transparent}
.crv1-dynamicSpotlight .pxl-engine-geometry .pxl-eg-title{font-size:var(--pxl-font-size-lg)}
@media(max-width:480px){.crv1-dynamicSpotlight .pxl-engine-geometry{padding:var(--pxl-space-3) 0 0}}
