/* TR Global — reference-led Tech Packs and authentic BOM */
body[data-style-page] .style-bom-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 12px}
body[data-style-page] .style-bom-summary>div{padding:12px 13px;border:1px solid #d8deea;border-radius:12px;background:#fff;min-width:0}
body[data-style-page] .style-bom-summary span{display:block;color:#6b7387;font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.05em}
body[data-style-page] .style-bom-summary strong{display:block;margin-top:5px;color:#111a3f;font-size:14px;line-height:1.35;overflow-wrap:anywhere}
body[data-style-page] .style-bom-source{margin:0 0 12px;padding:12px 14px;border:1px solid #c9d6ff;border-radius:12px;background:#f6f8ff;color:#27345e;font-size:12px;line-height:1.55}
body[data-style-page] .style-bom-colour-matrix,body[data-style-page] .style-bom-table-wrap{overflow:auto;border:1px solid #d6dce7;border-radius:12px;background:#fff;margin:0 0 12px}
body[data-style-page] .style-bom-colour-matrix table,body[data-style-page] .style-bom-table{width:100%;border-collapse:collapse}
body[data-style-page] .style-bom-colour-matrix table{min-width:620px;font-size:12px}
body[data-style-page] .style-bom-table{min-width:980px;font-size:12px}
body[data-style-page] .style-bom-colour-matrix th,body[data-style-page] .style-bom-colour-matrix td,body[data-style-page] .style-bom-table th,body[data-style-page] .style-bom-table td{padding:9px 10px;border-right:1px solid #e2e6ee;border-bottom:1px solid #e2e6ee;vertical-align:middle}
body[data-style-page] .style-bom-colour-matrix th,body[data-style-page] .style-bom-table th{background:#0a206f;color:#fff;font-size:10px;font-weight:900;letter-spacing:.04em;text-transform:uppercase}
body[data-style-page] .style-bom-colour-matrix td{text-align:center}
body[data-style-page] .style-bom-colour-matrix td:first-child,body[data-style-page] .style-bom-colour-matrix th:first-child{text-align:left;font-weight:850}
body[data-style-page] .style-bom-colour-matrix tr.total td{font-weight:900;background:#f6f8fc}
body[data-style-page] .style-bom-table td:nth-child(5),body[data-style-page] .style-bom-table td:nth-child(6),body[data-style-page] .style-bom-table td:nth-child(7){text-align:center;white-space:nowrap}
body[data-style-page] .style-bom-item{font-weight:900;color:#111a3f}
body[data-style-page] .style-bom-ref{display:block;width:58px;height:46px;object-fit:contain;border:1px solid #d9deea;border-radius:7px;background:#fff;margin:auto}
body[data-style-page] .style-bom-pending{padding:18px;border:1px dashed #bcc7da;border-radius:12px;background:#fafbfd;color:#55617a;line-height:1.55}
body[data-style-page] .style-bom-pending strong{display:block;color:#172243;font-size:14px;margin-bottom:4px}
body[data-style-page] .style-bom-pending p{margin:0}
@media(max-width:780px){body[data-style-page] .style-bom-summary{grid-template-columns:1fr 1fr}}

/* On-screen Tech Pack preview: same information hierarchy as the generated PDF. */
body[data-tech-pack-page] .tech-pack-v237-page{display:flex;flex-direction:column;width:1120px;height:790px;min-height:790px;overflow:hidden;background:#fff;color:#171b38}
body[data-tech-pack-page] .tech-pack-v237-head{display:grid;grid-template-columns:370px 1fr;flex:0 0 88px;border:1px solid #c9ced9}
body[data-tech-pack-page] .tech-pack-v237-brand{display:flex;align-items:center;gap:14px;padding:14px 18px;border-right:1px solid #c9ced9}
body[data-tech-pack-page] .tech-pack-v237-brand img{width:64px;height:56px;object-fit:contain}
body[data-tech-pack-page] .tech-pack-v237-brand strong{display:block;color:#071c70;font-size:23px;letter-spacing:.02em}
body[data-tech-pack-page] .tech-pack-v237-brand span{display:block;margin-top:7px;color:#071c70;font-size:11px;font-weight:900;letter-spacing:.04em}
body[data-tech-pack-page] .tech-pack-v237-head-facts{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr)}
body[data-tech-pack-page] .tech-pack-v237-head-facts>div{padding:14px 12px;border-right:1px solid #c9ced9;min-width:0}
body[data-tech-pack-page] .tech-pack-v237-head-facts b{display:block;color:#69718a;font-size:8.5px;text-transform:uppercase;letter-spacing:.05em}
body[data-tech-pack-page] .tech-pack-v237-head-facts span{display:block;margin-top:7px;color:#171b38;font-size:11px;font-weight:900;line-height:1.3;overflow-wrap:anywhere}
body[data-tech-pack-page] .tech-pack-v237-page h4{margin:0;padding:9px 11px;background:#071c70;color:#fff;font-size:9.5px;font-weight:950;letter-spacing:.035em}
body[data-tech-pack-page] .tech-pack-v237-overview{display:grid;grid-template-columns:1.08fr 1fr;gap:10px;flex:0 0 438px;padding:10px 12px 0}
body[data-tech-pack-page] .tech-pack-v237-reference,body[data-tech-pack-page] .tech-pack-v237-overview-side>article,body[data-tech-pack-page] .tech-pack-v237-bottom-facts>div,body[data-tech-pack-page] .tech-pack-v237-pom,body[data-tech-pack-page] .tech-pack-v237-spec-grid>div,body[data-tech-pack-page] .tech-pack-v237-production-summary,body[data-tech-pack-page] .tech-pack-v237-bom-meta,body[data-tech-pack-page] .tech-pack-v237-order,body[data-tech-pack-page] .tech-pack-v237-bom{border:1px solid #c9ced9;background:#fff;min-width:0;overflow:hidden}
body[data-tech-pack-page] .tech-pack-v237-reference{display:flex;flex-direction:column}
body[data-tech-pack-page] .tech-pack-v237-reference>div{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;padding:15px;background:#fafbfc}
body[data-tech-pack-page] .tech-pack-v237-reference img{display:block;max-width:100%;max-height:100%;object-fit:contain}
body[data-tech-pack-page] .tech-pack-v237-overview-side{display:grid;grid-template-rows:1fr 1fr;gap:10px;min-height:0}
body[data-tech-pack-page] .tech-pack-v237-overview-side article>p{margin:12px;font-size:10px;line-height:1.45}
body[data-tech-pack-page] .tech-pack-v237-overview-side dl{margin:0;padding:7px 10px}
body[data-tech-pack-page] .tech-pack-v237-overview-side dl>div{display:grid;grid-template-columns:128px 1fr;gap:8px;padding:6px 2px;border-bottom:1px solid #e5e8ef}
body[data-tech-pack-page] .tech-pack-v237-overview-side dt{color:#667089;font-size:8px;font-weight:900;text-transform:uppercase}
body[data-tech-pack-page] .tech-pack-v237-overview-side dd{margin:0;font-size:9.5px;font-weight:800;line-height:1.3;overflow-wrap:anywhere}
body[data-tech-pack-page] .tech-pack-v237-trims{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:9px}
body[data-tech-pack-page] .tech-pack-v237-trims>div{display:grid;grid-template-columns:46px 1fr;gap:7px;align-items:center;min-width:0;padding:6px;border:1px solid #e0e4ec;border-radius:7px}
body[data-tech-pack-page] .tech-pack-v237-trims img{width:44px;height:34px;object-fit:contain;background:#fff}
body[data-tech-pack-page] .tech-pack-v237-trims b{font-size:8.8px;line-height:1.25;overflow-wrap:anywhere}
body[data-tech-pack-page] .tech-pack-v237-bottom-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;flex:1;min-height:0;padding:10px 12px}
body[data-tech-pack-page] .tech-pack-v237-bottom-facts p{margin:10px 11px;font-size:10.2px;line-height:1.45;white-space:pre-wrap}
body[data-tech-pack-page] .tech-pack-missing-art{color:#667089;font-size:12px;font-weight:850;text-align:center}
body[data-tech-pack-page] .tech-pack-doc-footer{display:flex;align-items:center;justify-content:space-between;flex:0 0 27px;padding:0 12px;border-top:1px solid #c9ced9;color:#687086;font-size:9px}

body[data-tech-pack-page] .tech-pack-v237-pom{margin:10px 12px 0;flex:1;min-height:0;overflow:auto}
body[data-tech-pack-page] .tech-pack-v237-pom table,body[data-tech-pack-page] .tech-pack-v237-order table,body[data-tech-pack-page] .tech-pack-v237-bom table{width:100%;border-collapse:collapse}
body[data-tech-pack-page] .tech-pack-v237-pom table{font-size:9.6px}
body[data-tech-pack-page] .tech-pack-v237-pom th,body[data-tech-pack-page] .tech-pack-v237-pom td{height:26px;padding:5px 7px;border:1px solid #d9dde6;text-align:center}
body[data-tech-pack-page] .tech-pack-v237-pom th{background:#f2f4f8;color:#414a65;font-size:8px;font-weight:900;text-transform:uppercase}
body[data-tech-pack-page] .tech-pack-v237-pom th:nth-child(2),body[data-tech-pack-page] .tech-pack-v237-pom td:nth-child(2){text-align:left}
body[data-tech-pack-page] .tech-pack-v237-pom-notes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;flex:0 0 92px;padding:10px 12px}
body[data-tech-pack-page] .tech-pack-v237-pom-notes>div{padding:10px;border:1px solid #d9dde6;background:#fafbfd}
body[data-tech-pack-page] .tech-pack-v237-pom-notes b{display:block;color:#071c70;font-size:8px;text-transform:uppercase;margin-bottom:6px}
body[data-tech-pack-page] .tech-pack-v237-pom-notes span{font-size:9.5px;line-height:1.4}

body[data-tech-pack-page] .tech-pack-v237-spec-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr));gap:8px;flex:1;min-height:0;padding:10px 12px}
body[data-tech-pack-page] .tech-pack-v237-spec-grid p{margin:8px 9px;font-size:9.5px;line-height:1.4;white-space:pre-wrap}
body[data-tech-pack-page] .tech-pack-v237-production-summary{margin:0 12px 10px;flex:0 0 82px}
body[data-tech-pack-page] .tech-pack-v237-production-summary dl{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:0}
body[data-tech-pack-page] .tech-pack-v237-production-summary dl>div{padding:7px 9px;border-right:1px solid #e0e4ec;border-bottom:1px solid #e0e4ec}
body[data-tech-pack-page] .tech-pack-v237-production-summary dt{font-size:7.5px;color:#707990;font-weight:900;text-transform:uppercase}
body[data-tech-pack-page] .tech-pack-v237-production-summary dd{margin:4px 0 0;font-size:9px;font-weight:850;line-height:1.3}

body[data-tech-pack-page] .tech-pack-v237-bom-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));flex:0 0 72px;margin:10px 12px 0}
body[data-tech-pack-page] .tech-pack-v237-bom-meta>div{padding:10px 12px;border-right:1px solid #e0e4ec}
body[data-tech-pack-page] .tech-pack-v237-bom-meta b{display:block;color:#69718a;font-size:8px;text-transform:uppercase}
body[data-tech-pack-page] .tech-pack-v237-bom-meta span{display:block;margin-top:5px;font-size:10px;font-weight:850;line-height:1.35}
body[data-tech-pack-page] .tech-pack-v237-order{margin:10px 12px 0;flex:0 0 155px;overflow:auto}
body[data-tech-pack-page] .tech-pack-v237-order th,body[data-tech-pack-page] .tech-pack-v237-order td{padding:5px 7px;border:1px solid #d9dde6;text-align:center;font-size:9px}
body[data-tech-pack-page] .tech-pack-v237-order th{background:#f2f4f8;color:#414a65;font-size:8px;text-transform:uppercase}
body[data-tech-pack-page] .tech-pack-v237-order th:first-child,body[data-tech-pack-page] .tech-pack-v237-order td:first-child{text-align:left;font-weight:850}
body[data-tech-pack-page] .tech-pack-v237-bom{margin:10px 12px;flex:1;min-height:0;overflow:auto}
body[data-tech-pack-page] .tech-pack-v237-bom table{font-size:8.5px}
body[data-tech-pack-page] .tech-pack-v237-bom th,body[data-tech-pack-page] .tech-pack-v237-bom td{padding:4px 5px;border:1px solid #d9dde6;vertical-align:middle;line-height:1.3}
body[data-tech-pack-page] .tech-pack-v237-bom th{position:sticky;top:0;background:#f2f4f8;color:#414a65;font-size:7.5px;text-transform:uppercase;z-index:1}
body[data-tech-pack-page] .tech-pack-v237-bom td:nth-child(5),body[data-tech-pack-page] .tech-pack-v237-bom td:nth-child(6),body[data-tech-pack-page] .tech-pack-v237-bom td:nth-child(7){text-align:center;white-space:nowrap}
body[data-tech-pack-page] .tech-pack-bom-thumb{display:block;width:46px;height:34px;object-fit:contain;margin:auto;background:#fff}
body[data-tech-pack-page] .tech-pack-bom-pending{display:grid;place-items:center;min-height:300px;padding:40px;text-align:center;color:#65708a;font-size:13px;font-weight:800}
@media(max-width:800px){body[data-tech-pack-page] .tech-pack-v237-page{min-width:1120px}}
@media print{body[data-tech-pack-page] .tech-pack-v237-page{break-after:page;page-break-after:always;box-shadow:none}}

/* v238 editable Tech Pack controls */
body[data-tech-pack-page] .tech-pack-spec-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
body[data-tech-pack-page] .tech-pack-spec-editor{display:grid;gap:8px;padding:14px;border:1px solid #dde3ef;border-radius:14px;background:#fbfcff;color:#202852}
body[data-tech-pack-page] .tech-pack-spec-editor.is-removed{background:#f6f6f8;border-style:dashed;opacity:.72}
body[data-tech-pack-page] .tech-pack-spec-editor-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
body[data-tech-pack-page] .tech-pack-spec-editor-head>b{font-size:.78rem}
body[data-tech-pack-page] .tech-pack-spec-editor-head>span{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
body[data-tech-pack-page] .tech-pack-spec-editor textarea{min-height:84px;width:100%;resize:vertical;border:1px solid #dce1ec;border-radius:11px;background:#fff;padding:10px 11px;color:#17204f}
body[data-tech-pack-page] .tech-pack-spec-editor small{color:#7a8399;font-size:.68rem;line-height:1.35}
body[data-tech-pack-page] .tech-pack-mini-action{border:1px solid #d9deea;border-radius:999px;background:#fff;color:#35406d;padding:6px 9px;font:inherit;font-size:.64rem;font-weight:900;cursor:pointer}
body[data-tech-pack-page] .tech-pack-mini-action.danger{border-color:#ecd0d0;color:#a04444}
body[data-tech-pack-page] .tech-pack-mini-action.restore{border-color:#c9d6ff;color:#2447a8}
body[data-tech-pack-page] .tech-pack-custom-specs-head,.tech-pack-bom-editor-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:18px;padding:13px 14px;border:1px solid #e0e4ed;border-radius:14px;background:#f8f9fc}
body[data-tech-pack-page] .tech-pack-custom-specs-head h4{margin:0;color:#15194e;font-size:.86rem}
body[data-tech-pack-page] .tech-pack-custom-specs-head p{margin:3px 0 0;color:#788197;font-size:.72rem}
body[data-tech-pack-page] .tech-pack-custom-specs{display:grid;gap:10px;margin-top:10px}
body[data-tech-pack-page] .tech-pack-custom-spec-row{display:grid;grid-template-columns:220px minmax(0,1fr) auto;gap:9px;align-items:start;padding:11px;border:1px solid #e0e4ed;border-radius:12px;background:#fff}
body[data-tech-pack-page] .tech-pack-custom-spec-row input,body[data-tech-pack-page] .tech-pack-custom-spec-row textarea{width:100%;border:1px solid #dce1ec;border-radius:10px;background:#fafbfe;padding:10px;color:#17204f}
body[data-tech-pack-page] .tech-pack-custom-spec-row textarea{min-height:72px;resize:vertical}
body[data-tech-pack-page] .tech-pack-bom-editor-head strong{display:block;color:#17204f;font-size:.82rem}
body[data-tech-pack-page] .tech-pack-bom-editor-head span{display:block;margin-top:4px;color:#778097;font-size:.7rem}
body[data-tech-pack-page] .tech-pack-bom-editor{display:grid;gap:8px;margin-top:8px;overflow:auto;padding-bottom:3px}
body[data-tech-pack-page] .tech-pack-bom-editor-labels,body[data-tech-pack-page] .tech-pack-bom-editor-row{display:grid;grid-template-columns:145px 1.35fr 1fr 82px 92px 96px 1fr 68px;gap:7px;min-width:1010px;align-items:center}
body[data-tech-pack-page] .tech-pack-bom-editor-labels{margin-top:12px;padding:0 4px;color:#707990;font-size:.62rem;font-weight:900;text-transform:uppercase}
body[data-tech-pack-page] .tech-pack-bom-editor-row{padding:8px;border:1px solid #e0e4ed;border-radius:11px;background:#fff}
body[data-tech-pack-page] .tech-pack-bom-editor-row input{width:100%;min-width:0;border:1px solid #dce1ec;border-radius:9px;background:#fafbfe;padding:9px 8px;color:#17204f;font-size:.72rem}
body[data-tech-pack-page] .tech-pack-writing-space{min-height:110px}
body[data-tech-pack-page] .tech-pack-editor-actions{position:sticky;bottom:0;z-index:5;border-top:1px solid #e1e5ed;box-shadow:0 -8px 24px rgba(17,20,69,.06)}
@media(min-width:1450px){body[data-tech-pack-page] .tech-pack-builder-grid{grid-template-columns:minmax(640px,.9fr) minmax(760px,1.1fr);align-items:start}body[data-tech-pack-page] .tech-pack-editor-card{order:1}body[data-tech-pack-page] .tech-pack-preview-panel{order:2;position:sticky;top:18px;max-height:calc(100vh - 36px)}body[data-tech-pack-page] .tech-pack-preview-scroll{max-height:calc(100vh - 120px);overflow:auto}}
@media(max-width:900px){body[data-tech-pack-page] .tech-pack-spec-editor-grid{grid-template-columns:1fr}body[data-tech-pack-page] .tech-pack-custom-spec-row{grid-template-columns:1fr}body[data-tech-pack-page] .tech-pack-bom-editor-labels{display:none}}

/* v239 — linked Style Tracking / Purchase Order synchronization */
body[data-tech-pack-page="manage"] .tech-pack-sync-banner{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 14px;padding:12px;border:1px solid #cdd7ef;border-radius:12px;background:#f7f9ff}
body[data-tech-pack-page="manage"] .tech-pack-sync-banner>div{min-width:0;padding:10px 12px;border:1px solid #dbe2f2;border-radius:10px;background:#fff}
body[data-tech-pack-page="manage"] .tech-pack-sync-banner strong{display:block;color:#0b2a78;font-size:12px;letter-spacing:.02em}
body[data-tech-pack-page="manage"] .tech-pack-sync-banner span{display:block;margin-top:4px;color:#55617a;font-size:11px;line-height:1.45}
body[data-tech-pack-page="manage"] [data-tech-style-resolution] strong{color:#0b2a78}
@media(max-width:760px){body[data-tech-pack-page="manage"] .tech-pack-sync-banner{grid-template-columns:1fr}}

/* v251 Tech Pack presentation updates */
body[data-tech-pack-page] .tech-pack-v237-pom-notes.tech-pack-v251-remarks{grid-template-columns:1fr;}
body[data-tech-pack-page] .tech-pack-v237-pom-notes.tech-pack-v251-remarks>div{min-height:70px;background:#fff;}
body[data-tech-pack-page] .tech-pack-v237-pom-notes.tech-pack-v251-remarks span{display:block;min-height:48px;}

/* v253 — Page 3 BOM reference imagery only. No derived BOM text is shown. */
body[data-tech-pack-page] .tech-pack-v253-bom-image-grid>article{display:flex;flex-direction:column;min-width:0;overflow:hidden;background:#fff;border:1px solid #c9ced9}
body[data-tech-pack-page] .tech-pack-v253-bom-images{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:6px;align-items:center;justify-items:center;flex:1;min-height:0;padding:8px 10px}
body[data-tech-pack-page] .tech-pack-v253-bom-images:has(img:only-child){grid-template-columns:1fr}
body[data-tech-pack-page] .tech-pack-v253-bom-images img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;margin:auto}
@media (max-width:700px){body[data-tech-pack-page] .tech-pack-v253-bom-images{gap:4px;padding:6px}}
