/* Illustrated Spoolbase instructions. Uses the main site's paper, ink and type tokens. */
.sb-guide .section { max-width: 1040px; scroll-margin-top: 24px; }
.sg-toc { max-width: 912px; margin: 0 auto; padding: 28px 24px 4px; }
.sg-toc > strong { display: block; margin-bottom: 12px; font-size: 16px; }
.sg-toc > div { display: flex; flex-wrap: wrap; gap: 8px; }
.sg-toc a { display: block; border: 1px solid var(--linia); border-radius: 999px; padding: 8px 13px; background: var(--kartka); font-size: 14px; line-height: 1.3; text-decoration: none !important; }
.sg-toc a:hover, .sg-toc a:focus-visible { border-color: var(--atrament); }
.sb-guide .section + .section { border-top: 1px solid var(--linia); }
.sg-checks, .sg-actions { display: grid; gap: 12px; margin: 20px 0; padding-left: 24px; }
.sg-checks li, .sg-actions li { padding-left: 4px; line-height: 1.55; }
.sg-example { margin-top: 24px; padding: 20px 24px; background: var(--kartka); border: 1px solid var(--linia); border-left: 4px solid var(--dach); border-radius: 12px; }
.sg-example > strong { display: block; font-size: 19px; }
.sg-example p { margin-top: 9px; }
.sg-example p:last-child { margin-bottom: 0; }
.sg-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 24px 0; }
.sg-fields > div { padding: 18px 20px; border: 1px solid var(--linia); border-radius: 12px; }
.sg-fields dt { margin: 0 0 7px; font-size: 14px; color: var(--szary); }
.sg-fields dd { margin: 0; line-height: 1.5; }
.sg-snapshot { margin: 26px 0 32px; min-width: 0; }
.sg-snapshot > a { display: flex; align-items: center; justify-content: center; padding: clamp(8px,2vw,20px); border: 1px solid #353b39; border-radius: 16px; background: #151719; }
.sg-snapshot img { display: block; width: auto; max-width: 100%; height: auto; max-height: 680px; object-fit: contain; }
.sg-snapshot figcaption { color: var(--szary); font-size: 14px; line-height: 1.5; margin-top: 11px; }
.sg-snapshot figcaption a { white-space: normal; }
.sg-choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin: 26px 0; }
.sg-choice-grid > a { display: grid; gap: 10px; padding: 22px; border: 1px solid var(--linia); border-radius: 14px; background: var(--kartka); text-decoration: none !important; }
.sg-choice-grid > a:hover { border-color: var(--atrament); }
.sg-choice-grid b { font-size: 21px; line-height: 1.25; }
.sg-choice-grid span { color: var(--szary); font-size: 16px; line-height: 1.45; }
.sg-branch { padding-top: 28px; scroll-margin-top: 24px; }
.sb-guide h3 { font-size: clamp(23px,3vw,31px); line-height: 1.2; }
.sg-branch + .sg-branch { margin-top: 30px; border-top: 1px dashed var(--linia); }
.sg-equation { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 28px 0; padding: 24px; border: 1px solid var(--linia); border-radius: 16px; background: var(--kartka); }
.sg-equation span { display: grid; gap: 5px; flex: 1 1 120px; }
.sg-equation b { font-size: clamp(28px,4vw,40px); font-variant-numeric: tabular-nums; font-weight: 500; }
.sg-equation small { color: var(--szary); font-size: 14px; line-height: 1.3; }
.sg-equation i { font-size: 27px; font-style: normal; }
.sg-faq { margin-top: 22px; }
.sg-faq details { padding: 18px 0; border-bottom: 1px solid var(--linia); }
.sg-faq summary { cursor: pointer; font-size: 19px; font-weight: 500; line-height: 1.35; }
.sg-faq p { margin: 15px 0 3px; font-size: 17px; line-height: 1.6; }
.sb-guide a:focus-visible, .sg-faq summary:focus-visible { outline: 2px solid var(--atrament); outline-offset: 5px; border-radius: 4px; }
@media (max-width: 600px) {
 .sg-fields, .sg-choice-grid { grid-template-columns: minmax(0,1fr); }
 .sg-snapshot > a { border-radius: 10px; padding: 6px; }
 .sg-example { padding: 18px; }
 .sg-equation { padding: 18px; gap: 12px; }
 .sg-equation span { flex-basis: 95px; }
 .sg-equation span:last-child { flex-basis: 100%; padding-top: 10px; border-top: 1px solid var(--linia); }
 .sg-equation i:last-of-type { display: none; }
}

@media (max-width: 380px) {
 .spoolbase-guide-page .gora { column-gap: 6px; }
 .spoolbase-guide-page .gora .guzik { font-size: 14px; padding-inline: 8px; }
}

/* Live app window (spoolbase-demo.js) in place of screenshots. Dark Gantry look, real controls. */
.sg-live { margin: 26px 0 32px; min-width: 0; }
.sg-live figcaption { color: var(--szary); font-size: 14px; line-height: 1.5; margin-top: 11px; }
.sbd { --b:#1e1e20; --k:#2a2a2d; --e:#3a3a3c; --t:#f2f2f4; --d:#a1a1a6; --m:#6e6e73; --z:#7fd1a8; --zb:#3d6b58;
 position: relative; margin: 0 auto; max-width: 620px; color: var(--t); background: var(--b); border: 1px solid #353b39; border-radius: 14px; overflow: hidden;
 font: 400 14px/1.3 -apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,sans-serif; -webkit-font-smoothing: antialiased; text-align: left; box-shadow: 0 18px 40px -24px rgba(0,0,0,.55); }
.sbd[data-ekran="przypisz"], .sbd[data-ekran="katalog"] { max-width: 900px; }
.sbd[data-ekran="ilosc"], .sbd[data-ekran="koryguj"] { max-width: 480px; }
.sbd *, .sbd *::before { box-sizing: border-box; }
.sbd p { margin: 0; }
.sbd button, .sbd input { font: inherit; color: inherit; }
.sbd button { cursor: pointer; }
.sbd-bar { display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 12px; background: #161618; border-bottom: 1px solid #2a2a2c; color: var(--m); font-size: 12px; }
.sbd-lights { display: flex; gap: 7px; }
.sbd-lights i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.sbd-lights i:nth-child(2) { background: #febc2e; } .sbd-lights i:nth-child(3) { background: #28c840; }
.sbd-ekran { padding: 18px; min-height: 260px; }
.sbd h6 { margin: 14px 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--m); }
.sbd hr { border: 0; border-top: 1px solid #2f2f31; margin: 14px 0; }
.sbd-dot { display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.sbd-dot.duza { width: 34px; height: 34px; }
.sbd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 6px 14px; border: 1px solid var(--e); border-radius: 9px; background: var(--k); font-weight: 600; }
.sbd-btn:hover:not(:disabled) { border-color: #5a5a5e; background: #323236; }
.sbd-btn:disabled { opacity: .45; cursor: not-allowed; }
.sbd-btn.jasny { background: #d7d9d5; border-color: #d7d9d5; color: #151515; }
.sbd-btn.jasny:hover:not(:disabled) { background: #eceee9; }
.sbd-btn.szeroki { width: 100%; }
.sbd-szukaj { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 11px; border: 1px solid #333336; border-radius: 999px; background: #151517; color: var(--m); }
.sbd-szukaj svg { width: 15px; height: 15px; flex: none; }
.sbd-szukaj input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; color: var(--t); }
.sbd-szukaj:focus-within { border-color: var(--zb); }
.sbd input::placeholder { color: var(--m); }
.sbd-pola input, .sbd-wiersz input, .sbd-inna input { width: 100%; height: 34px; padding: 0 10px; border: 1px solid #38383b; border-radius: 8px; background: #151517; color: var(--t); outline: 0; }
.sbd-pola input:focus, .sbd-wiersz input:focus, .sbd-inna input:focus { border-color: var(--z); }
/* Hint: the control the current step talks about gently pulses. */
.sbd-cel { position: relative; z-index: 1; box-shadow: 0 0 0 2px var(--z), 0 0 0 6px rgba(127,209,168,.18) !important; animation: sbd-puls 1.6s ease-in-out infinite; }
@keyframes sbd-puls { 50% { box-shadow: 0 0 0 2px var(--z), 0 0 0 10px rgba(127,209,168,0) !important; } }
.sbd-stopka { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid #2a2a2c; background: #18181a; }
.sbd-podp { flex: 1; color: var(--d); font-size: 13px; line-height: 1.4; }
.sbd-podp b { color: var(--z); font-weight: 600; }
.sbd-reset { flex: none; padding: 5px 10px; border: 1px solid var(--e); border-radius: 7px; background: none; color: var(--d); font-size: 12px; }
.sbd-reset:hover { color: var(--t); border-color: #5a5a5e; }
.sbd-toast { position: absolute; left: 50%; bottom: 58px; z-index: 3; max-width: calc(100% - 32px); padding: 9px 14px; border-radius: 10px; background: #2f4a3e; border: 1px solid var(--zb); color: #e6f6ee; font-size: 13px; font-weight: 500;
 transform: translate(-50%, 8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.sbd-toast.jest { opacity: 1; transform: translate(-50%, 0); }
.sbd button:focus-visible, .sbd input:focus-visible { outline: 2px solid var(--z); outline-offset: 2px; }
/* Catalogue */
.sbd-naglowek { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sbd-naglowek > div { flex: 1; display: grid; gap: 2px; }
.sbd-naglowek b { font-size: 20px; } .sbd-naglowek small { color: var(--d); font-size: 13px; } .sbd-naglowek em { font-style: normal; color: var(--d); font-size: 12px; font-weight: 600; }
.sbd-logo { width: 30px; height: 30px; border-radius: 50%; border: 5px solid #c9c9cc; box-shadow: inset 0 0 0 5px var(--b), inset 0 0 0 9px #c9c9cc; flex: none; }
.sbd-tabela { margin-top: 12px; padding: 6px; border-radius: 12px; background: #252527; max-height: 300px; overflow: auto; }
.sbd-th, .sbd-tr { display: grid; grid-template-columns: 44px 1fr 1.3fr .6fr 1fr; align-items: center; gap: 8px; }
.sbd-th { padding: 6px 8px; border-bottom: 1px solid #38383a; font-size: 12px; color: var(--d); }
.sbd-tr { width: 100%; margin-top: 4px; padding: 7px 8px; border: 1px solid transparent; border-radius: 9px; background: none; text-align: left; }
.sbd-tr:hover { background: #2e2e31; } .sbd-tr.wyb { background: #464649; }
.sbd-tr .sbd-dot.duza { width: 26px; height: 26px; }
.sbd-pola { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 14px; }
.sbd-pola label { display: flex; align-items: center; gap: 8px; color: var(--d); font-size: 13px; }
.sbd-pola input { width: 84px; text-align: center; }
.sbd-akcje { display: flex; justify-content: flex-end; margin-top: 14px; }
/* Inventory */
.sbd-grupa { margin-top: 16px; } .sbd-grupa + .sbd-grupa { padding-top: 14px; border-top: 1px solid #333335; }
.sbd-grupa-t { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.sbd-grupa-t b { font-size: 17px; } .sbd-grupa-t small { color: var(--d); font-weight: 600; }
.sbd-siatka { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 18px; }
.sbd-poz { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border: 1px solid transparent; border-radius: 10px; background: none; text-align: left; }
.sbd-poz:hover { background: #29292c; }
.sbd-poz > span { flex: 1; display: grid; gap: 2px; min-width: 0; } .sbd-poz small { color: var(--d); font-size: 12px; }
.sbd-licz { font-style: normal; font-weight: 700; min-width: 36px; padding: 6px 0; border-radius: 8px; text-align: center; background: #22324a; color: #5aa2ff; }
.sbd-licz.z { background: #24402c; color: #6fd27d; } .sbd-licz.c { background: #46282a; color: #ff6b62; }
.sbd-poz-w.otw { grid-column: 1 / -1; }
.sbd-rolki-mag { display: grid; gap: 6px; margin: 2px 8px 8px 54px; }
.sbd-rolki-mag > div { display: grid; grid-template-columns: 1fr 90px 40px; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--zb); border-radius: 9px; color: var(--d); font-size: 13px; }
.sbd-rolki-mag b { color: var(--t); } .sbd-rolki-mag em { font-style: normal; text-align: right; color: var(--z); }
.sbd-mini { height: 6px; border-radius: 3px; background: #38383b; overflow: hidden; } .sbd-mini i, .sbd-pasek i, .sbd-sbar i { display: block; height: 100%; background: var(--z); border-radius: inherit; transition: width .4s; }
/* Printer card */
.sbd-head { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--e); border-radius: 11px; background: #19191b; color: var(--d); font-size: 13px; }
.sbd-mark { color: var(--t); font-weight: 900; letter-spacing: .06em; font-size: 15px; }
.sbd-karta { margin-top: 12px; padding: 12px 14px 14px; border: 1px solid var(--e); border-radius: 13px; background: #222224; }
.sbd-k-glowa { display: flex; align-items: center; gap: 8px; }
.sbd-k-glowa svg { width: 15px; height: 15px; color: var(--d); } .sbd-k-glowa b { font-size: 17px; }
.sbd-tag { padding: 1px 7px; border-radius: 5px; background: #333336; color: var(--d); font-size: 12px; }
.sbd-stan { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.sbd-stan i { width: 7px; height: 7px; border-radius: 50%; background: #d0d0d0; } .sbd-stan.druk i { background: var(--z); }
.sbd-k-zad { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; }
.sbd-k-zad em { font-style: normal; font-size: 28px; font-weight: 600; color: #e4e4e6; font-variant-numeric: tabular-nums; }
.sbd-pasek { display: block; height: 8px; margin-top: 8px; border-radius: 4px; background: #38383b; overflow: hidden; }
.sbd-temp { display: flex; gap: 40%; margin-top: 12px; padding: 8px 0; border-top: 1px solid #333335; border-bottom: 1px solid #333335; color: var(--m); font-size: 18px; font-weight: 700; }
.sbd-ams { margin-top: 12px; color: var(--d); font-size: 13px; } .sbd-ams b { color: var(--t); font-size: 15px; }
.sbd-sloty { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-top: 8px; }
.sbd-slot { display: grid; gap: 6px; padding: 6px; border: 1px solid transparent; border-radius: 9px; background: none; text-align: left; }
.sbd-slot:hover { background: #2b2b2e; border-color: #3c3c3f; }
.sbd-slot small { color: var(--d); font-size: 12px; } .sbd-slot b { font-size: 14px; }
.sbd-sbar { display: block; height: 9px; border-radius: 4px; background: #3a3a3d; overflow: hidden; }
.sbd-sdol { display: flex; justify-content: space-between; gap: 4px; }
.sbd-slot.a1 .sbd-sdol small:last-child { color: var(--t); font-weight: 600; }
/* Assignment */
.sbd-przyp { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 22px; }
.sbd-meta { color: var(--d); font-size: 14px; }
.sbd-brak { color: var(--t); font-size: 16px; } .sbd-brak.mala { color: var(--m); font-size: 13px; padding: 8px 2px; }
.sbd-lista { display: grid; gap: 6px; margin-top: 10px; max-height: 340px; overflow: auto; padding: 2px 4px 4px 2px; }
.sbd-rolka, .sbd-prod { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: 1px solid transparent; border-radius: 10px; background: none; text-align: left; }
.sbd-rolka > span, .sbd-prod > span { display: grid; gap: 2px; min-width: 0; } .sbd-rolka small, .sbd-prod small { color: var(--d); font-size: 12.5px; }
.sbd-lista .sbd-rolka { border-color: var(--zb); } .sbd-lista .sbd-rolka small { color: var(--z); }
.sbd-rolka:hover, .sbd-prod:hover { background: #29292c; }
.sbd-rolka.przyp { padding-left: 4px; cursor: default; } .sbd-rolka.przyp:hover { background: none; }
.sbd-prod.pasuje { border-color: var(--zb); } .sbd-prod.pasuje small { color: var(--z); }
.sbd-g h6 { margin: 10px 0 2px; }
.sbd-trzy { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; margin-top: 8px; }
.sbd-wroc { padding: 0; border: 0; background: none; color: var(--d); font-weight: 600; font-size: 13px; }
.sbd-wroc:hover { color: var(--t); }
.sbd-lewa .sbd-wroc { margin-bottom: 6px; }
/* Amount and correction panels */
.sbd-panel { display: flex; flex-direction: column; min-height: 400px; }
.sbd-panel-t { margin-top: 8px; font-size: 19px; } .sbd-panel-o { color: var(--d); margin: 3px 0 14px; }
.sbd-dol { margin-top: auto; display: grid; gap: 10px; padding-top: 14px; }
.sbd-wiersz { display: grid; grid-template-columns: 1fr 150px; align-items: center; gap: 12px; margin-top: 8px; color: var(--d); font-size: 13.5px; }
.sbd-panel h6 { margin-top: 0; }
.sbd-info { margin-top: 10px !important; color: var(--m); font-size: 12.5px; }
.sbd-presety { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; }
.sbd-inna { display: grid; grid-template-columns: 110px 1fr; gap: 8px; }
.sbd-po { font-weight: 700; } .sbd-po.blad { color: #ff7b72; }
.sbd [hidden] { display: none !important; }
@media (max-width: 700px) {
 .sbd-przyp { grid-template-columns: minmax(0,1fr); }
 .sbd-prawa .sbd-lista { max-height: 220px; }
 .sbd-th, .sbd-tr { grid-template-columns: 34px 1fr 1.2fr .6fr; } .sbd-th span:last-child, .sbd-tr span:last-child { display: none; }
 .sbd-siatka { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 480px) {
 .sbd-ekran { padding: 14px 12px; } .sbd { font-size: 13px; }
 .sbd-sloty { gap: 4px; } .sbd-slot { padding: 4px; } .sbd-slot small { font-size: 11px; }
 .sbd-sdol small:first-child { display: none; }
 .sbd-wiersz { grid-template-columns: 1fr 110px; }
 .sbd-rolki-mag { margin-left: 8px; } .sbd-rolki-mag > div { grid-template-columns: 1fr 50px 36px; }
 .sbd-pola input { width: 70px; }
 .sbd-stopka { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .sbd-cel { animation: none; } .sbd-toast, .sbd-mini i, .sbd-pasek i, .sbd-sbar i { transition: none; } }
