/* /tools/zpl-to-pdf: How it works scene (ZPL in a dark box, the viewer with a 1 / 3 -> 2 / 3 counter and PNG/JPG/PDF buttons, a label-sized PDF page sliding out). */
.hub-anim.ha-zpl-to-pdf .ha-stage { min-height: 0; border: 1px solid #f1c9c4; background: linear-gradient(180deg, #fffaf9 0%, #fbe9e6 100%); }
.hub-anim.ha-zpl-to-pdf .sc { display: flex; align-items: center; justify-content: center; gap: 1.1rem; min-height: 280px; }
.hub-anim.ha-zpl-to-pdf .sc-arrow { color: #7f1d1d; flex: 0 0 auto; } .hub-anim.ha-zpl-to-pdf .sc-arrow svg { width: 54px; height: 28px; display: block; }
.hub-anim.ha-zpl-to-pdf .zp-code { position: relative; display: flex; flex-direction: column; gap: 6px; width: 220px; height: 170px; flex: 0 0 auto; padding: 16px 12px 12px; background: #1c1917; border-radius: 12px; box-sizing: border-box; box-shadow: 0 16px 28px -18px rgba(28, 25, 23, .7); }
.hub-anim.ha-zpl-to-pdf .zp-l { display: block; overflow: hidden; white-space: nowrap; max-width: 100%; font: 600 .7rem/1.25 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #f5f5f4; }
.hub-anim.ha-zpl-to-pdf .zp-l2, .hub-anim.ha-zpl-to-pdf .zp-l3 { color: #fca5a5; } .hub-anim.ha-zpl-to-pdf .zp-l5 { color: #a8a29e; }
.hub-anim.ha-zpl-to-pdf .zp-dpi { position: absolute; right: 10px; bottom: 9px; padding: 3px 7px; background: #44403c; border-radius: 999px; font: 800 .58rem/1 Manrope, Inter, sans-serif; letter-spacing: .06em; color: #fafaf9; }
.hub-anim.ha-zpl-to-pdf .zp-view { width: 150px; flex: 0 0 auto; padding: 10px; background: #fff; border: 1px solid #e7e5e4; border-radius: 12px; box-sizing: border-box; box-shadow: 0 14px 24px -16px rgba(28, 25, 23, .45); }
.hub-anim.ha-zpl-to-pdf .zp-lab, .hub-anim.ha-zpl-to-pdf .zp-sheet { height: 140px; padding: 12px 10px 0; background: #fff; border: 2px solid #1c1917; border-radius: 5px; box-sizing: border-box; }
.hub-anim.ha-zpl-to-pdf .zp-lab b, .hub-anim.ha-zpl-to-pdf .zp-sheet b { display: block; font: 800 .74rem/1.2 Manrope, Inter, sans-serif; color: #1c1917; }
.hub-anim.ha-zpl-to-pdf .zp-lab span, .hub-anim.ha-zpl-to-pdf .zp-sheet span { display: block; margin: 5px 0 14px; font: 600 .62rem/1.2 Inter, system-ui, sans-serif; color: #1c1917; }
.hub-anim.ha-zpl-to-pdf .zp-lab i, .hub-anim.ha-zpl-to-pdf .zp-sheet i { display: block; height: 36px; background: repeating-linear-gradient(90deg, #1c1917 0 2px, transparent 2px 4px, #1c1917 4px 6px, transparent 6px 9px); }
.hub-anim.ha-zpl-to-pdf .zp-nav { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px 0 6px; font: 700 .66rem/1 Inter, system-ui, sans-serif; color: #44403c; }
.hub-anim.ha-zpl-to-pdf .zp-arr { display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid #d6d3d1; border-radius: 6px; font-size: .8rem; }
.hub-anim.ha-zpl-to-pdf .zp-count { position: relative; display: inline-block; width: 34px; height: 12px; text-align: center; }
.hub-anim.ha-zpl-to-pdf .zp-count em { position: absolute; left: 0; right: 0; top: 0; font-style: normal; }
.hub-anim.ha-zpl-to-pdf .zp-c1 { opacity: 0; }
.hub-anim.ha-zpl-to-pdf .zp-btns { display: flex; gap: 4px; justify-content: center; margin: 0; }
.hub-anim.ha-zpl-to-pdf .zp-btns span { padding: 4px 6px; border: 1px solid #d6d3d1; border-radius: 6px; font: 800 .56rem/1 Inter, system-ui, sans-serif; letter-spacing: .04em; color: #44403c; }
.hub-anim.ha-zpl-to-pdf .zp-btns .zp-pdfbtn { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.hub-anim.ha-zpl-to-pdf .zp-page { position: relative; width: 132px; flex: 0 0 auto; padding: 14px 12px 12px; background: #fff; border: 1px solid #e7e5e4; border-radius: 4px 18px 4px 4px; box-sizing: border-box; box-shadow: 0 18px 30px -18px rgba(127, 29, 29, .55); }
.hub-anim.ha-zpl-to-pdf .zp-sheet { height: 150px; border-width: 1.5px; }
.hub-anim.ha-zpl-to-pdf .zp-tag { position: absolute; left: -10px; top: 10px; padding: 4px 7px; background: #b91c1c; border-radius: 4px; font: 800 .6rem/1 Manrope, Inter, sans-serif; letter-spacing: .08em; color: #fff; box-shadow: 0 6px 10px -6px rgba(127, 29, 29, .8); }
.hub-anim.ha-zpl-to-pdf .zp-size { display: block; margin-top: 8px; font: 700 .62rem/1 Inter, system-ui, sans-serif; font-style: normal; color: #57534e; text-align: center; }
@media (max-width: 640px) {
 .hub-anim.ha-zpl-to-pdf .sc { flex-direction: column; gap: .8rem; } .hub-anim.ha-zpl-to-pdf .sc-arrow { transform: rotate(90deg); } .hub-anim.ha-zpl-to-pdf .ha-stage { padding-bottom: 3.4rem; }
}
/* Reduced motion: the finished scene (code in the box, label 2 / 3 on screen, the PDF page out). */
@media (prefers-reduced-motion: no-preference) {
 .hub-anim.ha-zpl-to-pdf .zp-l1 { animation: zp-l1 9s steps(16, end) infinite both; } .hub-anim.ha-zpl-to-pdf .zp-l2 { animation: zp-l2 9s steps(20, end) infinite both; }
 .hub-anim.ha-zpl-to-pdf .zp-l3 { animation: zp-l3 9s steps(22, end) infinite both; } .hub-anim.ha-zpl-to-pdf .zp-l4 { animation: zp-l4 9s steps(16, end) infinite both; } .hub-anim.ha-zpl-to-pdf .zp-l5 { animation: zp-l5 9s steps(14, end) infinite both; }
 .hub-anim.ha-zpl-to-pdf .zp-lab { animation: zp-lab 9s ease infinite both; }
 .hub-anim.ha-zpl-to-pdf .zp-c1 { animation: zp-c1 9s linear infinite both; } .hub-anim.ha-zpl-to-pdf .zp-c2 { animation: zp-c2 9s linear infinite both; }
 .hub-anim.ha-zpl-to-pdf .zp-next { animation: zp-next 9s ease infinite both; } .hub-anim.ha-zpl-to-pdf .zp-pdfbtn { animation: zp-btn 9s ease infinite both; }
 .hub-anim.ha-zpl-to-pdf .zp-page { animation: zp-page 9s ease infinite both; }
 @keyframes zp-l1 { 0%, 2% { max-width: 0; } 9%, 100% { max-width: 100%; } }
 @keyframes zp-l2 { 0%, 9% { max-width: 0; } 16%, 100% { max-width: 100%; } }
 @keyframes zp-l3 { 0%, 16% { max-width: 0; } 23%, 100% { max-width: 100%; } }
 @keyframes zp-l4 { 0%, 23% { max-width: 0; } 29%, 100% { max-width: 100%; } }
 @keyframes zp-l5 { 0%, 29% { max-width: 0; } 34%, 100% { max-width: 100%; } }
 @keyframes zp-lab { 0%, 36% { opacity: 0; transform: scale(.96); } 41%, 50% { opacity: 1; transform: none; } 52% { opacity: .2; } 55%, 100% { opacity: 1; transform: none; } }
 @keyframes zp-c1 { 0%, 38% { opacity: 0; } 40%, 52% { opacity: 1; } 53%, 100% { opacity: 0; } }
 @keyframes zp-c2 { 0%, 52% { opacity: 0; } 54%, 100% { opacity: 1; } }
 @keyframes zp-next { 0%, 48% { background: transparent; color: inherit; } 50%, 53% { background: #1c1917; color: #fff; } 56%, 100% { background: transparent; color: inherit; } }
 @keyframes zp-btn { 0%, 62% { transform: none; box-shadow: none; } 64%, 67% { transform: scale(1.12); box-shadow: 0 0 0 3px rgba(185, 28, 28, .25); } 70%, 100% { transform: none; box-shadow: none; } }
 @keyframes zp-page { 0%, 68% { opacity: 0; transform: translateX(-18px) rotate(-4deg); } 76%, 94% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; transform: none; } }
}
/* Tool card: a warm red stage for this page (the viewer's is blue). */
body.article-page.bk-chapters.bk-chapters article.blog-content > .zpl-app { --tool-tint: #fdf1ef; --tool-accent: #b91c1c; }
body.article-page.bk-chapters.bk-chapters article.blog-content > .zpl-app .zpl-actions .buy-button { background: #b91c1c; border-color: #b91c1c; color: #fff; }
body.article-page.bk-chapters.bk-chapters article.blog-content > .zpl-app .zpl-actions .buy-button:hover { background: #991b1b; border-color: #991b1b; }
/* ZPL form, the same controls as /tools/zpl-viewer: DPI, width and height as one row of matching fields, and a real drop zone for .zpl files. */
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 4px 0 14px; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-row label { display: flex; flex-direction: column; gap: 6px; margin: 0; font: 600 11.5px/1.2 Inter, system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #71717a; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-row input,
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-row select { box-sizing: border-box; width: 100%; height: 46px; margin: 0; padding: 0 14px; background: #fff; border: 1px solid #dfe3ea; border-radius: 12px; box-shadow: 0 1px 2px rgba(15, 15, 18, .05); font: 700 16px/1 Inter, system-ui, sans-serif; letter-spacing: 0; text-transform: none; color: #0f0f12; transition: border-color .15s, box-shadow .15s; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-row select { -webkit-appearance: none; appearance: none; padding-right: 36px; cursor: pointer; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center / 16px 16px no-repeat; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-row input:hover,
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-row select:hover { border-color: #c4cad4; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-row input:focus,
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-row select:focus { outline: none; border-color: #475569; box-shadow: 0 0 0 3px rgba(71, 85, 105, .18); }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-drop { position: relative; display: flex; align-items: center; gap: 14px; margin: 0 0 16px; padding: 16px 18px; background: #fff; border: 1.5px dashed #c4cad4; border-radius: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-drop:hover,
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-drop.is-over { border-color: #475569; background: #f8fafc; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-drop:focus-within { border-color: #475569; box-shadow: 0 0 0 3px rgba(71, 85, 105, .18); }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-drop-icon { flex: 0 0 42px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #0f0f12; color: #fff; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-drop-icon svg { width: 20px; height: 20px; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-drop-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-drop-text b { font: 700 15px/1.3 Inter, system-ui, sans-serif; color: #0f0f12; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-drop-text span { font: 400 13.5px/1.4 Inter, system-ui, sans-serif; color: #71717a; }
@media (max-width: 640px) {
 body.article-page.bk-chapters article.blog-content .zpl-app .zpl-row { gap: 8px; }
 body.article-page.bk-chapters article.blog-content .zpl-app .zpl-row label { font-size: 10.5px; letter-spacing: .05em; }
 body.article-page.bk-chapters article.blog-content .zpl-app .zpl-row input, body.article-page.bk-chapters article.blog-content .zpl-app .zpl-row select { padding: 0 10px; }
 body.article-page.bk-chapters article.blog-content .zpl-app .zpl-row select { padding-right: 28px; background-position: right 8px center; }
}
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-drop { flex-direction: row; text-align: left; }
/* DPI, width, height and the in / cm / mm switch share one row (two by two on a phone). */
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-dim { position: relative; display: block; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-row .zpl-dim input { padding-right: 44px; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font: 600 13px/1 Inter, system-ui, sans-serif; letter-spacing: 0; text-transform: none; color: #71717a; pointer-events: none; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-units { margin: 0; padding: 0; border: 0; min-width: 0; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-units legend { padding: 0; margin: 0 0 6px; font: 600 11.5px/1.2 Inter, system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #71717a; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-units-seg { display: inline-flex; height: 46px; padding: 4px; box-sizing: border-box; background: #fff; border: 1px solid #dfe3ea; border-radius: 12px; box-shadow: 0 1px 2px rgba(15, 15, 18, .05); }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-units-seg label { position: relative; display: block; margin: 0; cursor: pointer; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-units-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-units-seg span { display: grid; place-items: center; min-width: 44px; height: 100%; padding: 0 10px; box-sizing: border-box; border-radius: 9px; font: 700 14px/1 Inter, system-ui, sans-serif; letter-spacing: 0; text-transform: none; color: #3f3f46; transition: background .15s, color .15s; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-units-seg label:hover span { background: #f1f5f9; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-units-seg input:checked + span { background: #0f0f12; color: #fff; }
body.article-page.bk-chapters article.blog-content .zpl-app .zpl-units-seg input:focus-visible + span { box-shadow: 0 0 0 3px rgba(59, 110, 165, .35); }
@media (max-width: 640px) {
 body.article-page.bk-chapters article.blog-content .zpl-app .zpl-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
 body.article-page.bk-chapters article.blog-content .zpl-app .zpl-units-seg { display: flex; width: 100%; }
 body.article-page.bk-chapters article.blog-content .zpl-app .zpl-units-seg label { flex: 1; }
 body.article-page.bk-chapters article.blog-content .zpl-app .zpl-units-seg span { min-width: 0; }
}
@media (max-width: 640px) {
 body.article-page.bk-chapters article.blog-content .zpl-app .zpl-units { width: 100%; }
 body.article-page.bk-chapters article.blog-content .zpl-app .zpl-units-seg { width: 100%; }
 body.article-page.bk-chapters article.blog-content .zpl-app .zpl-units-seg label { flex: 1 1 0; min-width: 0; }
 body.article-page.bk-chapters article.blog-content .zpl-app .zpl-units-seg span { padding: 0; font-size: 13px; }
}
