/* VENDORED from the pdfblah package (pdfblah/web/tool.css). Do NOT edit here; edit in
   the OSS repo and re-sync with tools/vendor-web.sh so hosted and desktop never drift. */
/* pdfblah workbench — 3-pane layout (P1). Scoped under .wb. */
.wb {
  --primary: #ff6a3e; --head: #1a1a1a; --body: #4e4b66; --muted: #8b8799;
  --cream: #fffcf3; --white: #fff; --line: #efe4de; --panel: #faf6ef;
  position: fixed; inset: 0; display: grid; grid-template-columns: 264px 1fr 340px;
  background: var(--cream); color: var(--body);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wb.wb-drag::after { content: "Drop to add"; position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px;
  color: var(--primary); background: rgba(255, 252, 243, .82); border: 3px dashed var(--primary); }
.wb-eyebrow { text-transform: uppercase; letter-spacing: .09em; font-size: 11px; font-weight: 700; color: var(--muted); }

/* left rail */
.wb-left { border-right: 1px solid var(--line); background: var(--white); display: flex; flex-direction: column; overflow: hidden; }
.wb-lhead { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px; }
.wb-add { border: 1px solid var(--line); background: var(--white); color: var(--head); font-weight: 700; font-size: 12.5px;
  border-radius: 7px; padding: 5px 11px; cursor: pointer; }
.wb-add:hover { border-color: var(--primary); color: var(--primary); }
.wb-files { padding: 4px 10px 8px; overflow-y: auto; max-height: 42%; }
.wb-file { display: flex; align-items: flex-start; gap: 8px; padding: 8px; border-radius: 9px; cursor: default; }
.wb-file.active { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.wb-file.muted { opacity: .5; }
.wb-file.err .wb-fsub { color: #c0392b; }
.wb-inc { flex: none; padding-top: 2px; }
.wb-inc input { accent-color: var(--primary); width: 15px; height: 15px; }
.wb-fmeta { flex: 1; min-width: 0; cursor: pointer; }
.wb-fn { font-size: 13px; font-weight: 600; color: var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-fsub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.wb-scan { background: #fdeede; color: #c56a16; font-weight: 700; font-size: 9.5px; padding: 1px 6px; border-radius: 999px; margin-left: 4px; }
.wb-frm { flex: none; border: none; background: none; color: var(--muted); font-size: 17px; line-height: 1; cursor: pointer; padding: 0 2px; }
.wb-frm:hover { color: #c0392b; }
.wb-lhint { padding: 2px 18px 10px; font-size: 10.5px; color: var(--muted); }
.wb-pageslabel { padding: 12px 16px 8px; border-top: 1px solid var(--line); }
.wb-pages { flex: 1; overflow-y: auto; padding: 0 12px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
.wb-thumb { position: relative; cursor: pointer; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.wb-thumb.on { box-shadow: 0 0 0 2px var(--primary); }
.wb-thumbimg { aspect-ratio: 0.77; background: var(--white) center/cover no-repeat; }
.wb-thumbn { position: absolute; bottom: 3px; right: 4px; font-size: 9.5px; font-weight: 700; color: var(--muted);
  background: rgba(255, 255, 255, .85); border-radius: 4px; padding: 0 4px; }

/* center */
.wb-center { display: flex; flex-direction: column; overflow: hidden; }
.wb-stagewrap { position: relative; flex: 1; display: flex; min-height: 0; }
/* the veil locks only the PAGE while steps apply — the chrome (zoom, Before/After, nav)
   and the rail stay usable */
.wb-veil { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 252, 243, .45); }
.wb-veil[hidden] { display: none; }  /* explicit display beats the UA [hidden] rule */
.wb-veil span { font-size: 12.5px; font-weight: 700; color: var(--head); background: var(--white);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; box-shadow: 0 4px 16px rgba(26, 26, 26, .12); }
.wb-veil span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 999px;
  background: var(--primary); margin-right: 8px; animation: wbpulse 1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .wb-veil span::before { animation: none; } }
.wb-viewtop { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line); min-height: 30px; }
.wb-vname { font-size: 13px; font-weight: 600; color: var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-viewseg { margin-left: auto; display: inline-flex; background: var(--panel); border-radius: 8px; padding: 3px; }
.wb-vbtn { border: none; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 4px 12px; border-radius: 6px; cursor: pointer; }
.wb-vbtn.on { background: var(--white); color: var(--head); box-shadow: 0 1px 3px rgba(26, 26, 26, .1); }
.wb-zoom { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wb-busy { width: 8px; height: 8px; border-radius: 999px; background: var(--primary); animation: wbpulse 1s ease-in-out infinite; }
@keyframes wbpulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .wb-busy { animation: none; opacity: .7; } }
.wb-zctl { display: inline-flex; align-items: center; gap: 2px; }
.wb-zbtn { border: 1px solid var(--line); background: var(--white); color: var(--head); font: inherit; font-size: 12px; font-weight: 600;
  border-radius: 6px; min-width: 24px; height: 24px; padding: 0 6px; cursor: pointer; }
.wb-zbtn:hover { border-color: var(--primary); color: var(--primary); }
.wb-zbtn.on { background: var(--panel); }
.wb-zlabel { font-size: 11.5px; color: var(--muted); min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; }
.wb-errbar { background: #fdeaea; color: #a33327; border-bottom: 1px solid #f3c9c2; font-size: 12px; padding: 7px 20px; }
.wb-stage { flex: 1; overflow: auto; display: flex; align-items: flex-start; justify-content: center; padding: 28px; }
.wb-stagewrap .wb-stage { min-width: 0; }
.wb-page { max-width: 100%; box-shadow: 0 8px 30px rgba(26, 26, 26, .12); border-radius: 3px; background: #fff; }
.wb-empty { margin: auto; text-align: center; color: var(--muted); font-size: 15px; font-weight: 600; display: flex; flex-direction: column; gap: 4px; }
.wb-empty span { font-size: 12.5px; font-weight: 400; }
.wb-loading { margin: auto; color: var(--muted); font-size: 13px; }
.wb-nav { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wb-navb { border: 1px solid var(--line); background: var(--white); color: var(--head); border-radius: 7px; width: 30px; height: 30px;
  font-size: 16px; cursor: pointer; }
.wb-navb:disabled { opacity: .4; cursor: default; }
.wb-navb:not(:disabled):hover { border-color: var(--primary); color: var(--primary); }

/* right rail */
.wb-right { border-left: 1px solid var(--line); background: var(--white); display: flex; flex-direction: column; overflow: hidden; }
.wb-tabs { display: flex; gap: 4px; padding: 14px 16px 0; border-bottom: 1px solid var(--line); }
.wb-tab { border: none; background: none; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--muted); padding: 6px 4px 12px; margin-right: 12px; cursor: pointer; border-bottom: 2px solid transparent; }
.wb-tab.on { color: var(--head); border-bottom-color: var(--primary); }
.wb-rightbody { flex: 1; overflow-y: auto; padding: 18px; }
.wb-soon { font-size: 13px; color: var(--muted); line-height: 1.55; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.wb-soon b { color: var(--head); }
.wb-count { background: var(--panel); color: var(--muted); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; margin-left: 6px; }
.wb-tab.on .wb-count { background: #fdeede; color: var(--primary); }

/* the Stack */
.wb-steps { display: flex; flex-direction: column; gap: 10px; }
.wb-stackhint { font-size: 12.5px; color: var(--muted); line-height: 1.55; background: var(--panel); border: 1px dashed var(--line); border-radius: 12px; padding: 14px 16px; }
.wb-stackhint b { color: var(--body); }
.wb-step { background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.wb-step.dropb { box-shadow: 0 -3px 0 -1px var(--primary); }
.wb-step.dropa { box-shadow: 0 3px 0 -1px var(--primary); }
.wb-step.brk { border-color: #d65b4d; background: #fdf3f1; }
.wb-step.brk .wb-sn { background: #f9ddd7; color: #b03e2e; }
.wb-step.brk .wb-ssum { color: #b03e2e; font-weight: 600; }
.wb-step.open { border-color: var(--primary); box-shadow: 0 2px 10px rgba(255, 106, 62, .08); }
.wb-step.off .wb-smeta { opacity: .45; }
.wb-shead { display: flex; align-items: center; gap: 10px; padding: 11px 12px; cursor: pointer; }
.wb-sn { flex: none; width: 20px; height: 20px; border-radius: 999px; background: var(--panel); color: var(--muted);
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: grab; }
.wb-step.open .wb-sn { background: #fdeede; color: var(--primary); }
.wb-smeta { flex: 1; min-width: 0; }
.wb-stitle { font-size: 13px; font-weight: 700; color: var(--head); }
.wb-ssum { font-size: 11.5px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-ssum.warn { color: #c56a16; font-weight: 600; }
.wb-srm { flex: none; border: none; background: none; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; }
.wb-srm:hover { color: #c0392b; }
.wb-sw { flex: none; position: relative; width: 34px; height: 20px; }
.wb-sw input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.wb-swk { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .15s; }
.wb-swk::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 999px;
  background: var(--white); box-shadow: 0 1px 3px rgba(26, 26, 26, .25); transition: left .15s; }
.wb-sw input:checked + .wb-swk { background: var(--primary); }
.wb-sw input:checked + .wb-swk::after { left: 16px; }
.wb-sbody { border-top: 1px solid var(--line); padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.wb-frow { display: flex; align-items: center; gap: 10px; min-height: 26px; }
.wb-flabel { flex: none; width: 78px; font-size: 11.5px; color: var(--muted); }
.wb-fin { flex: 1; min-width: 0; font: inherit; font-size: 12.5px; color: var(--head); background: var(--white);
  border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; }
.wb-fin:focus { outline: none; border-color: var(--primary); }
.wb-chips { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.wb-chip { border: 1px solid var(--line); background: var(--white); color: var(--body); font: inherit; font-size: 11.5px;
  font-weight: 600; border-radius: 999px; padding: 3px 10px; cursor: pointer; }
.wb-chip.on { background: #fdeede; border-color: var(--primary); color: var(--primary); }
.wb-fpick { flex: 1; border: 1px dashed var(--line); background: none; color: var(--body); font: inherit; font-size: 12px;
  border-radius: 7px; padding: 6px 9px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-fpick:hover { border-color: var(--primary); color: var(--primary); }
.wb-sfoot { display: flex; justify-content: flex-end; gap: 6px; }
.wb-smv { border: 1px solid var(--line); background: var(--white); color: var(--head); border-radius: 6px; width: 26px; height: 24px;
  font-size: 13px; cursor: pointer; }
.wb-smv:disabled { opacity: .35; cursor: default; }
.wb-smv:not(:disabled):hover { border-color: var(--primary); color: var(--primary); }
.wb-addstep { margin-top: 10px; width: 100%; border: 1.5px dashed var(--line); background: none; color: var(--body);
  font: inherit; font-size: 13px; font-weight: 700; border-radius: 12px; padding: 11px; cursor: pointer; }
.wb-addstep:hover { border-color: var(--primary); color: var(--primary); }
.wb-stepmenu { margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--white);
  box-shadow: 0 8px 26px rgba(26, 26, 26, .12); overflow: hidden; max-height: 320px; overflow-y: auto; }
/* Inspect */
.wb-isect { margin-bottom: 18px; }
.wb-ihead { margin-bottom: 7px; }
.wb-irow { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; padding: 2.5px 0; }
.wb-irow span:first-child { color: var(--muted); flex: none; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-irow span:nth-child(2) { color: var(--head); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-iatt span:nth-child(2) { color: var(--muted); }
.wb-inote { font-size: 12px; color: var(--body); padding: 2px 0; }
.wb-inote.warn { color: #c56a16; font-weight: 600; }
.wb-ilink { display: block; border: none; background: none; padding: 3px 0 0; font: inherit; font-size: 12px; font-weight: 700;
  color: var(--primary); cursor: pointer; text-align: left; }
.wb-ilink:hover { text-decoration: underline; }
.wb-iatt .wb-ilink { flex: none; padding: 0; }
.wb-ifoot { font-size: 11px; color: var(--muted); line-height: 1.5; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }

/* Output panel */
.wb-output { border-top: 1px solid var(--line); padding: 14px 18px 12px; background: var(--white); }
.wb-outtop { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.wb-outsum { text-align: right; }
.wb-outsum { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wb-outsum.warn { color: #b03e2e; font-weight: 700; }
.wb-fmts { display: flex; gap: 6px; margin-bottom: 10px; }
.wb-fmt { flex: 1; border: 1px solid var(--line); background: var(--white); color: var(--body); font: inherit; font-size: 12px;
  font-weight: 700; border-radius: 8px; padding: 7px 0; cursor: pointer; }
.wb-fmt.on { background: var(--head); border-color: var(--head); color: #fff; }
.wb-fmt:disabled { opacity: .45; cursor: not-allowed; }
.wb-outopts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.wb-outopts .wb-fin { flex: 1; min-width: 118px; font-size: 12px; padding: 5px 8px; }
.wb-omerge { width: 100%; text-align: center; }
.wb-download { width: 100%; border: none; background: var(--primary); color: #fff; font: inherit; font-size: 13.5px;
  font-weight: 800; border-radius: 10px; padding: 12px; cursor: pointer; }
.wb-download:hover:not(:disabled) { filter: brightness(.95); }
.wb-download:disabled { opacity: .45; cursor: default; }
.wb-download.busy { opacity: .7; cursor: progress; }
.wb-reciperow { display: block; width: 100%; margin-top: 9px; border: none; background: none; font: inherit; text-align: center;
  font-size: 11.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.wb-reciperow:hover { color: var(--primary); }

/* Recipes */
.wb-recbtn { margin-left: auto; border: 1px solid var(--line); background: var(--white); color: var(--body); font: inherit;
  font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 12px; cursor: pointer; align-self: flex-start; }
.wb-recbtn:hover { border-color: var(--primary); color: var(--primary); }
.wb-recmenu { margin: 10px 16px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--white);
  box-shadow: 0 8px 26px rgba(26, 26, 26, .12); overflow: hidden; }
.wb-recsave { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.wb-recsave .wb-fin { flex: 1; font-size: 12px; }
.wb-recsavebtn { border: none; background: var(--primary); color: #fff; font: inherit; font-size: 12px; font-weight: 800;
  border-radius: 7px; padding: 0 14px; cursor: pointer; }
.wb-reclist { max-height: 240px; overflow-y: auto; }
.wb-recempty { padding: 12px 14px; font-size: 12px; color: var(--muted); }
.wb-recrow { display: flex; align-items: center; gap: 6px; padding: 8px 12px; }
.wb-recrow:hover { background: var(--panel); }
.wb-recmeta { flex: 1; min-width: 0; cursor: pointer; }
.wb-recn { font-size: 12.5px; font-weight: 700; color: var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-recsub { font-size: 11px; color: var(--muted); }

.wb-menugroup { padding: 10px 14px 4px; }
.wb-menugroup:not(:first-child) { border-top: 1px solid var(--line); margin-top: 4px; }
.wb-menuitem { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; border: none;
  background: none; font: inherit; padding: 9px 14px; cursor: pointer; }
.wb-menuitem:hover { background: var(--panel); }
.wb-menuitem b { font-size: 12.5px; color: var(--head); }
.wb-menuitem span { font-size: 11px; color: var(--muted); }

@media (max-width: 900px) {
  .wb { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .wb-left { flex-direction: row; max-height: 160px; } .wb-files { max-height: none; } .wb-right { display: none; }
}

/* substitution prompt on refused cards */
.wb-fixrow { display: flex; align-items: center; gap: 8px; padding: 8px 12px 10px; border-top: 1px dashed #f9ddd7; }
.wb-fixbtn { border: 1px solid #d65b4d; background: var(--white); color: #b03e2e; font: inherit; font-size: 12px;
  font-weight: 700; border-radius: 7px; padding: 5px 10px; cursor: pointer; }
.wb-fixbtn:hover { background: #b03e2e; border-color: #b03e2e; color: #fff; }
.wb-fixnote { font-size: 10.5px; color: var(--muted); }

/* host-provided price line (hosted only; the local app never shows one) */
.wb-quote { text-align: center; font-size: 12px; color: var(--body); margin-bottom: 8px; }
.wb-quote a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.wb-quote a:hover { color: var(--primary); }

/* broken cards show the whole reason, not an ellipsis */
.wb-step.brk .wb-ssum { white-space: normal; overflow: visible; text-overflow: unset; line-height: 1.4; }
/* the After-matches-Before note is information, not an error */
.wb-errbar.info { background: #fdf3e4; color: #8a5a12; border-bottom-color: #f0dcba; }
