:root {
  --ink: #252824;
  --muted: #62665e;
  --line: #d6d6cc;
  --paper: #fffef8;
  --blue: #354cc7;
  --mono: "IBM Plex Mono", Consolas, "Courier New", monospace;
  --serif: "Iowan Old Style", Georgia, serif;
  --ui: "DM Sans", "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f6f5ee;
  color: var(--ink);
  font: 15px/1.5 var(--ui);
}
button,
select,
input,
textarea {
  font: inherit;
}
button,
a,
select {
  touch-action: manipulation;
}
button,
a {
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
a {
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #5268ef;
  outline-offset: 3px;
}
button {
  line-height: 1.25;
}
svg {
  flex: none;
  vertical-align: middle;
}
.frame {
  width: min(1320px, calc(100% - clamp(36px, 8vw, 144px)));
  margin: auto;
}
.top {
  background: #242824;
  color: #fff;
}
.mast {
  height: 63px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 21px;
  font-weight: 640;
  letter-spacing: -1px;
}
.environment {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  font: 12px var(--mono);
  color: #e4e7dc;
}
.environment i,
.captured i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b1d394;
}
.navband {
  background: #fcfbf5;
  border-bottom: 1px solid var(--line);
}
.navwrap,
nav {
  display: flex;
  align-items: center;
}
.navwrap {
  justify-content: space-between;
  gap: 12px;
}
nav {
  gap: clamp(12px, 2.3vw, 38px);
}
nav a {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 51px;
  font-weight: 550;
  color: #575d55;
  font-size: 14px;
  position: relative;
}
nav a[aria-current] {
  color: var(--blue);
}
nav a[aria-current]:after {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--blue);
  content: "";
}
.revision,
.meta,
.case-id,
.hitmeta {
  font: 12px/1.5 var(--mono);
  color: var(--muted);
}
.meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.revision {
  white-space: nowrap;
}
.kicker,
.stagehead,
.slipfoot {
  font: 600 11px/1.4 var(--mono);
  letter-spacing: 0.095em;
  text-transform: uppercase;
}
.kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #424b3e;
}
.case-mark {
  width: 9px;
  height: 9px;
  background: #c47a35;
  border-radius: 2px;
}
.case-id {
  font-size: 11px;
  letter-spacing: 0.07em;
  color: #71756b;
}
.incident-head,
.pagehead {
  margin: 33px 0 27px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font: normal clamp(35px, 3.65vw, 58px)/1.11 var(--serif);
  letter-spacing: -0.047em;
  margin: 9px 0 10px;
}
.incident-head h1 {
  font: 600 clamp(24px, 2.3vw, 34px)/1.2 var(--ui);
  letter-spacing: -0.025em;
}
h2 {
  font: normal 23px/1.2 var(--serif);
  letter-spacing: -0.035em;
}
h3,
legend {
  font-size: 16px;
  font-weight: 650;
}
.incident-head p,
.pagehead p,
.empty p,
.formhint {
  color: var(--muted);
  line-height: 1.55;
}
.deskgrid {
  display: grid;
  grid-template-columns: minmax(0, 2.55fr) minmax(255px, 1fr);
  gap: 23px;
  align-items: start;
  margin-bottom: 45px;
}
.bench,
.panel,
.sidebox,
.contract {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fcfbf6;
  min-width: 0;
  overflow: hidden;
}
.bench {
  box-shadow: 0 2px 4px #25282406;
}
.sectionhead,
.sideheading,
.paperhead,
.slipline,
.slipfoot,
.listrow,
.strip,
.arthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}
.sectionhead {
  padding: 16px 21px;
  border-bottom: 1px solid var(--line);
}
.papertray {
  background-color: #eae9df;
  background-image: radial-gradient(#adb09e88 0.7px, transparent 0.8px);
  background-size: 7px 7px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 19px;
  padding: 18px 23px 23px;
  border-bottom: 1px solid var(--line);
}
.paper {
  position: relative;
  background: #fffef8;
  min-width: 0;
  padding: 14px 19px 12px;
  border-top: 3px solid #657a8a;
  filter: drop-shadow(0 2px 2px #2f322b24);
}
.paper:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 1px);
  height: 6px;
  background:
    linear-gradient(135deg, #fffef8 25%, transparent 25%) -4px 0/8px 8px,
    linear-gradient(225deg, #fffef8 25%, transparent 25%) -4px 0/8px 8px;
}
.paper.pickup {
  border-top-color: #b38654;
}
.delivery {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
}
.captured {
  font: 11px var(--mono);
  color: #41634c;
  display: flex;
  align-items: center;
  gap: 5px;
}
.captured i {
  background: #64836a;
  width: 5px;
  height: 5px;
}
.receiptno {
  font: 600 clamp(24px, 2.25vw, 36px)/1.2 var(--mono);
  letter-spacing: -0.07em;
  margin: 11px 0 3px;
}
.slipline {
  font-size: 12px;
  color: #65695e;
}
.slipline strong {
  font: 600 14px var(--mono);
  color: var(--ink);
}
.slipfoot {
  border-top: 1px dashed #cdcec2;
  padding-top: 9px;
  margin-top: 10px;
  color: #73766c;
  font-size: 10px;
}
.barcode {
  height: 14px;
  width: 66px;
  opacity: 0.65;
  background: repeating-linear-gradient(
    90deg,
    #34382f 0 2px,
    transparent 2px 3px,
    #34382f 3px 4px,
    transparent 4px 7px,
    #34382f 7px 10px,
    transparent 10px 12px,
    #34382f 12px 13px,
    transparent 13px 15px
  );
}
.pickup .barcode {
  transform: scaleX(-1);
}
.stagehead,
.drawtoggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 0 21px;
}
.stagehead {
  height: 34px;
  background: #f3f3eb;
  color: #676c61;
  font-size: 10px;
  border-bottom: 1px solid var(--line);
}
.drawtoggle {
  width: 100%;
  text-align: left;
  min-height: 46px;
  border: none;
  background: transparent;
  color: var(--ink);
}
.drawer + .drawer {
  border-top: 1px solid #e0e0d6;
}
.drawtoggle:hover,
.hitrow:hover {
  background: #f2f2e9;
}
.drawname,
.btn,
.textlink,
.pinbtn,
.pinheading,
.strip > div,
.sideheading {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.drawname {
  font-size: 14px;
  font-weight: 600;
}
.drawname svg {
  color: #656b60;
}
.tag {
  display: inline-block;
  border: 1px solid #d7d9ce;
  border-radius: 4px;
  padding: 2px 7px;
  background: #eeefe7;
  font: 11px/1.45 var(--mono);
  color: #4a5144;
  white-space: nowrap;
}
.tag.green {
  background: #edf2e8;
  border-color: #d0dfc9;
  color: #3d6245;
}
.tag.blue {
  background: #ebeffb;
  border-color: #cfd8f4;
  color: #394f87;
}
.tag.neutral {
  background: #f7f7f1;
  color: #565f55;
}
.sideheading {
  display: flex;
  justify-content: flex-start;
}
.sideheading h2 {
  font-size: 22px;
}
.sideheading .tag {
  margin-left: auto;
}
aside {
  display: grid;
  gap: 16px;
}
.contract {
  border-color: #c5cee4;
  background: #eaf0fa;
  padding: 19px 19px 15px;
}
.contract .sideheading {
  color: #273e78;
}
.contract ul {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}
.contract li {
  position: relative;
  padding-left: 18px;
  line-height: 1.46;
  font-size: 14px;
  color: #32405b;
  margin: 10px 0;
}
.contract li:before {
  position: absolute;
  left: 1px;
  top: 0.52em;
  width: 5px;
  height: 5px;
  border: 1px solid #687ca3;
  content: "";
}
.plan {
  display: flex;
  gap: 8px;
  align-items: center;
  border-top: 1px solid #c9d3e6;
  padding-top: 12px;
  color: #465671;
  font-size: 12px;
}
.plan code {
  font: 11px var(--mono);
  background: #dce5f6;
  border-radius: 3px;
  padding: 3px 5px;
  color: #304b85;
}
.sidebox .sideheading {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}
.empty {
  padding: 18px;
  text-align: center;
}
.pinwell {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px dashed #c4c7b9;
  border-radius: 50%;
  margin: 0 auto 6px;
  color: #777d6f;
}
.empty strong {
  font-size: 13px;
}
.empty p {
  font-size: 13px;
  margin: 3px auto 0;
  max-width: 28ch;
}
.sidelink {
  padding: 10px 18px;
  border-top: 1px solid #e0e1d7;
}
.textlink,
.textbtn,
.pinbtn {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
}
.textlink:hover,
.textbtn:hover {
  text-decoration: underline;
}
.textbtn,
.pinbtn {
  background: none;
  border: none;
  padding: 3px 0;
}
.open .drawtoggle {
  background: #edf0fa;
}
.open .drawtoggle > svg:last-child {
  transform: rotate(180deg);
}
.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 15px;
  background: #f1f2ec;
  border-top: 1px solid #d5dacd;
}
.details[hidden] {
  display: none;
}
.artifact,
.pinned {
  min-width: 0;
}
.artifact {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 12px;
  background: #fffef9;
}
.arthead b,
.hitmeta,
.listrow b,
.history > strong {
  font-family: var(--mono);
}
pre {
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
  background: #f3f4ec;
  border: 1px solid #dfe2d6;
  border-radius: 4px;
  padding: 10px;
  font: 12px/1.55 var(--mono);
  margin: 9px 0 0;
  color: #303a33;
}
.pinbtn {
  font-size: 12px;
  gap: 5px;
}
.pinbtn[aria-pressed="true"] {
  color: #3a694f;
}
.pinned {
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
}
.pinned pre {
  max-height: 180px;
}
.pinned > .meta {
  display: block;
}
.pinheading {
  font-size: 13px;
}
.workgrid,
.inspector {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr);
  gap: 22px;
  align-items: start;
  margin-bottom: 24px;
}
.panelbody {
  padding: 22px;
}
.product {
  display: flex;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 20px;
}
.product .meta,
small {
  display: block;
}
.product > b {
  margin-left: auto;
  font-family: var(--mono);
}
.product-icon {
  background: #eeecdf;
  padding: 10px;
  color: #645f4c;
  border-radius: 6px;
}
.choices,
.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.actions {
  margin-top: 22px;
}
.btn {
  justify-content: center;
  background: #fffef9;
  border: 1px solid #bfc4b9;
  border-radius: 5px;
  padding: 9px 13px;
  font-size: 14px;
  font-weight: 550;
}
.btn:hover {
  background: #f0f0e7;
}
.btn[aria-pressed="true"] {
  background: #e8edfc;
  border-color: #556acf;
  color: #293eaa;
}
.btn.primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.btn.primary:hover {
  background: #283caa;
}
.btn.quiet {
  background: transparent;
}
.list {
  padding-top: 0;
  padding-bottom: 0;
}
.listrow,
.history {
  padding: 15px 0;
}
.listrow + .listrow,
.history + .history {
  border-top: 1px solid var(--line);
}
small,
.formhint {
  font-size: 13px;
  color: var(--muted);
}
.strip {
  padding: 16px 20px;
  background: #eeefe5;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 32px;
}
.strip > div {
  flex-wrap: wrap;
}
.inspector {
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.7fr);
}
.hitlist {
  max-height: 62vh;
  overflow: auto;
}
.hitrow {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 11px 17px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #dedfd4;
}
.hitrow small {
  font: 11px var(--mono);
  margin-top: 4px;
}
.hitrow svg {
  transform: rotate(-90deg);
}
.hitrow[aria-pressed="true"] {
  background: #e9eefb;
  color: #33468e;
  box-shadow: inset 3px 0 var(--blue);
}
.hitmeta {
  padding: 12px 21px;
  background: #f1f2ea;
}
.single .details,
#desk-report {
  grid-template-columns: minmax(0, 1fr);
}
.field {
  display: block;
  margin-bottom: 18px;
}
.field span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}
select,
input,
textarea {
  display: block;
  width: 100%;
  padding: 9px 12px;
  color: var(--ink);
  background: #fffef9;
  border: 1px solid #b9bfb1;
  border-radius: 4px;
}
textarea {
  resize: vertical;
}
fieldset {
  margin: 0 0 15px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
legend {
  margin-bottom: 11px;
  padding: 0;
}
.history .tag {
  margin-left: 10px;
}
dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 3px 8px;
  margin: 8px 0 0;
  font-size: 13px;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
}
.formhint {
  margin: 12px 0;
}
.adapter-panel {
  margin-bottom: 24px;
}
.adapter-head {
  align-items: flex-start;
}
.adapter-head .formhint {
  margin: 3px 0 0;
}
.adapter-controls,
.source-select {
  display: flex;
  align-items: center;
  gap: 9px;
}
.source-select label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.source-select select {
  width: auto;
  padding: 6px 26px 6px 8px;
  font: 12px var(--mono);
}
.adapter-body {
  padding: 16px 21px 21px;
  background: #eef0e9;
}
.adapter-source {
  max-height: 420px;
  margin: 0;
  white-space: pre-wrap;
  overflow: auto;
  overflow-wrap: anywhere;
  background: #20251f;
  border-color: #151914;
  color: #e4eadb;
  font-size: 12px;
}
.pagehead {
  margin-bottom: 25px;
}
main:focus {
  outline: none;
}
#feedback:not(:empty) {
  position: fixed;
  z-index: 5;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #263b2e;
  color: white;
  border-radius: 6px;
  padding: 10px 18px;
  box-shadow: 0 3px 14px #0002;
}
#feedback.error:not(:empty) {
  background: #813c2e;
}
@media (min-width: 1500px) {
  .incident-head,
  .pagehead {
    margin-top: 42px;
    margin-bottom: 32px;
  }
  .papertray {
    padding: 23px 28px 29px;
  }
  .paper {
    padding: 18px 24px 14px;
  }
  .drawtoggle {
    min-height: 50px;
  }
}
@media (max-width: 1020px) {
  .frame {
    width: calc(100% - 40px);
  }
  .deskgrid {
    grid-template-columns: minmax(0, 2fr) minmax(222px, 1fr);
    gap: 15px;
  }
  .stagehead,
  .drawtoggle {
    padding-inline: 14px;
  }
  .papertray {
    gap: 12px;
    padding-inline: 15px;
  }
  .paper {
    padding-inline: 12px;
  }
  .revision {
    display: none;
  }
  .contract {
    padding: 15px;
  }
}
@media (max-width: 760px) {
  .deskgrid,
  .workgrid,
  .inspector {
    grid-template-columns: minmax(0, 1fr);
  }
  .frame {
    width: calc(100% - 30px);
  }
  .mast {
    height: 55px;
  }
  .navwrap {
    width: 100%;
    overflow: auto;
  }
  nav {
    gap: 23px;
    padding: 0 15px;
  }
  nav a {
    font-size: 13px;
    height: 46px;
  }
  .incident-head,
  .pagehead {
    margin: 24px 0 20px;
  }
  .contract ul {
    margin: 12px 0;
  }
  .workgrid,
  .inspector {
    gap: 14px;
  }
  .hitlist {
    max-height: 240px;
  }
  .details {
    gap: 6px;
    padding: 6px;
  }
  .artifact {
    padding: 8px;
  }
  .arthead {
    flex-wrap: wrap;
  }
  .strip {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .stagehead,
  .drawtoggle {
    gap: 4px;
    padding-inline: 10px;
  }
  .drawname {
    gap: 5px;
    font-size: 13px;
  }
  .drawname svg {
    width: 14px;
  }
  .tag {
    font-size: 10px;
    padding: 2px 5px;
  }
  .delivery {
    font-size: 12px;
    gap: 4px;
  }
  .papertray {
    gap: 10px;
    padding: 12px 10px 18px;
  }
  .paper {
    padding: 10px;
  }
  .paperhead {
    gap: 3px;
    flex-wrap: wrap;
  }
  .sectionhead {
    padding: 13px 15px;
  }
  .panelbody {
    padding: 15px;
  }
  .adapter-head {
    gap: 12px;
    flex-wrap: wrap;
  }
  .adapter-controls {
    width: 100%;
    justify-content: space-between;
  }
  .adapter-body {
    padding: 10px;
  }
  .environment {
    font-size: 10px;
  }
}
@media (max-width: 410px) {
  .frame {
    width: calc(100% - 20px);
  }
  .navwrap {
    width: 100%;
  }
  .paperhead .captured {
    font-size: 10px;
  }
  .delivery svg {
    width: 13px;
  }
  .slipline {
    font-size: 10px;
  }
  .receiptno {
    font-size: 25px;
  }
  .details pre {
    font-size: 11px;
  }
  .papertray {
    gap: 8px;
  }
  .drawtoggle {
    min-height: 45px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .open .details {
    animation: reveal 0.15s ease-out;
  }
  @keyframes reveal {
    from {
      opacity: 0.25;
      transform: translateY(-4px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
.interaction-notice {
  margin-block: 16px;
  font-size: 12px;
  color: var(--muted);
}

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.editor-grid .sectionhead { gap: 12px; flex-wrap: wrap; }
.editor-grid .sectionhead select { width: auto; }
.source-editor, .execution-output {
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
  tab-size: 2;
}
.source-editor { min-height: 620px; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-all; overflow-x: hidden; overflow-y: auto; }
.execution-output {
  padding: 14px;
  margin-block: 12px;
  background: #20251f;
  color: #e4eadb;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  max-height: 360px;
  overflow: auto;
}
.execution-output span { color: #a5b69f; }
.execution-output .console-error { color: #ffb9ad; }
.execution-output .console-warn { color: #ffe0a1; }
.console-run + .console-run { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 20px; }
.console-run .arthead { flex-wrap: wrap; gap: 12px; }
.execution-checks { width: 100%; border-collapse: collapse; font-size: 12px; }
.execution-checks th, .execution-checks td { padding: 8px 4px; text-align: left; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .editor-grid { grid-template-columns: minmax(0, 1fr); }
  .source-editor { min-height: 480px; }
}

.journey-panel { margin-bottom: 22px; }
#journeyEditor { width:100%; font: 13px/1.5 Consolas, monospace; white-space:pre-wrap; overflow-wrap:anywhere; }
.journey-trace details { margin-top:16px; }
.journey-trace summary, .journey-panel summary { cursor:pointer; padding:8px 0; }
.trace-scroll { max-width:100%; overflow:auto; }
.trace-scroll table { width:100%; border-collapse:collapse; font-size:12px; }
.trace-scroll td, .trace-scroll th { padding:7px; border-bottom:1px solid var(--line,#ddd); text-align:left; }
.journey-trace pre { white-space:pre-wrap; overflow-wrap:anywhere; max-width:100%; }
.editor-grid > * { min-width:0; }
/* Fixture I and its local reviewer view. */
.i-records{margin-bottom:24px}.i-records summary{cursor:pointer;padding:18px 22px;border-bottom:1px solid var(--line,#ddd)}.i-records pre{white-space:pre-wrap;overflow-wrap:anywhere}.review-main{max-width:1280px;margin:36px auto;padding:24px}.review-main>h2{margin:20px 0}.review-main .panel{margin-top:24px}.review-main h3{margin:24px 0 12px}.review-main p{margin:12px 0}.review-main summary{cursor:pointer;padding:14px 0}.review-main pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:440px;overflow:auto}.review-table{overflow:auto;margin:24px 0}.review-table table{width:100%;border-collapse:collapse}.review-table th,.review-table td{text-align:left;padding:16px;border-bottom:1px solid #dedfd6;vertical-align:top}.review-table td:first-child{min-width:160px;font-weight:600}.review-table td:nth-child(2){min-width:210px}
