.mx-detail-grid,.mx-builder,.mx-preview-layout{display:grid;gap:18px;align-items:start}
.mx-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.mx-builder{grid-template-columns:minmax(0,1.65fr) minmax(240px,1fr)}
.mx-preview-layout{grid-template-columns:minmax(200px,1fr) minmax(250px,1.17fr) minmax(180px,.84fr)}
.mx-detail-grid>.panel,.mx-builder>.panel,.mx-builder>.stack,.mx-preview-layout>*{min-width:0}
.mx-tabs{margin:0 0 18px}
.mx-wizard-foot,.mx-line,.mx-exp-title,.mx-source,.mx-page,.mx-page>div{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3)}
.mx-wizard-foot{margin-top:18px}
.mx-wizard-foot{flex-wrap:wrap;justify-content:flex-end}
.mx-wizard-foot>:first-child{margin-right:auto}
.mx-wizard-foot .primary[data-do="mx-step"]>.icon{order:1}
.mx-review-layout>*{min-width:0}
.mx-review-layout>.in-identity-preview{position:static}
.mx-review-controls{padding:0 var(--space-5) 14px}
.mx-review-controls:empty{display:none}
.mx-form{display:grid;gap:var(--space-4)}.mx-form>.small,.mx-editor-intro{margin:0}
.mx-form .field,.mx-condition .field,.mx-condition-title .field,.mx-exp-row .field,.mx-dates .field{display:grid;gap:6px;min-width:0;font-size:var(--text-small);font-weight:550}
.mx-form input:not([type=checkbox]),.mx-form select,.mx-form textarea,.mx-condition select,.mx-condition-title select,.mx-exp-row input:not([type=checkbox]),.mx-dates input,.mx-filter select,.mx-dates summary,input[data-input=mx-card-search]{width:100%}
.mx-form textarea{resize:vertical}.mx-form .grid-2{gap:var(--space-3)}
.mx-step,.mx-textlink,.mx-dates summary{cursor:pointer}
.mx-steps{position:sticky;top:0;z-index:2;display:flex;align-items:stretch;flex-wrap:wrap;border-bottom:1px solid var(--line);background:var(--surface);border-radius:var(--radius-sm) var(--radius-sm) 0 0;margin-bottom:18px}
.mx-step{flex:1;display:flex;align-items:center;justify-content:center;gap:9px;padding:14px var(--space-2);min-width:0;color:var(--muted);font:inherit;font-size:var(--text-small);background:transparent;border:0;border-bottom:2px solid transparent}
.mx-step b{font-weight:550}.mx-step span{font-variant-numeric:tabular-nums;font-size:var(--text-xs);font-weight:600;line-height:22px;border-radius:50%;width:22px;background:var(--soft);flex:none}
.mx-step.active{color:var(--accent);border-color:currentColor}
.mx-step.active span{background:var(--ink);color:var(--on-primary)}
.mx-step:disabled{cursor:default}
.mx-step:not(:disabled):hover{background:var(--soft)}
.mx-condition-title{margin-bottom:var(--space-3)}.mx-condition-title .field{max-width:230px}
.mx-condition{display:grid;grid-template-columns:minmax(80px,1.1fr) minmax(68px,.65fr) minmax(95px,1.15fr) auto;align-items:end;gap:var(--space-2);margin-bottom:var(--space-3)}
.mx-condition .btn{font-size:var(--text-caption);padding-inline:6px}
.mx-pair-metric{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-3)}
.mx-pair-metric>div{display:grid;gap:6px}.mx-pair-metric>div+div{border-left:1px solid var(--line);padding-left:var(--space-4)}
.mx-pair-metric strong{font-size:clamp(26px,2.5vw,38px);font-weight:550;line-height:1;letter-spacing:-.045em;font-variant-numeric:tabular-nums}
.mx-pair-metric span,.mx-meta,.mx-source small{color:var(--muted);font-size:var(--text-caption)}
.mx-line{padding:var(--space-2) 0;flex-wrap:wrap}.mx-source{padding:10px 0}
.mx-source+.mx-source,.mx-line+.mx-line,.mx-exp-row+.mx-exp-row{border-top:1px solid var(--line)}
.mx-source strong,.mx-exp-title strong{font-weight:600;font-size:var(--text-body)}
.mx-exp-row{padding:var(--space-4) 0}.mx-exp-row:last-child{padding-bottom:0}.mx-exp-row .field{margin-top:10px}
.mx-exp-value,.mx-editor-intro{font-size:var(--text-body);color:var(--muted);line-height:1.5}
.mx-switch{display:inline-flex;align-items:center;gap:6px;font-size:var(--text-caption);font-weight:550}.mx-switch input{accent-color:var(--accent);width:16px;height:16px}
.mx-dl{display:grid;gap:0;margin:0}.mx-dl>div{display:grid;grid-template-columns:minmax(90px,.85fr) minmax(0,1.3fr);gap:var(--space-3);align-items:baseline;padding:9px 0}.mx-dl>div+div{border-top:1px solid var(--line)}.mx-dl dt{font-size:var(--text-caption);color:var(--muted)}.mx-dl dd{margin:0;font-size:var(--text-body);overflow-wrap:anywhere}
.mx-chip{display:inline-block;border:1px solid var(--line);border-radius:var(--radius-pill);font-size:var(--text-xs);line-height:1.65;margin:2px 3px 2px 0;padding:0 7px;white-space:nowrap;color:var(--ink)}
.mx-textlink{color:var(--ink);font-weight:600;text-decoration:none}.mx-textlink:hover{text-decoration:underline}
.mx-batch-directory tbody tr{cursor:pointer}
tr[data-do=mx-go],tr[data-do=mx-card-detail]{cursor:pointer}.mx-meta{display:block;margin-top:var(--space-1)}
.mx-filter{position:relative;display:flex;gap:var(--space-2);flex-wrap:wrap;align-items:center}.mx-filter select{width:auto}
.mx-dates{position:relative}.mx-dates summary{list-style:none;padding:var(--space-2) 11px}.mx-dates summary::-webkit-details-marker{display:none}
.mx-dates>div{display:grid;gap:10px;padding:var(--space-3);position:absolute;z-index:4;min-width:180px;top:calc(100% + 5px);right:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-sm)}
.mx-dates>div:has(.mx-date-calendar:not([hidden])){width:228px}
.mx-date-control{position:relative}
.mx-date-control input{padding-inline-end:40px;font-variant-numeric:tabular-nums}
.mx-date-control .icon-btn{position:absolute;inset-inline-end:4px;top:50%;transform:translateY(-50%);width:32px;height:32px}
.mx-date-error{margin:0;color:var(--error);font-size:var(--text-caption);font-weight:400}
.mx-date-calendar{padding-top:var(--space-2);border-top:1px solid var(--line)}
.mx-calendar-header,.mx-calendar-footer{display:flex;align-items:center;justify-content:space-between;gap:var(--space-1)}
.mx-calendar-header .icon-btn{width:30px;height:30px}
.mx-calendar-header strong{font-size:var(--text-small);font-weight:600}
.mx-calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:1px;margin-block:var(--space-2)}
.mx-calendar-days>:is(span,button){display:grid;place-items:center;min-width:0;height:27px;padding:0;font:inherit;font-size:var(--text-caption)}
.mx-calendar-days span{color:var(--muted)}
.mx-calendar-days button{border:0;border-radius:var(--radius-sm);color:var(--ink);background:transparent;cursor:pointer}
.mx-calendar-days button:hover{background:var(--soft)}
.mx-calendar-days button[aria-pressed=true]{background:var(--selected-background);color:var(--accent-deep)}
.mx-calendar-footer .btn{min-height:30px;padding-block:4px}
.mx-page{padding:var(--space-3) 18px;flex-wrap:wrap;border-top:1px solid var(--line);font-size:var(--text-small);color:var(--muted)}
.mx-page>div{gap:var(--space-2)}.mx-page .btn{font-size:var(--text-caption)}
.mx-issues{padding-left:18px;line-height:1.7}
.mx-validation{margin:0 0 var(--space-4);border:var(--border-width) solid var(--error)}
.mx-source{align-items:start;flex-direction:column;gap:var(--space-1)}.mx-campaign-source{color:var(--accent)!important}
@media(max-width:1200px){.mx-builder{grid-template-columns:minmax(0,1.4fr) minmax(210px,1fr)}.mx-condition{grid-template-columns:1fr 1fr}.mx-preview-layout{grid-template-columns:minmax(0,1fr) minmax(230px,1fr)}.mx-preview-layout>.stack:last-child{grid-column:1/-1}.mx-preview-layout>.stack:last-child .panel-body{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-2)}}
@media(max-width:760px){.mx-detail-grid,.mx-builder,.mx-preview-layout{grid-template-columns:1fr}.mx-steps{display:grid;grid-template-columns:1fr 1fr}.mx-step{justify-content:start;padding:10px var(--space-2)}.mx-wizard-foot{justify-content:start}.mx-wizard-foot>:first-child{margin-right:0}.mx-filter input{max-width:100%}.mx-preview-layout>.stack:last-child .panel-body{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:420px){.mx-filter,.mx-page{padding-inline:var(--space-3)}.mx-dl>div{gap:6px}.mx-dates>div{right:auto;left:0}.mx-page>div{flex-wrap:wrap}}
.mx-fulfillment,.mx-packing{margin-top:18px}
.mx-stages{list-style:none;padding:0;margin:14px 0 0;display:flex;flex-wrap:wrap;gap:6px}
.mx-stages li{border:1px solid var(--line);border-radius:var(--radius-sm);padding:5px var(--space-2);font-size:var(--text-xs);color:var(--muted)}
.mx-stages .done{background:var(--soft)}.mx-stages .current{background:var(--green-soft);color:var(--green);border-color:var(--selected-border)}
.mx-proofs{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-3)}.mx-proofs figure{margin:0}.mx-proof-button{padding:0;border:0;border-radius:var(--radius-sm);overflow:hidden;display:block;background:transparent;width:100%}.mx-proofs img{display:block;width:100%}.mx-proofs figcaption{color:var(--muted);font-size:var(--text-caption);margin-top:var(--space-1)}
.mx-lookup,.mx-box-line{display:flex;gap:var(--space-3);align-items:end;flex-wrap:wrap}.mx-lookup input{width:min(250px,100%)}.mx-lookup .field{flex:0 1 250px}
.mx-lookup+p{margin:var(--space-2) 0 13px}.mx-ship-order{margin-top:var(--space-4)}.mx-ship-order h3{margin:0 0 5px}.mx-ship-order article{border-top:1px solid var(--line)}
.mx-box-line{align-items:center;padding:6px 0;gap:10px}.mx-box-line span{font-size:var(--text-caption);color:var(--muted)}.mx-box-line button{margin-left:auto}
.mx-serials{padding:var(--space-3);margin:0 0 var(--space-2);border-radius:var(--radius-sm);background:var(--soft);display:grid;grid-template-columns:repeat(auto-fill,minmax(95px,1fr));list-style:none;max-height:220px;overflow:auto;gap:var(--space-1);font:12px/1.5 monospace}
.mx-product-list { display:grid; gap:6px; }
.mx-product-list > .btn { justify-self:start; }
.mx-product-list .mx-line { flex-wrap:wrap; padding:var(--space-1) 0; }
.mx-product-list .mx-line > div { display:flex; gap:var(--space-1); }
.mx-exp-row .field select { min-height:40px; max-width:22rem; margin-bottom:var(--space-2); padding-inline-start:var(--space-2); border:1px solid var(--line); border-radius:var(--radius-sm); color:var(--ink); font:inherit; }

/* The first line identifies the magnet; subsequent rows share its numeric columns. */
.order-sheet {
  --order-inset: clamp(20px, 2.25vw, 32px);
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
}
.order-heading { margin-bottom: var(--space-6); }
.order-heading h1 {
  margin: 0; overflow-wrap: anywhere;
}
.order-statusline { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-3); margin: var(--space-2) 0 0; color: var(--muted); }
.order-back { display: none; }
.order-paper { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.order-lines, .order-delivery { min-width: 0; padding: 24px var(--order-inset); }
.order-lines h2, .order-delivery h2 {
  margin: 0 0 var(--space-4); color: var(--ink); font: 600 19px/1.25 var(--sans); letter-spacing: -.025em;
}
.order-items-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.order-items-table th, .order-items-table td {
  text-align: right; vertical-align: top; padding: var(--space-3) var(--space-2);
  border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums;
}
.order-items-table thead th { padding-top: var(--space-1); padding-bottom: var(--space-2); font-size: var(--text-caption); font-weight: 500; color: var(--muted); }
.order-items-table th:first-child, .order-items-table td:first-child { width: 46%; padding-left: 0; text-align: left; }
.order-items-table th:last-child, .order-items-table td:last-child { padding-right: 0; }
.order-items-table tbody tr:last-child > * { border-bottom: 0; }
.order-items-table tbody tr:first-child > * { padding-top: var(--space-4); }
.order-items-table tbody tr:first-child td:nth-child(2) { font-weight: 620; }
.order-items-table tbody th > small { display: block; margin-top: var(--space-1); }
.order-items-table th small { color: var(--muted); font-weight: 450; }
.order-item-name { display: block; color: var(--ink); font-weight: 570; overflow-wrap: anywhere; }
.order-items-table tbody tr:first-child .order-item-name { font: 500 clamp(20px, 2vw, 28px)/1.12 var(--serif); letter-spacing: -.03em; }
.order-artwork { margin-top: var(--space-2); color: var(--muted); font-size: var(--text-caption); }
.order-artwork p { margin: var(--space-1) 0 0; }
.order-artwork .mx-proofs { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.order-artwork .mx-proofs figure { width: 48px; max-width: 100%; }
.order-artwork .mx-proof-button { cursor: zoom-in; border: 1px solid var(--line); border-radius: var(--radius-xs); }
.order-artwork .mx-proof-button:hover { border-color: var(--muted); }
.order-artwork .mx-proof-button img { height: auto; }
.order-artwork .mx-proofs figcaption { font-size: var(--text-xs); margin-top: 2px; }
.order-delivery { border-top: 1px solid var(--line); }
.order-delivery dl { display: grid; grid-template-columns: repeat(auto-fit,minmax(184px,1fr)); gap: var(--space-4) var(--space-6); margin: 0; }
.order-sheet dt { margin: 0; color: var(--muted); font-size: var(--text-caption); }
.order-sheet dd { margin: var(--space-1) 0 0; overflow-wrap: anywhere; }
.order-delivery dd { line-height: 1.45; }
.order-experience-batch { display:block; margin-top:6px; color:var(--muted); font-size:var(--text-caption); }
.order-delivery strong { font-weight: 570; }
.order-delivery address { color: var(--secondary); font-style: normal; }
.order-delivery a { color: var(--accent); }
.order-records summary { cursor: pointer; }
.order-records { margin: var(--space-6) 0; }
.order-records > details { border-bottom: 1px solid var(--line); }
.order-records summary { min-height: 48px; padding: var(--space-3) var(--space-1); font-weight: 560; }
.order-records summary::marker { color: var(--muted); font-size: var(--text-caption); }
.order-record-body { padding: var(--space-2) var(--space-1) var(--space-5); }
.order-record-body h3, .order-record-body h4 { margin: var(--space-4) 0 var(--space-2); font-size: var(--text-body); }
.order-record-body p { margin-bottom: var(--space-2); }
.order-record-body .table-scroll { margin: var(--space-2) 0 var(--space-4); }
.order-record-body caption { text-align: start; padding-bottom: var(--space-2); font-weight: 560; }
.order-record-body .mx-textlink { display: inline-flex; align-items: center; min-height: 40px; color: var(--accent); }
.order-record-progress { list-style: none; padding: 0; margin: var(--space-3) 0; max-width: 480px; }
.order-record-progress li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}
.order-record-progress li span:last-child { color: var(--muted); }
.order-record-progress li[aria-current="step"] { font-weight: 600; }
.order-record-facts { display:grid; grid-template-columns:1fr; gap:var(--space-2); margin:0; }
.order-records table { border-collapse: collapse; width: 100%; }
.order-records th, .order-records td { padding: var(--space-2); border-bottom: 1px solid var(--line); text-align: end; }
.order-records th:first-child, .order-records td:first-child { text-align: start; }
.order-records th { font-size: var(--text-caption); font-weight: 500; color: var(--muted); }
.order-record-muted { color: var(--muted); }
.order-record-action { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) 14px; margin-top: var(--space-3); padding: var(--space-4) var(--space-5); margin-bottom: var(--space-4); border-radius: var(--radius-sm); background: var(--gold-soft); }
.order-record-action p { margin: 0; flex-basis: 100%; }
.order-record-action > span { color: var(--gold); font-size: var(--text-small); }
@media (max-width: 760px) {
  .order-back { display: block; margin-bottom: var(--space-2); }
  .order-back .btn { padding-inline: 0 var(--space-2); }
  .order-sheet { --order-inset: 16px; }
  .order-heading { margin-bottom: var(--space-4); }
  .order-lines, .order-delivery { padding-block: var(--space-4); }
  .order-delivery dl { grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--space-3) var(--space-4); }
  .order-records { margin-top: var(--space-4); }
}
@media (max-width: 540px) {
  .order-sheet { --order-inset: 12px; }
  .order-items-table { font-size: var(--text-small); }
  .order-items-table th, .order-items-table td { padding: 10px 3px; }
  .order-items-table thead th { font-size: var(--text-xs); line-height: 1.2; }
  .order-items-table th:first-child, .order-items-table td:first-child { width: 38%; }
  .order-items-table th:last-child, .order-items-table td:last-child { width: 23%; }
  .order-artwork .mx-proofs { gap: 6px; }
  .order-artwork .mx-proofs figure { width: 48px; }
  .order-delivery dl > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 350px) {
  .order-items-table { font-size: var(--text-caption); }
  .order-items-table th:first-child, .order-items-table td:first-child { width: 34%; }
  .order-artwork .mx-proofs figure { width: 44px; }
}

.order-batches-title { display:flex; align-items:center; gap:var(--space-3); }
.order-batches-back { display:grid; place-items:center; width:38px; height:38px; border-radius:50%; color:var(--secondary); text-decoration:none; }
.order-batches-back:hover { background:var(--soft); color:var(--accent); }
.order-batches-back:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

.mx-packing .panel-body > p:first-child { margin-top:0; max-width:72ch; }

.mx-bulk-bar{margin:var(--space-3) 0;gap:var(--space-4)}.mx-bulk-bar .btn{margin-left:auto}

.mx-config-info{margin-bottom:18px;overflow:hidden}
.mx-config-info table{table-layout:fixed}
.mx-config-info th:first-child{width:50%}
.mx-config-info th:last-child,.mx-config-info td:last-child{text-align:right;width:18%;font-variant-numeric:tabular-nums}
.mx-config-info td{overflow-wrap:anywhere}
.mx-config-info td small{display:block;margin-top:3px;color:var(--muted)}
@media(max-width:600px){.mx-config-info th,.mx-config-info td{padding:10px}}
.mx-campaign-experience h2{margin:0;font-size:var(--text-h3)}
.mx-banner-workflow{display:grid;gap:var(--space-3);min-width:0}
.mx-banner-workflow>div{width:100%;max-width:520px;min-width:0}
.mx-banner-steps{display:flex;align-items:center;flex-wrap:wrap;gap:6px;color:var(--muted)}
.mx-banner-steps [aria-current="step"]{border-color:var(--accent);color:var(--accent)}
.mx-banner-preview{min-width:0}
.mx-banner-placements{list-style:none;padding-inline-start:0}
.mx-banner-preview figure{margin:0}
.mx-banner-preview img{display:block;width:100%;max-width:320px;aspect-ratio:3/4;object-fit:contain;background:var(--background);border-radius:var(--radius-sm)}
.mx-banner-preview figcaption{margin-top:var(--space-2);color:var(--muted);font-size:var(--text-small)}
.mx-banner-empty{max-width:320px;aspect-ratio:3/4;display:grid;place-items:center;margin:0;border:1px dashed var(--line);border-radius:var(--radius-sm);color:var(--muted)}
.mx-banner-actions{display:flex;align-items:flex-start;flex-wrap:wrap;gap:var(--space-2);margin-top:var(--space-3)}
.mx-banner-upload{position:relative;cursor:pointer}
.mx-banner-upload input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.mx-banner-upload:focus-within{outline:2px solid var(--ink);outline-offset:2px}
.mx-banner-upload:has(input:disabled){opacity:.55}
