.customs-workspace {
    height: 100%; min-height: 0; display: flex; flex-direction: column;
    color: var(--app-ink); background: var(--app-surface-strong); position: relative;
}
.customs-workspace .customs-scope,.customs-workspace .customs-context,.customs-toolbar,.customs-actions,.customs-filter,.customs-job,.customs-final,.customs-finding,.customs-candidate {
    display: flex; align-items: center; gap: .85rem; flex-wrap: wrap;
}
.customs-workspace .customs-scope {padding: .75rem 1.2rem; background: var(--app-surface-soft); border-bottom: 1px solid var(--app-border);}
.customs-shipment {min-width: 11rem; display: grid; gap: .2rem;}
.customs-shipment strong {font-size: 1.2rem; overflow-wrap: anywhere;}
.customs-group-option {display: grid; gap: .15rem; padding: .12rem 0;}
.customs-group-option small {color: var(--app-muted); font-size: .78rem;}
.customs-selector {min-width: 14rem; max-width: 34rem; flex: 1; display: grid; gap: .18rem;}
.customs-selector label,.customs-shipment span,.customs-metrics span,.customs-facts span,.customs-filter label {font-size: .82rem; color: var(--app-muted); font-weight: 600;}
.customs-workspace .customs-context {padding: .65rem 1.2rem; border-bottom: 1px solid var(--app-border);}
.customs-workspace .customs-state,.customs-match {font-size: .82rem; font-weight: 600; color: var(--app-accent-deep);}
.customs-workspace .customs-tabs,.customs-tabs>.k-tabstrip {flex: 1; min-height: 0; display: flex; flex-direction: column;}
.customs-tabs .k-tabstrip-content {flex: 1; min-height: 0; overflow: auto; padding: 0;}
.customs-pane {padding: 1.1rem clamp(.8rem,2vw,2.1rem) 1.6rem; max-width: 100rem; margin: auto; color: var(--app-ink);}
.customs-pane h3,.customs-pane h4,.customs-pane h5 {line-height: 1.25; color: var(--app-ink); font-weight: 650; margin: 0;}
.customs-pane h3 {font-size: 1.25rem;}
.customs-pane h4 {font-size: 1.03rem; margin: 1.15rem 0 .55rem;}
.customs-pane h5 {font-size: .95rem;}
.customs-toolbar,.customs-job,.customs-final,.customs-candidate {justify-content: space-between;}
.customs-toolbar {margin-bottom: .65rem;}
.customs-toolbar h4 {margin: .5rem 0;}
.customs-actions {gap: .45rem;}
.customs-metrics,.customs-facts {display: grid; gap: .65rem; grid-template-columns: repeat(auto-fit,minmax(10rem,1fr));}
.customs-metrics {margin: .9rem 0 1.1rem;}
.customs-metrics>div,.customs-facts>div {display: grid; align-content: start; gap: .25rem; padding: .65rem .95rem;}
.customs-metrics>div {border: 1px solid var(--app-border); border-radius: .45rem; background: var(--app-surface-soft);}
.customs-metrics>div.prominent {background: var(--app-accent-soft); border-color: var(--app-border-strong);}
.customs-metrics strong {font-size: 1.4rem; font-variant-numeric: tabular-nums;}
.customs-facts>div {border-left: 2px solid var(--app-border);}
.customs-facts strong,.customs-side strong {overflow-wrap: anywhere;}
.customs-meta,.customs-muted,.customs-pane small {color: var(--app-muted); font-size: .84rem;}
.customs-meta {margin: .5rem 0;}
.customs-table {width: 100%; border-collapse: collapse; margin: .45rem 0 1rem; font-size: .9rem;}
.customs-table th,.customs-table td {padding: .48rem .65rem; border-bottom: 1px solid var(--app-border); font-variant-numeric: tabular-nums; overflow-wrap: anywhere;}
.customs-table thead,.customs-child {background: var(--app-surface-soft);}
.customs-table .number {text-align: right;}
.customs-child th {padding-left: 1.35rem; font-weight: 400;}
.customs-workspace button:not(.k-button),.customs-workspace select,.customs-workspace input,.customs-editor input,.customs-editor textarea,.customs-editor select {
    font: inherit; border: 1px solid var(--app-border-strong); border-radius: .32rem; color: var(--app-ink); background: var(--app-surface-strong); padding: .29rem .52rem;
}
.customs-workspace button:disabled {opacity: .55;}
.customs-workspace button.customs-link {border: 0; padding-left: 0; color: var(--app-accent-deep); text-decoration: underline;}
.customs-workspace :focus-visible,.customs-editor :focus-visible {outline: 2px solid var(--app-accent); outline-offset: 2px;}
.customs-notice,.customs-job,.customs-upload,.customs-empty,.customs-final {padding: .8rem 1rem; border: 1px solid var(--app-border); border-radius: .4rem; margin: .65rem 0;}
.customs-notice {background: #fff8e9; border-color: #e7d7ad;}
.customs-job,.customs-final {background: var(--app-surface-soft);}
.customs-upload {border-style: dashed; background: var(--app-surface-soft);}
.customs-upload p,.customs-final p,.customs-job p {font-size: .87rem; margin: .3rem 0;}
.customs-job progress {height: .45rem; display: block; width: min(24rem,100%); margin-top: .5rem; accent-color: var(--app-accent);}
.customs-filter {margin: .5rem 0 .75rem;}
.customs-filter label,.customs-editor label {display: grid; gap: .2rem;}
.customs-workspace details {margin: .65rem 0;}
.customs-workspace summary {cursor: pointer; font-weight: 600;}
.customs-finding {align-items: baseline; margin: .5rem 0;}
.customs-detail {background: var(--app-surface-soft); padding: .7rem;}
.customs-candidate {border-bottom: 1px solid var(--app-border); padding: .6rem .2rem;}
.customs-side {display: grid; gap: .15rem; padding-left: .5rem; border-left: .2rem solid var(--app-border-strong);}
.customs-side.official {border-left-color: #399978;}
.customs-report {height: max(24rem,calc(100vh - 21rem));}
.customs-source-viewer {display: grid; height: 100%; grid-template-rows: auto minmax(0,1fr); gap: .5rem;}
.customs-editor {display: grid; gap: .75rem;}
.customs-operation {padding: .25rem 1rem; color: var(--app-muted); font-size: .85rem;}
@media(max-width: 680px) {
    .customs-workspace .customs-scope,.customs-workspace .customs-context {padding: .45rem .65rem; gap: .4rem;}
    .customs-shipment,.customs-selector {min-width: 8rem;}
    .customs-shipment strong {font-size: 1rem;}
    .customs-metrics,.customs-facts {grid-template-columns: repeat(2,minmax(0,1fr));}
    .customs-metrics>div {padding: .45rem;}
    .customs-metrics strong {font-size: 1rem;}
    .customs-tabs .k-tabstrip-items {flex-wrap: nowrap; width: 100%;}
    .customs-tabs .k-tabstrip-items .k-item {min-width: 0;}
    .customs-tabs .k-tabstrip-items .k-link {padding: .5rem .42rem; font-size: .79rem; white-space: nowrap;}
    .customs-diff {font-size: .78rem;}
    .customs-diff thead {position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);}
    .customs-diff,.customs-diff tbody {display: block;}
    .customs-diff tbody tr {display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); padding: .45rem 0; border-bottom: 1px solid var(--app-border);}
    .customs-diff th,.customs-diff td {padding: .2rem .38rem; border: 0;}
    .customs-diff tbody th {grid-column: 1 / -1; font-size: .87rem;}
    .customs-diff td::before {display: block; font-weight: 600; color: var(--app-muted);}
    .customs-diff td:nth-child(2)::before {content: "Cay";}
    .customs-diff td:nth-child(3)::before {content: "Customs";}
    .customs-diff td:nth-child(4)::before {content: "Difference";}
    .customs-diff select {width: 100%; max-width: 8rem;}
    .customs-review-grid .k-master-row {display: grid; grid-template-columns: 1.8rem minmax(0,1fr);}
    .customs-review-grid .k-master-row>td {grid-column: 2;}
    .customs-review-grid .k-master-row>.k-hierarchy-cell {grid-column: 1; grid-row: 1/4;}
    .customs-review-grid .k-master-row td:has(.cay)::before {content: "Cay"; font-weight: 600;}
    .customs-review-grid .k-master-row td:has(.official)::before {content: "Customs"; font-weight: 600;}
}
