/* CBM calculator: /knowledge-center/cbm-calculator/ */
.cbm-section{padding-bottom:40px}
.cbm-app{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:40px;align-items:start}
.cbm-work{min-width:0}
.cbm-app label{display:flex;flex-direction:column;gap:7px;font-size:11px;font-weight:700;letter-spacing:.4px;color:var(--navy);min-width:0}
.cbm-app label small{font-weight:500;color:var(--muted);letter-spacing:0}
.cbm-app input,.cbm-app select,.cbm-app textarea{font:inherit;font-size:13px;font-weight:500;color:var(--ink);background:#fff;border:1px solid #afc0cb;border-radius:0;min-height:48px;padding:11px 14px;width:100%}
.cbm-app select{appearance:none;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23001835' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center;padding-right:38px}
.cbm-app input:focus,.cbm-app select:focus,.cbm-app textarea:focus,.cbm-app button:focus-visible,.cbm-app a:focus-visible{outline:3px solid #0a6b5d;outline-offset:2px;border-color:#0a6b5d}
.cbm-settings{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;padding:22px;background:var(--wash);border:1px solid var(--line)}

/* tabs */
.cbm-tabs{display:flex;flex-wrap:wrap;gap:7px;margin:28px 0 0;padding-bottom:22px;border-bottom:1px solid var(--line)}
.cbm-tabs button{display:inline-flex;align-items:center;gap:10px;min-height:46px;padding:10px 20px;border:1px solid var(--line);background:#fff;color:var(--navy);font:inherit;font-size:12px;font-weight:700;cursor:pointer;transition:background .2s,border-color .2s}
.cbm-tabs button:hover{background:#ecfaf6;border-color:#087260}
.cbm-tabs button[aria-selected=true]{background:var(--navy);border-color:var(--navy);color:#fff}
.cbm-tabs button span{font-size:8px;letter-spacing:1.2px;font-weight:800;background:var(--teal);color:var(--navy);padding:4px 7px;border-radius:20px}
[role=tabpanel]{padding-top:22px}
[role=tabpanel][hidden]{display:none}

/* package table */
.cbm-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.cbm-table{width:100%;border-collapse:collapse;font-size:12px}
.cbm-table th{text-align:left;font-size:10px;font-weight:700;letter-spacing:.3px;color:var(--muted);padding:0 6px 10px;white-space:nowrap}
.cbm-table td{padding:5px 6px;vertical-align:middle}
.cbm-table input,.cbm-table select{min-height:44px;padding:9px 10px;font-size:13px;min-width:70px}
.cbm-table select{min-width:105px}
.cbm-row-cbm{font-weight:700;color:var(--navy);white-space:nowrap;min-width:64px}
.cbm-table td:last-child{white-space:nowrap}
.cbm-icon{width:36px;height:36px;border:1px solid var(--line);background:#fff;color:var(--navy);font-size:15px;line-height:1;cursor:pointer;margin-left:4px}
.cbm-icon:hover{background:#ecfaf6;border-color:#087260}
.cbm-icon[data-del]:hover{background:#fdf0ef;border-color:#b42c24;color:#b42c24}
.cbm-add{margin-top:14px;gap:20px;cursor:pointer;font-family:inherit}
.visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* paste */
.cbm-help{font-size:13px;line-height:1.75;color:var(--muted);margin:0 0 18px;max-width:760px}
.cbm-help b{color:var(--navy)}
.cbm-paste-options{display:grid;grid-template-columns:2fr 1fr 1fr;gap:14px;margin-bottom:18px}
.cbm-app .cbm-paste-label{display:block;margin-bottom:7px}
.cbm-app textarea{min-height:190px;resize:vertical;line-height:1.75;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px}
.cbm-paste-actions{display:flex;gap:22px;margin-top:10px}
.cbm-paste-actions .textlink{background:none;border:0;padding:0;font:inherit;font-size:12px;font-weight:700;color:#087260;cursor:pointer;text-decoration:underline;text-underline-offset:4px}
#cbm-paste-report{margin-top:24px}
.cbm-paste-summary{font-size:12px;font-weight:700;color:var(--navy);margin:0 0 12px}
.cbm-errors{list-style:none;margin:0 0 14px;padding:14px 16px;border-left:3px solid #b42c24;background:#fdf0ef;font-size:12px;line-height:1.7;color:#7d1f19}
.cbm-errors[hidden]{display:none}
.cbm-preview{border:1px solid var(--line)}
.cbm-preview th{padding:10px 12px;background:var(--wash)}
.cbm-preview td{padding:10px 12px;border-top:1px solid var(--line)}
.cbm-preview td:last-child{font-weight:700;color:var(--navy)}

/* results */
.cbm-results{position:sticky;top:80px;background:var(--navy);color:#fff;padding:30px}
.cbm-results .eyebrow.light{background:var(--teal);color:var(--navy)}
.cbm-empty{font-size:13px;line-height:1.7;color:#b7c6d2;margin:22px 0 0}
.cbm-empty[hidden],#cbm-results-body[hidden]{display:none}
.cbm-hero-figure{display:flex;flex-direction:column;gap:6px;margin:24px 0 20px;padding-bottom:20px;border-bottom:1px solid #29445b}
.cbm-hero-figure span{font-size:10px;font-weight:700;letter-spacing:1.4px;text-transform:uppercase;color:#9fb2c2}
.cbm-hero-figure strong{font-size:20px;font-weight:700;color:var(--teal)}
.cbm-hero-figure strong b{font-size:44px;font-weight:800;letter-spacing:-1.5px;color:#fff;line-height:1.05}
.cbm-hero-figure em{font-style:normal;font-size:12px;color:#9fb2c2}
.cbm-figures{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:0 0 24px}
.cbm-results .cbm-figures>div{display:block;min-width:0;padding:0;background:none;font-size:inherit;line-height:1.4}
.cbm-figures dt{font-size:10px;font-weight:700;letter-spacing:.8px;text-transform:uppercase;color:#9fb2c2}
.cbm-figures dt small{display:block;text-transform:none;letter-spacing:0;font-weight:500;font-size:10px;color:#7f97aa;margin-top:3px}
.cbm-figures dd{margin:6px 0 0;font-size:17px;font-weight:700;overflow-wrap:anywhere}
.cbm-results .cbm-figures>.cbm-charge{grid-column:1/-1;padding:14px 16px;background:#092743;border-left:3px solid var(--yellow)}
.cbm-figures .cbm-charge dd{font-size:22px;color:var(--yellow)}
.cbm-results .aside-label{display:block;font-size:10px;font-weight:700;letter-spacing:1.4px;color:#9fb2c2;margin-bottom:12px}
.cbm-boxes{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.cbm-boxes li{display:grid;grid-template-columns:1fr;gap:6px;font-size:12px}
.cbm-boxes li span{font-weight:700}
.cbm-boxes b{font-weight:500;font-size:11px;color:#b7c6d2}
.cbm-bar{height:7px;background:#29445b;overflow:hidden}
.cbm-bar i{display:block;height:100%;background:var(--teal);transition:width .3s}
.cbm-boxes li.over .cbm-bar i{background:#e8755d}
.cbm-boxes li.over b{color:#f2a493}
.cbm-note{font-size:11px;line-height:1.6;color:#7f97aa;margin:12px 0 24px}
.cbm-actions{display:grid;gap:10px}
.cbm-actions .btn{width:100%;gap:15px;cursor:pointer;font-family:inherit}
.cbm-actions .btn.outline{color:#fff;border-color:#5c7488;background:transparent}
.cbm-actions .btn.outline:hover{border-color:var(--teal)}
.cbm-actions .textlink{background:none;border:0;padding:8px 0 0;font:inherit;font-size:12px;font-weight:600;color:#9fb2c2;cursor:pointer;text-decoration:underline;text-underline-offset:4px;justify-self:start}
.cbm-guide{padding-top:40px}
@media(prefers-reduced-motion:reduce){.cbm-bar i{transition:none}}

@media(max-width:1100px){
 .cbm-app{grid-template-columns:1fr}
 .cbm-results{position:static}
 .cbm-settings{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:620px){
 .cbm-settings{grid-template-columns:1fr 1fr;padding:16px;gap:12px}
 .cbm-paste-options{grid-template-columns:1fr}
 .cbm-tabs button{flex:1 1 100%;justify-content:center}
 .cbm-results{padding:24px 20px}
 .cbm-hero-figure strong b{font-size:38px}
 /* package rows become cards */
 .cbm-table:not(.cbm-preview) thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
 .cbm-table:not(.cbm-preview),.cbm-table:not(.cbm-preview) tbody{display:block}
 .cbm-table:not(.cbm-preview) tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:14px;margin-bottom:10px;border:1px solid var(--line);background:#fff}
 .cbm-table:not(.cbm-preview) td{display:block;padding:0}
 .cbm-table:not(.cbm-preview) td:nth-child(4),.cbm-table:not(.cbm-preview) td:nth-child(5){grid-column:span 1}
 .cbm-table:not(.cbm-preview) td::before{display:block;font-size:9px;font-weight:700;letter-spacing:.4px;color:var(--muted);margin-bottom:4px}
 .cbm-table:not(.cbm-preview) td:nth-child(1)::before{content:"Length"}
 .cbm-table:not(.cbm-preview) td:nth-child(2)::before{content:"Width"}
 .cbm-table:not(.cbm-preview) td:nth-child(3)::before{content:"Height"}
 .cbm-table:not(.cbm-preview) td:nth-child(4)::before{content:"Weight / pkg"}
 .cbm-table:not(.cbm-preview) td:nth-child(5)::before{content:"Qty"}
 .cbm-table:not(.cbm-preview) td:nth-child(6)::before{content:"Type"}
 .cbm-table:not(.cbm-preview) td:nth-child(7){grid-column:1/3;align-self:center;font-size:14px}
 .cbm-table:not(.cbm-preview) td:nth-child(7)::before{content:"CBM"}
 .cbm-table:not(.cbm-preview) td:nth-child(8){align-self:end;text-align:right}
 .cbm-table input,.cbm-table select{min-width:0}
 .cbm-add{width:100%}
}
