/* Artifact layout; typography, fields, buttons and modal glass are shared with Settings. */
.px-artifact { margin: 16px 0; border: 1px solid var(--hair); border-radius: var(--r-card); overflow: hidden; background: var(--s-card); }
.px-artifact-head { padding: 12px 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.px-artifact-title { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.px-artifact-tag { flex-shrink: 0; white-space: nowrap; }
.px-artifact-canvas { padding: 0 0 10px; overflow: auto; max-height: 390px; scrollbar-width: thin; }
.px-artifact-canvas > svg { display: block; width: auto; max-width: 100%; height: auto; margin-inline: auto; }
.px-artifact-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 0 0; }
.px-artifact-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.px-artifact-button svg { width: 14px; height: 14px; flex-shrink: 0; }
.px-artifact-button:disabled { opacity: .5; cursor: wait; }
.px-artifact-note { margin: 10px 0 0; }
.px-artifact-image { display: block; width: 100%; height: auto; border-radius: var(--r-card); }
/* The surrounding assistant bubble supplies the one liquid-glass border. */
.px-artifact[data-artifact-kind="image"] { width: 360px; max-width: 100%; margin: 0; border: 0; background: transparent; border-radius: inherit; }
.px-artifact-pending { min-height: 160px; display: grid; place-items: center; text-align: center; font: 400 var(--fs-lg)/1.45 var(--sans); color: var(--t-body); }
/* The skeleton: Connections' loader (panel-memory-graph.css) at the image's
   size. The box is a skeleton bar, the mark a mask in the theme's colour, and
   one scan sweeps both. Reduced motion: they sit still. */
.px-artifact-skel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; aspect-ratio: 3 / 2; max-height: 220px; overflow: hidden; border-radius: var(--r-card); }
.px-artifact-skel, .px-artifact-loadmark {
  background: linear-gradient(100deg,
    rgba(var(--bone-rgb), .06) 0%, rgba(var(--bone-rgb), .06) 38%,
    rgba(var(--bone-rgb), .16) 50%,
    rgba(var(--bone-rgb), .06) 62%, rgba(var(--bone-rgb), .06) 100%);
  background-size: 250% 100%; background-position: 125% 0;
  animation: px-artifact-scan 1.8s linear infinite;
}
.px-artifact-loadmark {
  display: block; width: 96px; aspect-ratio: 547 / 300;
  -webkit-mask: url(icons/mark.png) center / contain no-repeat;
          mask: url(icons/mark.png) center / contain no-repeat;
  background-image: linear-gradient(100deg,
    rgba(var(--bone-rgb), .14) 0%, rgba(var(--bone-rgb), .14) 38%,
    rgba(var(--bone-rgb), .78) 50%,
    rgba(var(--bone-rgb), .14) 62%, rgba(var(--bone-rgb), .14) 100%);
}
@keyframes px-artifact-scan { to { background-position: -125% 0; } }
@media (prefers-reduced-motion: reduce) { .px-artifact-skel, .px-artifact-loadmark { animation: none; background-position: 50% 0; } }
.px-artifact-status { position: relative; padding: 16px; }
.px-artifact-skel .px-artifact-status { padding: 8px 16px 0; font-size: var(--fs-md); color: var(--t-secondary); }
/* Native modal behavior, with the existing Settings card and backdrop materials. */
.px-artifact-dialog { width: calc(100vw - 48px); margin: auto; border: 0; color: var(--t-body); }
.px-artifact-dialog.px-artifact-wide { width: min(1100px, calc(100vw - 48px)); max-width: 1100px; }
.px-artifact-dialog .pxpop-head { flex-wrap: wrap; }
.px-artifact-dialog .pxpop-title { margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }
.px-artifact-zoom { display: flex; flex-wrap: wrap; gap: 6px; }
.px-artifact-viewport { overflow: auto; height: min(650px, 72vh); touch-action: pan-x pan-y; }
.px-artifact-viewport svg { display: block; transform-origin: top left; }
.px-artifact-expanded-image { display: block; max-width: 100%; max-height: 76vh; margin: auto; border-radius: var(--r-card); }
.px-artifact-form { display: grid; gap: 14px; }
.px-artifact-form .set-help, .px-artifact-form .set-note { margin: 0; }
.px-artifact-form > .px-btn { justify-self: end; }
.px-artifact-form output { white-space: pre-wrap; }
.px-artifact-node-fields { display: grid; gap: 8px; max-height: 44vh; overflow: auto; }
.px-artifact-node-fields > label { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 6px; align-items: center; }

/* An email draft (panel-connectors.js). Everything that would go out is shown:
   every recipient and the whole text, never collapsed behind a disclosure. */
.px-email { margin: 16px 0; padding: 14px 16px; border: 1px solid var(--hair); border-radius: var(--r-card); }
.px-email-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.px-email-title { font-size: var(--fs-base); font-weight: 500; line-height: 16px; }
.px-email-thread { margin-bottom: 8px; overflow-wrap: anywhere; font-size: var(--fs-md); line-height: 1.4; color: var(--t-meta); }
.px-email-fields { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin-bottom: 10px; }
.px-email-k { font: 400 var(--fs-xs)/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--t-meta); }
.px-email-v { min-width: 0; overflow-wrap: anywhere; font-size: var(--fs-base); line-height: 1.5; }
.px-email-body { padding-top: 10px; border-top: 1px solid var(--hair); white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-base); line-height: 1.55; }
.px-email-note { margin: 10px 0 0; }
.px-email-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.px-email-open { text-decoration: none; }
.px-email button:disabled { opacity: .5; cursor: wait; }
.px-file-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.px-file-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 10px 3px 7px; border: 1px solid var(--hair); border-radius: var(--r-ctl); color: inherit; font-size: var(--fs-md); line-height: 18px; text-decoration: none; }
.px-file-chip:hover { background: var(--s-quiet); }
.px-file-chip-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.px-file-chip-cut { flex: none; font: 400 var(--fs-xs)/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--t-meta); }
