.converter{max-width:1040px;margin:40px auto;padding:0 20px 70px}.converter h1{font-size:clamp(30px,4vw,44px);line-height:1.15}.intro{font-size:18px;max-width:740px;color:#53685c}.panel{padding:28px;background:white;border:1px solid #d9dfd4;border-radius:16px;margin:24px 0}.panel h2{margin-top:0;font-size:24px}.panel p,small{color:#627368}.grid{display:grid;grid-template-columns:1fr;gap:20px}.converter label{display:flex;flex-direction:column;gap:8px;margin:12px 0;font-weight:600}.converter input,.converter select,.converter textarea{width:100%;box-sizing:border-box;padding:13px;border:1px solid #bfcdbf;border-radius:8px;background:#fff;font:inherit;color:#173c2a}.converter input[type=file]{padding:20px;background:#f7f8f2}.converter small{font-weight:400}.converter button,.download{display:inline-block;border:0;border-radius:9px;padding:17px 25px;background:#204d39;color:#fff;font:inherit;font-weight:600;cursor:pointer;transition:transform .1s,background .1s}.converter button:active,.download:active{transform:scale(.97);background:#143b29}.converter button:disabled{opacity:.65;cursor:wait}.download{margin-top:15px;text-decoration:none}progress{width:100%;height:18px;margin-top:20px;accent-color:#204d39}#warnings{color:#85541e;line-height:1.5}#book-info{white-space:pre-line;color:#204d39}#status{line-height:1.5}[hidden]{display:none!important}input:focus-visible,textarea:focus-visible,select:focus-visible,button:focus-visible,a:focus-visible{outline:3px solid #8aa991;outline-offset:3px}@media(max-width:650px){.grid{grid-template-columns:1fr}.panel{padding:19px}.header{gap:20px}}

.si-row{border-top:1px solid #e1e6dc;padding:10px 0}.si-main{display:grid;grid-template-columns:minmax(160px,1fr) minmax(130px,220px) 40px;gap:12px;align-items:center}.converter .si-caption{margin:0;font-size:14px;font-weight:500}.converter .si-number{padding:10px;font-weight:400}.converter .si-mark{width:38px;height:38px;padding:0;background:transparent;color:#53685c;font-size:24px;line-height:1;cursor:pointer}.converter .si-mark.si-good{color:#267148}.si-message{font-size:12px;margin-top:3px;color:#68786c}.si-details{font-size:12px;margin-top:3px}.si-details summary{color:#68786c;cursor:pointer}.si-info{font-size:13px;line-height:1.5;user-select:text}.si-hints{display:grid;grid-template-columns:1fr 2fr;gap:10px}.converter .si-hints label{font-size:12px;font-weight:400}.converter .si-include{display:flex;flex-direction:row;align-items:center;gap:8px;font-size:13px}.converter .si-include input{width:auto}.si-danger,.si-danger .si-message,.si-danger .si-caption,.si-danger .si-number,.si-danger .si-mark{color:#c00000!important;font-weight:700!important}.si-danger .si-info{color:#c00000}.instruments-panel>p{font-size:14px;line-height:1.5}@media(max-width:600px){.si-main{grid-template-columns:minmax(100px,1fr) minmax(100px,140px) 32px;gap:7px}.converter .si-caption{font-size:12px}.si-hints{grid-template-columns:1fr}.converter .si-mark{width:30px}}

.si-actions{display:flex;align-items:center;gap:5px;justify-content:flex-end}.si-main{grid-template-columns:minmax(160px,1fr) minmax(130px,220px) 122px}.converter .si-retry{padding:7px 9px;font-size:12px;border:1px solid #c4d0c4;background:transparent;color:#204d39;font-weight:500}.converter .si-retry:active{background:#eaf0e6}.si-danger .si-retry{color:#204d39}@media(max-width:600px){.si-main{grid-template-columns:minmax(100px,1fr) minmax(100px,130px) 32px}.si-actions{flex-wrap:wrap}.converter .si-retry{grid-column:2/4;font-size:11px;padding:6px}.si-main:has(.si-retry:not([hidden])){grid-template-columns:minmax(90px,1fr) minmax(100px,130px) 82px}}

/* Compact document metadata without changing the instrument controls. */
.converter .grid{gap:12px}.converter .grid>label{margin:0;gap:5px}.converter .grid input{padding:9px 12px;min-height:42px}.converter .grid small{font-size:13px;line-height:1.3}.converter .grid+label{margin:12px 0 0;gap:5px}

/* Minimal form layout: paired fields in reading order; Word template unchanged. */
.converter{max-width:1120px;margin:24px auto;padding:0 20px 40px}.converter>.eyebrow{margin:0 0 8px;font-size:10px}.converter h1{font-size:32px;line-height:1.15;margin:0 0 8px;letter-spacing:-.8px}.converter .intro{font-size:13px;line-height:1.45;margin:0 0 16px}.converter .panel{padding:16px 18px;border-radius:10px;margin:12px 0}.converter .panel h2{font-size:20px;line-height:1.2;margin:0 0 8px}.converter .panel>p{font-size:12px;line-height:1.4;margin:0 0 12px}.converter label{font-size:13px;gap:5px;margin:0;font-weight:600}.converter input,.converter select,.converter textarea{font-size:14px;padding:7px 10px;border-radius:6px;min-height:36px}.converter .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 18px}.converter .grid input{min-height:36px;padding:7px 10px}.converter small,.converter .grid small{font-size:11px;line-height:1.3}.converter .grid+label{margin-top:10px}.converter textarea{min-height:60px;resize:vertical}.converter .upload-panel{display:grid;grid-template-columns:160px minmax(0,1fr);gap:10px 18px;align-items:start}.converter .upload-panel .file{min-width:0}.converter input[type=file]{padding:5px 8px;min-height:36px;font-size:13px;background:#f7f8f2}.converter input[type=file]::file-selector-button{padding:5px 10px;font:inherit;border-radius:5px;margin-right:10px}.converter #book-info{grid-column:1/-1;font-size:12px;line-height:1.3}.converter #book-info:empty{display:none}.converter button,.converter .download{padding:10px 15px;font-size:13px;border-radius:6px}.converter #status{font-size:12px;margin:10px 0}.converter #instrument-rows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px}.converter .si-row{min-width:0;padding:8px 0}.converter .si-main{grid-template-columns:minmax(0,1fr) 125px auto;gap:8px}.converter .si-caption{font-size:12px;line-height:1.35;overflow-wrap:anywhere}.converter .si-number{padding:6px 8px;min-height:34px;font-size:13px}.converter .si-actions{gap:3px;flex-wrap:wrap;max-width:88px}.converter .si-mark{width:28px;height:30px;padding:0;font-size:22px}.converter .si-retry{padding:5px 6px;font-size:11px}.converter .si-message,.converter .si-details{font-size:11px}.converter .si-info{font-size:12px}.converter .si-hints{grid-template-columns:1fr 1fr;gap:7px}.converter .si-hints label:last-child{grid-column:1/-1}.converter .si-include{margin-top:8px;font-size:12px}.converter #warnings{font-size:12px;padding-left:18px;margin:6px 0}.converter progress{height:12px;margin-top:12px}
@media(max-width:800px){.converter #instrument-rows{grid-template-columns:1fr}.converter .si-main{grid-template-columns:minmax(0,1fr) minmax(110px,180px) auto}}
@media(max-width:550px){.converter{margin:18px auto;padding:0 14px 32px}.converter h1{font-size:27px}.converter .panel{padding:13px}.converter .grid,.converter .upload-panel{grid-template-columns:1fr;gap:10px}.converter .si-main{grid-template-columns:minmax(0,1fr) 115px auto}.converter .si-main:has(.si-retry:not([hidden])){grid-template-columns:minmax(0,1fr) 105px 70px}.converter .si-caption{font-size:11px}.converter .intro{font-size:12px}}

/* A small native dropdown keeps base selection beside the factory number. */
.converter .si-entry{position:relative;min-width:0}.converter .si-entry:has(.si-base-choice:not([hidden])) .si-number{padding-right:31px}.converter .si-base-choice{position:absolute;right:2px;top:2px;width:28px;height:calc(100% - 4px);min-height:0;padding:0;border:0;appearance:none;color:transparent;background-color:#f2f5ef;background-image:linear-gradient(45deg,transparent 50%,#61755f 50%),linear-gradient(135deg,#61755f 50%,transparent 50%);background-position:9px 50%,13px 50%;background-size:4px 4px;background-repeat:no-repeat;cursor:pointer}.converter .si-base-choice option{color:#20382c;background:white;font-size:13px}.converter .si-danger .si-base-choice{color:transparent!important}

.instrument-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.converter .instrument-heading h2{margin:0}.converter #add-instrument{padding:6px 10px;font-size:12px}.converter .instrument-heading+p{margin-top:8px}.converter .si-edit{width:26px;height:30px;padding:0;background:#f2f5ef;color:#315941;font-size:18px}.converter .si-editor{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;padding:10px;margin-top:8px;background:#f7f8f3;border:1px solid #dce4d8;border-radius:7px}.converter .si-editor label{font-size:11px;font-weight:500}.converter .si-editor input{min-width:0;width:100%;font-size:13px}.si-editor-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:8px}.converter .si-editor-actions button{padding:5px 10px;font-size:11px}.converter .si-remove{color:#a42e2e;background:#fff;border:1px solid #d7b5b5}@media(max-width:550px){.converter .si-editor{grid-template-columns:1fr}}
@media(min-width:551px){.converter .upload-panel:has(#delivery-field:not([hidden])){grid-template-columns:140px 150px minmax(0,1fr)}.converter .upload-panel #book-info{grid-column:1/-1}}

/* Shared picker and drop target: the native input keeps keyboard access. */
.converter .file-drop{position:relative;display:flex;align-items:center;gap:12px;min-height:82px;padding:12px 16px;box-sizing:border-box;border:1px dashed #b6c8b7;border-radius:8px;background:#f8faf6;color:#345a41;transition:background .15s,border-color .15s}
.converter .file-drop:hover,.converter .file-drop.is-dragging{background:#edf4e9;border-color:#457755}
.converter .file-drop:focus-within{outline:3px solid #8aa991;outline-offset:3px}
.converter .file-drop input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;padding:0;min-height:0}
.file-drop .file-icon{width:34px;height:34px;flex:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
.file-drop-copy{display:flex;flex-direction:column;gap:5px;min-width:0;font-size:12px;line-height:1.4}
.file-browse{color:#204d39;text-decoration:underline;text-underline-offset:3px}
.file-selection{font-size:11px;font-weight:400;color:#70816f;overflow-wrap:anywhere}
.file-drop.has-file .file-selection{color:#204d39}
.converter #generate{display:inline-flex;align-items:center;gap:9px}
#generate svg{width:20px;height:22px;stroke:currentColor;stroke-width:1.35;stroke-linejoin:round;stroke-linecap:round;flex:none}
@media(max-width:550px){.converter .file-drop{min-height:88px;padding:12px}.file-drop-copy{font-size:12px}}

/* More legible workbook tabs and protocol detail at their actual display size. */
.file-drop .file-icon{width:42px;height:42px;stroke-width:1.25}.icon-tint{fill:currentColor;opacity:.12}.icon-sheet-back{opacity:.45}.converter #generate svg{width:26px;height:29px;stroke-width:1.25}

/* Direct product selection: one calm segmented strip, native radio keyboard support. */
.converter .upload-panel,.converter .upload-panel:has(#delivery-field:not([hidden])){grid-template-columns:160px minmax(0,1fr)}
.converter .product-picker{grid-column:1/-1;margin:0 0 6px;padding:0;border:0;min-width:0}
.product-picker legend{padding:0;margin-bottom:8px;font-size:12px;font-weight:600;color:#536b58}
.product-options{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;padding:5px;background:#f3f5ef;border:1px solid #e3e9de;border-radius:10px}
.converter .product-option{display:block;position:relative;margin:0;min-width:0;cursor:pointer}
.converter .product-option input{position:absolute;width:1px;height:1px;min-height:0;padding:0;margin:0;opacity:0}
.product-option>span{display:flex;align-items:center;justify-content:center;gap:8px;min-height:39px;padding:0 8px;border:1px solid transparent;border-radius:7px;font-size:13px;font-weight:500;color:#70806d;transition:background .15s,color .15s,border-color .15s}
.product-option i{width:5px;height:5px;border-radius:50%;background:currentColor;opacity:.35}
.product-option:hover>span{background:#eaf0e5;color:#34583d}
.product-option input:checked+span{background:#fff;border-color:#c3d4bc;color:#245335;box-shadow:0 1px 3px #25452c0c;font-weight:650}
.product-option input:checked+span i{opacity:1;background:#4a7d52}
.product-option input:focus-visible+span{outline:2px solid #76977b;outline-offset:2px}
.converter .upload-panel>.file:not(#automatic-field){grid-column:1/-1}
.converter .upload-panel:has(#delivery-field:not([hidden]))>.file:not(#automatic-field){grid-column:auto}
@media(max-width:550px){.converter .upload-panel,.converter .upload-panel:has(#delivery-field:not([hidden])){grid-template-columns:1fr}.product-options{gap:2px;padding:3px}.product-option>span{font-size:10px;padding:0 2px;min-height:37px;gap:3px}.product-option i{width:3px;height:3px}.converter .upload-panel:has(#delivery-field:not([hidden]))>.file:not(#automatic-field){grid-column:1/-1}}

/* Full-width primary action, with its icon and label centered together. */
.converter #generate,.converter #download{display:flex;width:100%;box-sizing:border-box;justify-content:center;align-items:center;min-height:52px;gap:11px;margin-top:16px}
.converter #download svg{width:26px;height:29px;stroke:currentColor;stroke-width:1.25;stroke-linejoin:round;stroke-linecap:round;flex:none}

/* Eight product choices retain readable labels on narrow screens. */
.product-options{grid-template-columns:repeat(8,minmax(0,1fr))}
#skm-fields[hidden]{display:none!important}
@media(max-width:550px){.product-options{grid-template-columns:repeat(4,minmax(0,1fr))}}

#skm-fields label:has(#checksum){grid-column:auto}

.performer-pair{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;border:1px solid #ccd6cd;border-radius:8px;background:#fff;overflow:hidden}
.converter .performer-pair>label{padding:10px 12px 0;margin:0;min-width:0}
.converter .performer-pair>label+label{border-left:1px solid #ccd6cd}
.converter .performer-pair input{border:0;box-shadow:none;border-radius:0;padding-left:0;padding-right:0;background:transparent}
.performer-pair:focus-within{border-color:#6e9576;box-shadow:0 0 0 2px #6e95761a}

.skm-selected .protocol-grid>label:has(#number),.skm-selected .protocol-grid>label:has(#date){grid-column:1/-1}
.skm-selected #skm-fields{grid-column:1/-1;margin-top:0}
.skm-selected #skm-fields label:has(#coefK),.skm-selected #skm-fields label:has(#coefK1),.skm-selected #skm-fields label:has(#coefK2),.skm-selected #skm-fields label:has(#coefB){grid-column:1/-1}

/* Labels sit above a joined pair of inputs, like the other form fields. */
.performer-pair{border:0;border-radius:0;background:transparent;overflow:visible;box-shadow:none}
.converter .performer-pair>label{padding:0;margin:0}
.converter .performer-pair>label+label{border-left:0}
.converter .performer-pair input{border:1px solid #c9d2c9;background:#fff;padding:10px 12px;border-radius:8px 0 0 8px}
.converter .performer-pair>label+label input{border-left:0;border-radius:0 8px 8px 0}
.performer-pair:focus-within{box-shadow:none}
