.mk-wf {
  --wf-ink: var(--ink, #f2f1ee);
  --wf-muted: var(--muted, #b8bbba);
  --wf-surface: var(--surface, #1a1d1f);
  --wf-hover: #282c2e;
  --wf-line: var(--line, #383b3e);
  --wf-accent: var(--orange, #ff762e);
  padding: clamp(62px, 8vw, 108px) 0;
  color: var(--wf-ink);
  background: var(--paper, #101214);
}
html[data-theme="light"] .mk-wf { --wf-hover: #e5e7e3; }
.mk-wf *, .mk-wf *::before, .mk-wf *::after { box-sizing: border-box; }
.mk-wf__inner { width: min(100% - 2 * clamp(20px, 4.8vw, 76px), var(--wf-max-width, 1380px)); margin-inline: auto; }
.mk-wf__kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: .8125rem;
  line-height: 1.4;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.mk-wf__kicker::before { content: ""; width: 23px; height: 3px; background: var(--wf-accent); }
.mk-wf h2 {
  margin: 0 0 clamp(28px, 4vw, 48px);
  color: inherit;
  font-size: clamp(2.25rem, 5.2vw, 5rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -.052em;
}
.mk-wf__layout { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(0, 2fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.mk-wf__tabs { display: grid; border-top: 1px solid var(--wf-line); }
.mk-wf__tabs button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 16px 2px;
  margin: 0;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--wf-line);
  background: transparent;
  color: var(--wf-muted);
  font: inherit;
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  font-weight: 550;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}
.mk-wf__tabs button[aria-selected="true"] { color: var(--wf-ink); font-weight: 720; }
.mk-wf__tabs button[aria-selected="true"]::after { content: ""; flex: 0 0 8px; height: 8px; background: var(--wf-accent); }
.mk-wf__tabs button:hover { color: var(--wf-ink); background: var(--wf-hover); }
.mk-wf :is(button, a):focus-visible { outline: 3px solid var(--wf-accent); outline-offset: 3px; }
.mk-wf__panel[hidden] { display: none !important; }
.mk-wf__image {
  display: grid;
  position: relative;
  place-items: center;
  aspect-ratio: 2 / 1;
  padding: clamp(8px, 1.4vw, 19px);
  border: 1px solid var(--wf-line);
  background: var(--wf-surface);
  cursor: zoom-in;
}
.mk-wf__image img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.mk-wf__zoom {
  display: grid;
  place-items: center;
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 33px;
  height: 33px;
  border: 1px solid #a3a7a0;
  background: var(--wf-surface);
  color: var(--wf-ink);
}
.mk-wf__zoom::before, .mk-wf__zoom::after { content: ""; grid-area: 1 / 1; width: 13px; height: 1.5px; background: currentColor; }
.mk-wf__zoom::after { transform: rotate(90deg); }
.mk-wf__image:hover .mk-wf__zoom { background: var(--wf-accent); border-color: var(--wf-accent); }
.mk-wf__panel p { margin: 16px 0 0; max-width: 69ch; font-size: clamp(1rem, 1.4vw, 1.125rem); line-height: 1.5; color: var(--wf-muted); }
.mk-wf__dialog { width: fit-content; max-width: min(96vw, 1600px); max-height: 96dvh; padding: 0; border: 1px solid var(--wf-line); margin: auto; background: var(--wf-surface); color: var(--wf-ink); }
.mk-wf__dialog::backdrop { background: rgb(15 19 17 / .77); }
.mk-wf__dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; gap: 18px; border-bottom: 1px solid var(--wf-line); }
.mk-wf__dialog-head h3 { margin: 0; font-size: 1rem; font-weight: 650; }
.mk-wf__dialog-head form { margin: 0; }
.mk-wf__dialog-head button { margin: 0; border: 1px solid var(--wf-line); border-radius: 0; background: var(--wf-surface); color: var(--wf-ink); padding: 8px 12px; font: inherit; cursor: pointer; }
.mk-wf__dialog-head button:hover { background: var(--wf-hover); }
.mk-wf__dialog-image img { display: block; max-height: calc(96dvh - 70px); max-width: 100%; width: auto; height: auto; object-fit: contain; }
@media (max-width: 720px) {
  .mk-wf__layout { display: block; }
  .mk-wf__tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 16px; }
  .mk-wf__tabs button { min-height: 47px; padding: 10px 12px; font-size: 1rem; }
  .mk-wf__tabs button[aria-selected="true"] { background: var(--wf-hover); }
  .mk-wf__tabs button:nth-child(odd) { border-right: 1px solid var(--wf-line); }
  .mk-wf__image { aspect-ratio: 1.6 / 1; }
}

/* The printer stays graphite in either theme; its stock always uses dark ink. */
.mk-wf__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.mk-wf__inner#labels { scroll-margin-top: 28px; }
.mk-label {
  --printer-ink: #f0f1ee;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  border: 1px solid #44484a;
  border-radius: 12px;
  overflow: hidden;
  color: var(--printer-ink);
  background: #1a1d1f;
}
.mk-label__toolbar, .mk-label__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px clamp(12px, 2vw, 26px);
}
.mk-label__toolbar { border-bottom: 1px solid #393c3e; }
.mk-label__toolbar h3 { margin: 0; color: var(--printer-ink); font-size: 1rem; font-weight: 660; letter-spacing: -.02em; }
.mk-label__switch { display: inline-flex; gap: 2px; margin: 0; padding: 2px; background: #101214; border: 1px solid #4c5051; border-radius: 7px; }
.mk-label__switch label { display: block; position: relative; cursor: pointer; }
.mk-label__switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.mk-label__switch span { display: block; padding: 7px 12px; border-radius: 4px; font-size: .875rem; font-weight: 670; line-height: 1.2; color: #d2d4d1; }
.mk-label__switch input:checked + span { color: #1b1410; background: #ff762e; }
.mk-label__switch input:focus-visible + span { outline: 2px solid white; outline-offset: 2px; }
.mk-label__bay {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  overflow: hidden;
  padding: clamp(21px, 3.4vw, 42px) clamp(12px, 3.6vw, 45px) clamp(25px, 3.3vw, 45px);
  background:
    radial-gradient(ellipse at 50% 3%, #3d4142, transparent 63%),
    repeating-linear-gradient(0deg, transparent 0 3px, #ffffff03 4px),
    #151718;
}
.mk-label__bay::before, .mk-label__bay::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 19%;
  bottom: 19%;
  width: 4px;
  background: repeating-linear-gradient(0deg, #868c8d66 0 1px, transparent 1px 12px);
}
.mk-label__bay::before { left: 12px; }
.mk-label__bay::after { right: 12px; }
.mk-label__feed { position: relative; width: min(100%, 455px); }
.mk-label__feed::before {
  content: "";
  position: absolute;
  inset: -5px -9px auto;
  height: 10px;
  border: 1px solid #55595a;
  border-radius: 4px;
  background: #070808;
  box-shadow: 0 2px 0 #65696a70, inset 0 2px 4px black;
}
.mk-label__paper {
  position: relative;
  transform-origin: center top;
  padding: clamp(14px, 2vw, 25px) clamp(16px, 2.6vw, 32px) clamp(13px, 1.7vw, 21px);
  border-radius: 1px 1px 3px 2px;
  margin: 0;
  color-scheme: light;
  color: #1b1b18;
  background: linear-gradient(180deg, #d4cbb5 0, #f2eada 9px, #faf4e6 38%, #f4ecd9 100%);
  box-shadow: 0 14px 22px -8px #000d, inset 0 0 0 1px #fff5;
}
.mk-label__mast, .mk-label__title, .mk-label__notation { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mk-label__mast { border-bottom: 1px solid currentColor; padding-bottom: 8px; }
.mk-label__mast strong { font-size: .94rem; line-height: 1; letter-spacing: -.065em; font-weight: 820; }
.mk-label__mast span, .mk-label__fields dt, .mk-label__notation { font: 600 .75rem/1.25 var(--mono); text-transform: uppercase; letter-spacing: .07em; }
.mk-label__title { padding: 8px 0; line-height: 1.08; border-bottom: 1px solid currentColor; }
.mk-label__title b { font-size: clamp(1.9rem, 3.6vw, 3.4rem); letter-spacing: -.065em; font-weight: 770; }
.mk-label__title span { font: 500 clamp(1.85rem, 3.2vw, 2.9rem)/1 var(--mono); letter-spacing: -.09em; }
.mk-label__fields { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; padding: 10px 0; margin: 0; border-bottom: 1px solid currentColor; }
.mk-label__fields dt, .mk-label__fields dd { margin: 0; }
.mk-label__fields dd { margin-top: 3px; font-size: clamp(.95rem, 1.7vw, 1.25rem); font-weight: 730; line-height: 1.2; }
.mk-label__notation { margin: 8px 0; }
.mk-label__code img {
  --label-module-grid: 180px;
  display: block;
  width: 100%;
  /* Keep the 180 GS1 modules aligned to device pixels on small displays. */
  width: max(180px, round(down, 100%, var(--label-module-grid)));
  max-width: 100%;
  height: clamp(44px, 5vw, 65px);
  margin-inline: auto;
}
@media (min-resolution: 2dppx) { .mk-label__code img { --label-module-grid: 90px; } }
@media (min-resolution: 3dppx) { .mk-label__code img { --label-module-grid: 60px; } }
.mk-label__digits { display: block; margin-top: 5px; text-align: center; font: 560 clamp(.78rem, 1.45vw, 1.08rem)/1.2 var(--mono); letter-spacing: .035em; }
.mk-label__foot { border-top: 1px solid #3a3e40; }
.mk-label__format { color: #c5c8c6; font: 500 .84rem/1.25 var(--mono); }
.mk-label__download { color: var(--printer-ink); font-size: .9rem; font-weight: 670; text-underline-offset: 4px; }
.mk-label__download:hover { color: #ff9864; }
@media (max-width: 470px) {
  .mk-label__bay { padding-inline: 16px; }
  .mk-label__bay::before, .mk-label__bay::after { display: none; }
  .mk-label__toolbar, .mk-label__foot { padding: 10px 12px; }
  .mk-label__switch span { padding: 9px 10px; }
  .mk-label__fields { grid-template-columns: .84fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .mk-label__paper { animation: none !important; transition: none !important; }
}
