/* A dark terminal fascia frames the editable paper manifest. */
.workflow-lab {
  --ink: #263c31;
  --paper: #faf3e0;
  --copper: #f3c194;
  --desk-gutter: clamp(.9rem, 2vw, 1.65rem);
  container-type: inline-size;
  width: 100%;
  min-width: 0;
  scroll-margin-top: 6rem;
  overflow: hidden;
  border: 1px solid #879080;
  border-radius: 12px;
  background: #20372e;
  box-shadow: 0 16px 32px -20px #0d1d16;
  text-align: start;
}
.workflow-lab svg {
  width: 1rem; height: 1rem; flex: none; fill: none;
  stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round;
}
.lab-masthead {
  display: grid; position: relative; isolation: isolate; align-items: center;
  min-height: 8.1rem; padding: 1rem var(--desk-gutter); overflow: hidden;
  background: linear-gradient(115deg, #1e342b 8%, #334c40 74%, #576451);
  border-bottom: 3px solid #ba8759;
}
.lab-heading { z-index: 1; width: fit-content; max-width: 58%; }
.lab-brand { display: flex; align-items: center; gap: .42rem; color: #ebe4c9; font-size: .77rem; font-weight: 650; }
.lab-brand svg { width: .95rem; height: .95rem; color: var(--copper); }
#top .workflow-lab #lab-title {
  margin: .45rem 0 .4rem; padding: 0; color: #fff5dd !important;
  font: 400 clamp(1.85rem, 7.1cqw, 2.6rem)/1.02 Georgia, serif;
  letter-spacing: -.045em; overflow-wrap: normal; word-break: normal;
}
#lab-title::after, #lab-title::before { content: none !important; }
.lab-sample { display: inline-flex; gap: .42rem; align-items: center; color: #d7dfcd; font-size: .74rem; }
.lab-sample::before { content: ''; width: .46rem; height: .46rem; border: 1px solid #e7c8a6; transform: rotate(45deg); }
.lab-illustration {
  position: absolute; z-index: -1; right: 0; bottom: 0;
  width: 58%; height: 100%; pointer-events: none;
}
.lab-illustration img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: right bottom; }
.lab-sheet {
  color-scheme: light; color: var(--ink); padding: 1rem var(--desk-gutter);
  background: linear-gradient(110deg, #fcf7e9, #eee6d0);
  border-bottom: 1px solid #b9a17d;
}
.lab-sheet-head, .lab-sheet-meta, .lab-actions { display: flex; align-items: center; flex-wrap: wrap; }
.lab-sheet-head { justify-content: space-between; gap: .2rem .6rem; }
.lab-sheet-head > strong { font: 500 clamp(1.22rem, 4.6cqw, 1.53rem)/1.15 Georgia, serif; letter-spacing: -.025em; color: #283d30 !important; }
.lab-doc-id, .lab-record-id, .lab-selection-id, .lab-weight strong, .lab-sheet-meta b { font-family: ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; }
.lab-doc-id { color: #715538; font-size: .69rem; letter-spacing: .025em; white-space: nowrap; }
.lab-sheet-meta { gap: .15rem .95rem; border-bottom: 1px dashed #b6ae97; padding: .4rem 0 .65rem; color: #475345; font-size: .78rem; }
.lab-sheet-meta b { color: #2a4034; font-weight: 600; }
.lab-destination-count { display: inline-flex; align-items: center; gap: .3rem; }
.lab-destination-count progress { width: 2.4rem; height: .29rem; appearance: none; border: 0; overflow: hidden; border-radius: .15rem; background: #ccc8b5; }
.lab-destination-count progress::-webkit-progress-bar { background: #ccc8b5; }
.lab-destination-count progress::-webkit-progress-value { background: #516c50; }
.lab-destination-count progress::-moz-progress-bar { background: #516c50; }
#top .workflow-lab .lab-instructions, #top .workflow-lab .lab-static { color: #435043 !important; font: inherit; font-size: .8rem; line-height: 1.4; margin: .65rem 0 .45rem; }
.lab-record-list {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(min(4.75rem,100%),1fr)); gap: 5px;
}
.workflow-lab .lab-record {
  appearance: none; display: grid; align-content: center; gap: .15rem; min-width: 0; min-height: 3rem;
  text-align: left; padding: .35rem .5rem; border: 1px solid #adae99; border-radius: 4px;
  background: #f9f5e8; color: #2e4235; cursor: pointer; box-shadow: none; transform: none;
}
.lab-record-id { font-size: .8rem; font-weight: 700; line-height: 1.2; }
.lab-record-city { font-size: .72rem; line-height: 1.2; overflow-wrap: anywhere; }
.workflow-lab .lab-record[aria-current="true"] { background: #30493a; color: #fff5df; border-color: #30493a; box-shadow: inset 0 -3px #cc9b6d; }
.lab-record[data-missing="true"] .lab-record-city::before { content: '!'; border: 1px solid currentColor; border-radius: 50%; display: inline-grid; place-items: center; width: .82rem; height: .82rem; margin-right: .2rem; font: 700 .63rem/1 sans-serif; }
.lab-editor { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .85rem; align-items: end; margin-top: .7rem; }
.lab-destination, .lab-weight, .lab-config label { display: grid; min-width: 0; gap: .23rem; }
.lab-editor label > span:first-child, .lab-weight > span, .lab-config label > span:first-child { font-size: .74rem; font-weight: 600; line-height: 1.2; }
.lab-selection-id { font-size: .69rem; font-weight: 500; color: #526151; margin-left: .2rem; }
.lab-weight { min-width: 4.3rem; }
.lab-weight strong { display: flex; align-items: center; min-height: 2.45rem; color: #283d30 !important; font-weight: 650; font-size: .89rem; }
.lab-select-wrap { display: block; position: relative; min-width: 0; }
.lab-select-wrap select {
  display: block; appearance: none; width: 100%; min-width: 0; min-height: 2.45rem;
  border: 1px solid #959c86; border-radius: 4px; padding: .32rem 1.5rem .32rem 1.95rem;
  background-color: #fffcf2 !important; color: #243b2e !important; border-color: #818d76 !important;
  font: inherit; font-size: .88rem; font-weight: 600; line-height: 1.3; cursor: pointer;
}
.lab-select-wrap > svg { position: absolute; left: .59rem; top: 50%; transform: translateY(-50%); width: .94rem; height: .94rem; pointer-events: none; }
.lab-select-wrap::after {
  content: ''; position: absolute; right: .65rem; top: calc(50% - .2rem); width: .38rem; height: .38rem;
  border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none;
}
.lab-console { color-scheme: dark; padding: .88rem var(--desk-gutter) 1rem; color: #f1ead7; }
.lab-config { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .5rem; }
.lab-config label > span:first-child { color: #d5dccb; }
.lab-config select { background-color: #2b4236 !important; border-color: #84937f !important; color: #fff7e4 !important; }
.lab-config .lab-select-wrap > svg { color: var(--copper); }
.lab-actions { gap: .6rem; margin-top: .78rem; }
.lab-actions button, .workflow-lab .lab-export {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.65rem;
  padding: .4rem .85rem; border: 1px solid transparent; border-radius: 4px; font: inherit; font-size: .89rem;
  font-weight: 660; cursor: pointer; box-shadow: none; text-decoration: none;
}
.lab-actions [data-demo-run] { background: #efc192; color: #242e24; border-color: #f6d1a6; }
.lab-actions [data-demo-reset] { background: transparent; color: #e4e4d4; }
.lab-actions button:active, .lab-record:active { transform: translateY(1px); }
.workflow-lab :is(select,button,a):focus-visible { outline: 3px solid #ffd49c !important; outline-offset: 2px; }
.lab-sheet :is(select,button):focus-visible { outline-color: #744526 !important; }
.workflow-lab .lab-readout { margin-top: .95rem; padding: .8rem .9rem; border: 1px solid #788571; border-radius: 4px; background: #f2eddd; color: #2c4031; color-scheme: light; }
.lab-readout > strong { color: #253b2e !important; font: 500 1.22rem/1.18 Georgia,serif; }
#top .lab-readout > p { color: #425144 !important; font-size: .82rem; line-height: 1.45; margin: .35rem 0 0; }
.workflow-lab[data-stage="ready"] .lab-readout { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); padding: 0; border: 0; margin: 0; }
.lab-preview:not(:empty) { margin-top: .65rem; }
.lab-preview table, .lab-static-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .79rem; }
.lab-preview :is(th,td), .lab-static-table :is(th,td) { text-align: left; padding: .37rem .3rem; color: #2a4032; border-block-start: 1px solid #b9c1ac; }
.lab-preview thead th, .lab-static-table thead th { font-size: .72rem; color: #526052; }
.lab-preview tbody th { font: 650 .77rem/1.4 ui-monospace,Consolas,monospace; }
.lab-repair { background: #f9e3c1; color: #664122; border: 1px solid #ab8056; padding: .3rem .48rem; border-radius: 3px; cursor: pointer; }
.workflow-lab .lab-repair:focus-visible { outline-color: #744526 !important; }
.lab-metric { display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; }
.lab-metric strong { font: 500 1.5rem Georgia,serif; color: #263d2f !important; }
.lab-metric span, .lab-draft { font-size: .8rem; }
.workflow-lab .lab-draft > strong { color: #263d2f !important; }
.lab-chart, .lab-draft ul { display: grid; gap: .42rem; margin: .6rem 0 0; padding: 0; list-style: none; }
.lab-chart-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .14rem .45rem; font-size: .78rem; }
.lab-chart-row progress { grid-column: 1/-1; width: 100%; height: 5px; appearance: none; border: none; border-radius: 1px; background: #c8cfbd; }
.lab-chart-row progress::-webkit-progress-bar { background: #c8cfbd; }
.lab-chart-row progress::-webkit-progress-value { background: #527356; }
.lab-chart-row progress::-moz-progress-bar { background: #527356; }
.lab-draft li { display: flex; gap: .7rem; border-block-start: 1px solid #bec5b4; padding-top: .25rem; }
.workflow-lab .lab-export { margin-top: .55rem; padding-inline: .55rem; background: transparent; color: #ffe0b7; text-decoration: underline; text-underline-offset: .19em; }
.workflow-lab [hidden] { display: none; }
@media (hover:hover) {
  .lab-actions [data-demo-run]:hover { background: #ffdaa9; }
  .lab-actions [data-demo-reset]:hover, .lab-export:hover { background: #354d3e; }
  .lab-select-wrap select:hover { border-color: currentColor !important; }
  .lab-record:not([aria-current="true"]):hover { border-color: #65795f; background: #ebe8d6; }
}
@media (prefers-reduced-motion:no-preference) {
  .lab-preview:not(:empty) { animation: print-manifest .17s ease-out; }
  @keyframes print-manifest { from { opacity: .45; transform: translateY(-3px); } }
}
@container (max-width: 27rem) {
  .lab-config { gap: .33rem; }
  .lab-config .lab-select-wrap > svg { display: none; }
  .lab-config select { padding-left: .46rem; font-size: .81rem; }
  .lab-masthead { min-height: 7.1rem; }
  .lab-heading { max-width: 64%; }
  .lab-illustration { width: 49%; }
}
@container (max-width: 21rem) {
  .lab-heading { max-width: 100%; }
  .lab-illustration { width: 36%; }
  .lab-config { grid-template-columns: 1fr; gap: .32rem; }
  .lab-config label { grid-template-columns: 4rem minmax(0,1fr); align-items: center; }
  .lab-config .lab-select-wrap > svg { display: block; }
  .lab-config select { padding-left: 1.95rem; }
  .lab-record-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lab-editor { gap: .4rem; }
}
.workflow-lab:not([data-interactive="true"]) .lab-interactive { visibility: hidden; }
@media (scripting:none) { .workflow-lab .lab-interactive { display: none; } }
@media (forced-colors:active) {
  .workflow-lab .lab-record[aria-current="true"] { outline: 2px solid Highlight; outline-offset: -3px; }
  .lab-select-wrap select { appearance: auto; }
  .lab-select-wrap::after { display: none; }
}
