/* Shared mobile navigation: theme colors, consistent touch targets. */
.hx-site .user-dropdown-menu .dropdown-item{display:flex;align-items:center;gap:12px;width:100%;min-height:44px;padding:12px 16px;font-family:inherit;font-size:14px;font-weight:400;line-height:1.4;text-align:left;border:0;box-sizing:border-box}
.hx-site .user-dropdown-menu .dropdown-item i{width:20px;font-size:14px;flex:none}
.hx-site .user-dropdown-menu>form{margin:0;padding:0}
@media(max-width:767px){
 .hx-site .user-dropdown-menu{position:fixed;inset:70px 12px auto!important;width:auto!important;max-width:calc(100vw - 24px);max-height:calc(100dvh - 94px);margin:0;border-radius:12px!important;overflow-y:auto;box-sizing:border-box;transform:none!important}
}
.hx-site .mobile-nav{transition:none}
.hx-site .mobile-nav:not(.active){display:none;visibility:hidden;pointer-events:none}
.hx-site .mobile-nav-logo{display:none!important}
.hx-site .mobile-menu-toggle,.hx-site .mobile-nav-close{align-items:center;justify-content:center;width:40px;height:40px;padding:0;border:1px solid var(--hx-border);border-radius:8px;background:var(--hx-surface);color:var(--hx-text);cursor:pointer;flex:none}
.hx-site .mobile-nav-close{display:inline-flex;transform:none!important}
.hx-site .mobile-nav-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 0 16px;border:0;background:transparent}
.hx-site .mobile-nav-title{font-size:16px;font-weight:600;color:var(--hx-text)}
.hx-site .mobile-nav-list{list-style:none;margin:12px 0;padding:0;display:grid;gap:4px;background:transparent;border:0}
.hx-site .mobile-nav-item{margin:0;padding:0}
.hx-site .mobile-nav .mobile-nav-link{display:flex;align-items:center;gap:14px;min-height:46px;padding:12px 14px;border-radius:8px;color:var(--hx-text);text-decoration:none;font-size:14px;line-height:1.4}
.hx-site .mobile-nav-link i{width:20px;text-align:center;flex:none;color:var(--hx-muted)}
.hx-site .mobile-nav-link:hover,.hx-site .mobile-nav-link:focus-visible{background:var(--hx-raised);color:var(--hx-accent)}
.hx-site .mobile-nav-footer{border:0;background:transparent;padding:16px 4px 0;color:var(--hx-muted);font-size:12px}
.hx-site .mobile-nav.active{position:fixed;inset:70px 12px auto!important;width:auto!important;height:auto!important;max-height:calc(100dvh - 94px);padding:18px;overflow:auto;background:var(--hx-surface);border:1px solid var(--hx-border);border-radius:12px;z-index:1100;box-shadow:0 18px 50px #0005;transform:none!important}
.hx-site .mobile-nav-overlay.active{z-index:1090}
@media(max-width:767px){
 html body.hx-site.overflowscreen{height:auto;min-height:100dvh;overflow-y:auto}
 html body.hx-site.overflowscreen .app-container{height:auto;overflow:visible;padding-bottom:90px}
 html body.hx-site[data-page="/SupportedEcuList"] .dataTables_scrollHead{display:none}
 html body.hx-site[data-page="/SupportedEcuList"] #page-table{display:block;width:100%!important}
 html body.hx-site[data-page="/SupportedEcuList"] #page-table thead{display:none}
 html body.hx-site[data-page="/SupportedEcuList"] #page-table tbody{display:grid;gap:12px;width:100%}
 html body.hx-site[data-page="/SupportedEcuList"] #page-table tbody tr{display:grid;grid-template-columns:1fr;gap:8px;padding:16px;background:var(--hx-surface);border:1px solid var(--hx-border);border-radius:10px}
 html body.hx-site[data-page="/SupportedEcuList"] #page-table tbody td{display:block;width:auto!important;padding:0;border:0;overflow-wrap:anywhere}
 html body.hx-site[data-page="/SupportedEcuList"] #page-table td:first-child{color:var(--hx-accent);font-size:12px}
 html body.hx-site[data-page="/SupportedEcuList"] #page-table td:nth-child(2){font-size:15px;font-weight:600}
 html body.hx-site[data-page="/SupportedEcuList"] #page-table .badge{white-space:normal;line-height:1.7;border-radius:6px;max-width:100%}
 html body.hx-site[data-page="/SupportedEcuList"] .table-wrapper{border:0;background:transparent;overflow:visible}
 html body.hx-site[data-page="/EcuEditor"] .ecu-meta{gap:10px;padding:12px;margin:12px}
 html body.hx-site[data-page="/EcuEditor"] .ecu-meta-item{min-width:0;overflow-wrap:anywhere;padding-right:10px}
 html body.hx-site[data-page="/EcuEditor"] #completed_box>.card-header{padding:16px}
}
html body.hx-site.no-scroll{overflow:hidden!important}
/* Keep the ECU catalogue viewport bounded; only its records scroll. */
html body.hx-site.overflowscreen:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"],[data-page="/EcuEditor"]){height:100dvh;min-height:0;overflow:hidden;display:flex;flex-direction:column}
html body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"],[data-page="/EcuEditor"]) .main-header{flex-shrink:0}
html body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"],[data-page="/EcuEditor"]) .app-container{flex:1;min-height:0;height:auto;overflow:hidden;padding-top:12px;padding-bottom:12px}
html body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"],[data-page="/EcuEditor"]) .app-container>.container{flex:1;min-height:0;height:100%;padding-top:0;padding-bottom:0;overflow:hidden}
html body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"],[data-page="/EcuEditor"]) :is(.card-fit-screen,.card-body,.table-wrapper,.dataTables_wrapper,.dataTables_scroll){display:flex;flex-direction:column;flex:1;min-height:0;height:auto;overflow:hidden}
html body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"],[data-page="/EcuEditor"]) :is(.card-header,.dt-toolbar,.dt-info,.hx-table-toolbar,.hx-table-footer,.dataTables_paginate,.dataTables_scrollHead){flex-shrink:0}
html body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"],[data-page="/EcuEditor"]) .dataTables_scrollBody{flex:1 1 0;min-height:0!important;height:0!important;max-height:none!important;overflow:auto!important;overscroll-behavior:contain}
html body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"],[data-page="/EcuEditor"]) .dataTables_paginate{float:none;display:flex;justify-content:center;align-items:center;gap:2px;padding:8px 0;flex-wrap:wrap}
html body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"],[data-page="/EcuEditor"]) .dataTables_paginate .paginate_button{margin:0;padding:6px 8px;min-width:28px}
html body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"],[data-page="/EcuEditor"]) .hx-table-footer{justify-content:center}
@media(max-width:767px){
 html body.hx-site[data-page="/FileHistory"] .hx-file-identity{min-width:0}
 html body.hx-site[data-page="/FileHistory"] .hx-file-row .badge{white-space:normal;overflow-wrap:anywhere}
 html body.hx-site[data-page="/FileHistory"] .dataTables_scrollBody{padding:6px;scrollbar-gutter:stable}
 html body.hx-site[data-page="/FileHistory"] .hx-file-row>td{border:0!important;padding:0 0 12px!important;min-width:0}
 html body.hx-site[data-page="/FileHistory"] .hx-file-row>td:last-child{padding:12px 0 0!important}
 html body.hx-site[data-page="/FileHistory"] .hx-file-row .flex{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
 html body.hx-site[data-page="/FileHistory"] .hx-file-row form{margin:0;flex:0 0 auto;max-width:100%}
 html body.hx-site[data-page="/FileHistory"] .hx-file-row .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:auto;min-width:40px;height:auto;min-height:40px;padding:10px;white-space:normal}
 html body.hx-site[data-page="/FileHistory"] .hx-file-row .btn-download{padding:10px 14px}
 html body.hx-site[data-page="/FileHistory"] .hx-file-row .btn-text{display:inline;white-space:normal}
}


/* Editor folds preserve desktop layout while giving mobile records more room. */
@media(max-width:767px){
 html body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"],[data-page="/EcuEditor"]) :is(#page-table,#dtc_table_new) tbody tr>td{border:0!important;box-shadow:none!important}
}
.hx-site .hx-editor-fold{flex:none;min-width:0}
.hx-site .hx-options-fold{display:contents}
.hx-site .hx-editor-fold>summary,.hx-site .hx-dtc-description>summary{display:none}
@media(min-width:768px){
 .hx-site .hx-editor-fold:not([open])>*:not(summary),.hx-site .hx-dtc-description:not([open])>div{display:block}
 .hx-site #ecu-meta-box{margin:12px 16px}
}
@media(max-width:767px){
 html body.hx-site[data-page="/EcuEditor"] #completed_box{min-height:0}
 html body.hx-site[data-page="/EcuEditor"] .hx-editor-fold{display:block;margin:0;max-height:30dvh;overflow:auto}
 html body.hx-site[data-page="/EcuEditor"] .hx-editor-fold>summary{display:list-item;cursor:pointer;padding:9px 12px;font-weight:600;color:var(--hx-text)}
 html body.hx-site[data-page="/EcuEditor"] #toolBar .hx-editor-section-title{display:none}
 html body.hx-site[data-page="/EcuEditor"] #toolBar .dt-toolbar-center{flex:none;width:100%;padding:6px}
 html body.hx-site[data-page="/EcuEditor"] #toolBar .dt-toolbar-right{display:flex;flex-wrap:wrap;gap:8px;padding:6px}
 html body.hx-site[data-page="/EcuEditor"] .dataTables_scrollHead{display:none}
 html body.hx-site[data-page="/EcuEditor"] .dataTables_scrollBody{padding:6px}
 html body.hx-site[data-page="/EcuEditor"] #dtc_table_new{display:block;min-width:0!important;width:100%!important}
 html body.hx-site[data-page="/EcuEditor"] #dtc_table_new thead{display:none}
 html body.hx-site[data-page="/EcuEditor"] #dtc_table_new tbody{display:grid;gap:8px}
 html body.hx-site[data-page="/EcuEditor"] #dtc_table_new tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:12px;border:1px solid var(--hx-border);border-radius:8px;background:var(--hx-surface)}
 html body.hx-site[data-page="/EcuEditor"] #dtc_table_new tbody td{display:block;width:auto!important;border:0;padding:0;min-width:0;overflow-wrap:anywhere}
 html body.hx-site[data-page="/EcuEditor"] #dtc_table_new tbody td:nth-child(3){grid-column:1 / -1}
 html body.hx-site[data-page="/EcuEditor"] .hx-dtc-description>summary{display:list-item;cursor:pointer;color:var(--hx-muted);padding:4px 0}
 html body.hx-site[data-page="/EcuEditor"] .hx-dtc-description>div{padding-top:8px;line-height:1.5}
}
/* All site tables share the same mobile card surface and safe gutters. */
@media(max-width:767px){
 html body.hx-site :is(.table-wrapper,.table-responsive,.dataTables_wrapper,.dataTables_scroll){min-width:0;max-width:100%;box-sizing:border-box}
 html body.hx-site .dataTables_scrollBody{min-width:0;max-width:100%;box-sizing:border-box;padding:8px!important;scrollbar-gutter:stable}
 html body.hx-site table.hx-responsive-table{display:block!important;width:100%!important;min-width:0!important;max-width:100%;border:0!important;table-layout:auto}
 html body.hx-site table.hx-responsive-table thead{display:none!important}
 html body.hx-site .dataTables_scrollHead{display:none!important}
 html body.hx-site .dataTables_scrollHead:has(.hx-card-select-heading){display:block!important;height:auto!important}
 html body.hx-site .dataTables_scrollHeadInner{width:100%!important;padding:0!important}
 html body.hx-site table.hx-responsive-table thead:has(.hx-card-select-heading){display:block!important}
 html body.hx-site table.hx-responsive-table thead th{display:none!important}
 html body.hx-site table.hx-responsive-table thead .hx-card-select-heading{display:block!important;width:auto!important;padding:8px 12px}
 html body.hx-site table.hx-responsive-table .hx-card-select-heading::after{content:"Select all";position:static;margin-inline-start:8px;opacity:1}
 html body.hx-site .dataTables_scrollBody table.hx-responsive-table thead{display:none!important}
 html body.hx-site table.hx-responsive-table tbody{display:grid!important;gap:12px;width:100%;padding:0;margin:0}
 html body.hx-site table.hx-responsive-table tbody tr{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px;padding:14px!important;margin:0;min-width:0;background:var(--hx-surface)!important;border:1px solid var(--hx-border)!important;border-radius:var(--hx-radius,10px);box-shadow:none!important}
 html body.hx-site table.hx-responsive-table tbody tr>td{display:block!important;grid-column:auto!important;min-width:0;width:auto!important;max-width:100%;padding:0!important;border:0!important;box-shadow:none!important;white-space:normal!important;overflow-wrap:anywhere}
 html body.hx-site table.hx-responsive-table tbody td[data-card-label]:not([data-card-label=""]):not(.hx-card-empty)::before{content:attr(data-card-label);display:block;font-size:11px;font-weight:600;line-height:1.4;color:var(--hx-muted);margin-bottom:4px}
 html body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/EcuEditor"],[data-page="/FileHistory"]) table.hx-responsive-table tbody td::before{display:none!important}
 html body.hx-site table.hx-responsive-table :is(.flex,.d-flex,.btn-group){display:flex;flex-wrap:wrap;gap:8px;min-width:0}
 html body.hx-site table.hx-responsive-table form{display:inline-flex;flex:0 1 auto;max-width:100%;margin:0}
 html body.hx-site table.hx-responsive-table .btn{width:auto!important;min-width:40px;min-height:40px;height:auto!important;padding:9px 12px!important;white-space:normal;max-width:100%;overflow-wrap:anywhere}
 html body.hx-site table.hx-responsive-table .btn-text{display:inline!important}
 html body.hx-site table.hx-responsive-table :is(.badge,code){white-space:normal!important;overflow-wrap:anywhere;max-width:100%}
 html body.hx-site :is(.dataTables_filter,.dataTables_length,.hx-table-toolbar,.hx-table-footer,.dataTables_paginate){max-width:100%;flex-wrap:wrap}
 html body.hx-site .dataTables_filter input{max-width:100%;min-width:0}
 html body.hx-site .table-responsive{padding:8px}
}
/* Keep ECU metadata inside the card, including its horizontal margins. */
html body.hx-site #completed_box > .hx-meta-fold { min-width:0; max-width:100%; flex-shrink:0; }
html body.hx-site #completed_box #ecu-meta-box { width:auto; min-width:0; flex-wrap:wrap; }
html body.hx-site #completed_box #ecu-meta-box .ecu-meta-item { min-width:0; max-width:100%; flex-wrap:wrap; white-space:normal; overflow-wrap:anywhere; }
html body.hx-site #completed_box #ecu-meta-box .ecu-meta-item > span { min-width:0; max-width:100%; overflow-wrap:anywhere; }
@media(min-width:768px){
 html body.hx-site #completed_box #ecu-meta-box { margin-bottom:4px; }
 html body.hx-site #completed_box > .card-body { padding-top:4px; gap:8px; }
 html body.hx-site #completed_box #userDtcOff { padding-block:0; margin-block:0; }
 html body.hx-site #completed_box #offDtcDisplay { min-height:28px; padding-block:4px; }
 html body.hx-site #completed_box #offDtcCount { position:static; align-self:center; display:inline-flex; align-items:center; justify-content:center; height:18px; min-width:18px; margin-block:0; padding-block:0; line-height:1; }
}
/* Keep the disabled-code summary bounded in every theme. */
html body.hx-site #userDtcOff{min-width:0;max-width:100%;flex-shrink:0}
html body.hx-site #offDtcDisplay{display:flex;align-items:center;gap:10px;min-width:0;max-width:100%;width:100%;overflow:hidden}
html body.hx-site #offDtcList{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
html body.hx-site #offDtcDisplay :is(.switch-label-title,.badge-count){flex:none}
@media(min-width:768px){
 html body.hx-site #completed_box #toolBar{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
 html body.hx-site #completed_box #toolBar>.dt-toolbar-left{flex:0 1 auto}
 html body.hx-site #completed_box #toolBar #switchContainer{padding-inline:0}
 html body.hx-site #completed_box #toolBar>.hx-options-fold{display:block;flex:1;min-width:0}
 html body.hx-site #completed_box #toolBar>.hx-options-fold::details-content{display:flex;align-items:center;flex-wrap:wrap;gap:12px}
 html body.hx-site #completed_box #toolBar .dt-toolbar-center{flex:1 1 220px;min-width:0}
 html body.hx-site #completed_box #toolBar .dt-toolbar-right{display:flex;align-items:center;justify-content:flex-end;flex:0 0 auto;margin-left:auto;gap:8px}
}
/* On compact desktop widths, keep search and display controls together below the switches. */
@media(min-width:768px) and (max-width:1050px){
 html body.hx-site #completed_box #toolBar { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
 html body.hx-site #completed_box #toolBar > .hx-options-fold,
 html body.hx-site #completed_box #toolBar > .hx-options-fold::details-content { display:contents; }
 html body.hx-site #completed_box #toolBar .dt-toolbar-center { grid-column:1 / -1; grid-row:1; }
 html body.hx-site #completed_box #toolBar > .dt-toolbar-left { grid-column:1; grid-row:2; justify-self:start; }
 html body.hx-site #completed_box #toolBar .dt-toolbar-right { grid-column:2; grid-row:2; }
 html body.hx-site #completed_box #toolBar #switchContainer { padding-block:0; }
}
/* DataTables' vendor gradients must not override the active theme. */
html body.hx-site .dataTables_wrapper .dataTables_paginate .paginate_button{
 background:var(--hx-surface)!important;background-image:none!important;color:var(--hx-text)!important;
 border:1px solid var(--hx-border)!important;border-radius:var(--hx-radius,6px);
 box-shadow:none!important;text-shadow:none;transform:none!important;
}
html body.hx-site .dataTables_wrapper .dataTables_paginate .paginate_button:is(:hover,:active){
 background:var(--hx-raised)!important;color:var(--hx-accent)!important;border-color:var(--hx-accent)!important;box-shadow:none!important;
}
html body.hx-site .dataTables_wrapper .dataTables_paginate .paginate_button.current,
html body.hx-site .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{
 background:var(--hx-accent)!important;color:var(--hx-on-accent)!important;border-color:var(--hx-accent)!important;
}
html body.hx-site .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
html body.hx-site .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:is(:hover,:active){
 background:transparent!important;color:var(--hx-muted)!important;border-color:transparent!important;opacity:.5;cursor:default;
}
html body.hx-site .dataTables_wrapper .dataTables_paginate .paginate_button:focus-visible{outline:2px solid var(--hx-accent);outline-offset:2px}
html body.hx-site .dataTables_paginate .paginate_button i{color:inherit}
/* Processing is a status panel, not a viewport-filling table. */
html body.hx-site[data-page="/EcuEditor"] #job_waiting_box{flex:none;min-height:300px;height:auto}
html body.hx-site[data-page="/EcuEditor"] #job_waiting_box>.card-body{flex:none;display:flex;justify-content:center;align-items:center;padding:32px 20px;overflow:visible}
html body.hx-site #job_waiting_box .text-center{width:100%;padding:0;text-align:center}
html body.hx-site #job_waiting_box .job-spinner{display:block;width:44px;height:44px;margin:0 auto 20px;border:3px solid var(--hx-border);border-top-color:var(--hx-accent);border-radius:50%;animation:hx-processing-spin 1s linear infinite}
html body.hx-site #jobStatusText{margin:0 0 8px;font-size:16px;line-height:1.5}
html body.hx-site #jobStatusSubtext{margin:0 0 16px;line-height:1.5}
html body.hx-site #job_waiting_box .custom-hr{display:none}
@keyframes hx-processing-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){html body.hx-site #job_waiting_box .job-spinner{animation:none}}
html body.hx-site[data-page="/OrdersManagement"] .modal{padding:16px;box-sizing:border-box;overflow-y:auto}
html body.hx-site[data-page="/OrdersManagement"] .modal>.card{margin:auto!important;max-height:calc(100dvh - 32px);overflow:auto;min-width:0}

/* Save completion uses a comfortably spaced status card in every theme. */
html body.hx-site[data-page="/EcuEditor"] #completed_save_box>.job-container{flex:none;min-height:300px;height:auto}
html body.hx-site[data-page="/EcuEditor"] #completed_save_box .card-body{display:flex;flex:none;align-items:center;justify-content:center;padding:32px 24px;overflow:visible}
html body.hx-site #completed_save_box .text-center{width:100%;padding:0}
html body.hx-site #completed_save_box .status-icon{display:inline-block;font-size:44px;margin-bottom:18px}
html body.hx-site #completed_save_box h5{font-size:18px;line-height:1.5;margin:0 0 10px}
html body.hx-site #saveCompletionMessage{margin:0;color:var(--hx-muted);line-height:1.6}
html body.hx-site #completed_save_box .d-flex{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;margin-top:24px}
html body.hx-site #completed_save_box .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:12px 18px;white-space:normal}
@media(max-width:575px){
 html body.hx-site[data-page="/EcuEditor"] #completed_save_box .card-body{padding:28px 16px}
 html body.hx-site #completed_save_box .d-flex .btn{width:100%}
 html body.hx-site #completed_save_box .card-header-row{flex-wrap:wrap;gap:10px}
}

/* Processing failure actions use the active theme in both display modes. */
.hx-site #job_error_box .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:10px 16px;font-size:14px;line-height:1.4;border:1px solid var(--hx-border);border-radius:8px;transform:none}
.hx-site #job_error_box .btn-outline-secondary{background:var(--hx-surface);color:var(--hx-text)}
.hx-site #job_error_box .btn-outline-secondary:hover{background:var(--hx-raised);border-color:var(--hx-accent)}
.hx-site #job_error_box .btn-primary{background:var(--hx-accent);color:var(--hx-on-accent);border-color:var(--hx-accent)}
.hx-site #job_error_box .btn-primary:hover{filter:brightness(.93)}
.hx-site #job_error_box .btn:focus-visible{outline:2px solid var(--hx-accent);outline-offset:3px}
.hx-site #job_error_box .hx-error-actions{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:12px;margin-top:24px}
.hx-site #job_error_box .hx-error-actions>form,.hx-site #job_error_box .hx-error-actions>.btn{margin:0}

/* Mobile editor cards need content height, not the remainder below the toolbar. */
@media (max-width:767px) {
 html body.hx-site.overflowscreen[data-page="/EcuEditor"] { height:auto!important; min-height:100dvh; overflow-y:auto!important; }
 html body.hx-site[data-page="/EcuEditor"] .app-container,
 html body.hx-site[data-page="/EcuEditor"] .app-container > .container,
 html body.hx-site[data-page="/EcuEditor"] :is(#completed_box,.card-fit-screen,.card-body,.table-wrapper,.dataTables_wrapper,.dataTables_scroll) {
  flex:none; height:auto!important; max-height:none!important; overflow:visible;
 }
 html body.hx-site[data-page="/EcuEditor"] .dataTables_scrollBody {
  flex:none; height:auto!important; min-height:240px!important; max-height:65dvh!important;
  overflow:auto!important; overscroll-behavior:auto; -webkit-overflow-scrolling:touch;
 }
 html body.hx-site[data-page="/EcuEditor"] .app-container { padding-bottom:calc(24px + env(safe-area-inset-bottom, 0px)); }
}

/* Compact editor rhythm on phones; desktop and other pages retain their layouts. */
@media (max-width:767px) {
 html[data-variant] body.hx-site[data-page="/EcuEditor"] .app-container { padding-top:12px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] .app-container>.container { padding:0 12px; gap:12px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box { margin:0; border-radius:12px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box>.card-header { padding:12px 14px; min-height:0; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .ecu-header { width:100%; gap:0; margin:0; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .card-header-row { gap:10px; margin:0; align-items:center; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .ecu-brand { gap:5px; font-size:15px; line-height:1.4; min-width:0; flex-wrap:wrap; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #save-btn { min-width:44px; min-height:44px; height:44px; padding:10px; flex:none; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box>.custom-hr { margin:0; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box>.card-body { padding:10px 12px 12px; gap:10px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .hx-editor-fold>summary { min-height:44px; padding:11px 14px; font-size:14px; line-height:22px; box-sizing:border-box; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #ecu-meta-box { margin:0 12px 10px; padding:10px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #userDtcOff { margin:0; padding:0; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #table-wrapper-box { padding:0; margin:0; border:0; box-shadow:none; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .dataTables_scrollBody { padding:0!important; min-height:0!important; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtc_table_new tbody { gap:8px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtc_table_new tbody tr { padding:10px 12px!important; gap:6px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtc_table_new .hx-dtc-description>summary { min-height:36px; padding:8px 0; line-height:20px; font-size:13px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtInfo { padding:8px 0 0; margin:0; font-size:12px; }
}

/* ECU mobile card design. Keep every rule scoped below 768px and inside the
   editor: header-edge clipping, header panels and desktop tables are independent. */
@media (max-width:767px) {
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box { background:transparent; border:0; box-shadow:none; overflow:visible; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box>.card-header { background:var(--hx-surface); border:1px solid var(--hx-border); border-bottom:0; border-radius:12px 12px 0 0; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box>.custom-hr { display:none; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box>.hx-meta-fold { background:var(--hx-surface); border:1px solid var(--hx-border); border-top:0; border-radius:0 0 12px 12px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box>.card-body { padding:10px 0 0; background:transparent; gap:10px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #save-btn .btn-text { display:inline; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #save-btn { width:auto; gap:6px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #offDtcDisplay { width:fit-content; max-width:100%; padding:5px 10px; font-size:12px; border-radius:7px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #toolBar .hx-options-fold { width:100%; max-height:none; overflow:visible; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #toolBar .hx-options-fold>summary { padding:8px 0; font-size:12px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #toolBar :is(.dt-toolbar-center,.dt-toolbar-right) { padding:0; min-width:0; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #toolBar .dt-toolbar-right { padding-top:8px; gap:8px; align-items:center; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #toolBar :is(select,label) { max-width:100%; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #toolBar select { min-height:40px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #switchContainer { display:flex; flex-wrap:wrap; gap:6px; width:100%; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #switchContainer>div { flex:1 1 60px; min-width:0; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #table-wrapper-box { background:transparent; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtc_table_new tbody tr { grid-template-columns:minmax(0,1fr) auto!important; padding:12px!important; gap:5px 8px; border-radius:10px; align-items:start; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtc_table_new tbody tr>td:nth-child(3) { grid-column:1 / -1!important; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtc_table_new .dtc-code { display:block; padding:0; background:transparent; box-shadow:none; white-space:normal; overflow-wrap:anywhere; font-size:12px; line-height:1.7; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtc_table_new .hx-dtc-address { display:block; font-size:14px; font-weight:700; color:var(--hx-text); }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtc_table_new .hx-dtc-separator { display:none; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtc_table_new .hx-dtc-values { color:var(--hx-muted); font-size:11px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtc_table_new .dtc-status { font-size:11px; padding:5px 8px; border-radius:6px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtc_table_new .hx-dtc-description>summary { display:none; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtc_table_new .hx-dtc-description>div { padding-top:2px; font-size:12px; line-height:1.5; color:var(--hx-muted); overflow-wrap:anywhere; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] .dataTables_paginate .paginate_button { min-width:36px; min-height:40px; padding:9px!important; }
}

/* Mobile ECU workspace: reserve header, controls and pagination; scroll records only.
   Enabled only for a loaded editor, so processing/error/download screens keep their flow.
   Do not fix/reposition the header or clip its menus (see header-edge.js). */
@media (max-width:767px) {
 html body.hx-site.overflowscreen[data-page="/EcuEditor"]:has(#completed_box:not([hidden])) {
  height:100dvh!important; min-height:0!important; overflow:hidden!important;
  display:flex; flex-direction:column;
 }
 html body.hx-site[data-page="/EcuEditor"]:has(#completed_box:not([hidden])) .app-container {
  flex:1 1 0; min-height:0; height:0!important; overflow:hidden;
  padding:6px 0 max(6px, env(safe-area-inset-bottom, 0px));
 }
 html body.hx-site[data-page="/EcuEditor"]:has(#completed_box:not([hidden])) .app-container>.container {
  display:flex; flex-direction:column; flex:1 1 0; min-height:0; height:100%!important;
  overflow:hidden; padding:0 10px; gap:0;
 }
 html body.hx-site[data-page="/EcuEditor"] #completed_box:not([hidden]),
 html body.hx-site[data-page="/EcuEditor"] #completed_box:not([hidden]) :is(.card-body,.table-wrapper,.dataTables_wrapper,.dataTables_scroll) {
  display:flex; flex-direction:column; flex:1 1 0; min-height:0;
  height:0!important; max-height:none!important; overflow:hidden;
 }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box>.card-header { padding:8px 12px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box>.card-body { gap:6px; padding-top:6px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .hx-editor-fold { flex:none; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .hx-editor-fold>summary { padding:7px 10px; min-height:36px; font-size:12px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .hx-editor-fold[open] { max-height:24dvh; overflow:auto; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #toolBar .hx-options-fold>summary { padding:6px 0; }
 html body.hx-site[data-page="/EcuEditor"] #completed_box .dataTables_scrollBody {
  flex:1 1 0; height:0!important; min-height:0!important; max-height:none!important;
  overflow:auto!important; overscroll-behavior:contain; -webkit-overflow-scrolling:touch;
 }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .dataTables_paginate {
  flex:none; padding:5px 0; background:var(--hx-surface); border-radius:8px; gap:2px;
 }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .dataTables_paginate .paginate_button {
  min-width:30px; min-height:36px; padding:7px!important;
 }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtInfo { flex:none; padding:3px 0 0; font-size:11px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #dtcKeyboardHelp { margin:0; }
}

/* ECU mobile workspace: overlays keep metadata available without shrinking the list.
   Scoped below 768px; shared header and its iOS clipping contract stay untouched. */
.hx-mobile-editor-button, .hx-mobile-editor-summary { display: none; }
.hx-mobile-editor-dialog {
    color: var(--hx-text, #17263c); background: var(--hx-surface, #fff);
    border: 1px solid var(--hx-border, #cbd5e1); border-radius: 16px;
    width: min(440px, calc(100vw - 24px)); max-height: 80dvh; padding: 16px;
    box-sizing: border-box; overflow: auto;
}
.hx-mobile-editor-dialog::backdrop { background: #0b142466; backdrop-filter: blur(3px); }
.hx-mobile-editor-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.hx-mobile-editor-dialog h2 { margin: 0; font-size: 17px; }
.hx-mobile-editor-dialog > header button { min-width: 44px; min-height: 44px; border: 1px solid var(--hx-border, #cbd5e1); border-radius: 10px; background: transparent; color: inherit; font-size: 26px; }
.hx-mobile-editor-dialog .hx-editor-fold { display: block; border: 0; padding: 0; }
.hx-mobile-editor-dialog .hx-editor-fold > summary { display: none; }
.hx-mobile-editor-dialog :is(.ecu-meta, .dt-toolbar-right, .switch-container) { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 12px; }
.hx-mobile-editor-dialog .ecu-meta-item { max-width: 100%; overflow-wrap: anywhere; }
.hx-mobile-editor-dialog :is(select, .switch-label, .highlight-toggle) { min-height: 44px; }
@media (max-width: 767px) {
    html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .hx-mobile-editor-button {
        display: inline-flex; flex: 0 0 40px; width: 40px; height: 40px; align-items: center; justify-content: center;
        border: 1px solid var(--hx-border, #cbd5e1); border-radius: 9px; background: var(--hx-surface, #f2f5fa); color: var(--hx-text); font-weight: 700;
    }
    html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box > .card-header { padding: 8px 10px; border-radius: 12px 12px 0 0; border-bottom: 0; }
    html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .card-header-row { gap: 7px; }
    html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .ecu-brand { flex: 1; min-width: 0; font-size: 14px; flex-wrap: wrap; gap: 4px; }
    html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #save-btn { min-height: 40px; padding: 8px 11px; font-size: 13px; }
    html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box > .card-body { position: relative; padding-top: 0; gap: 0; }
    html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .hx-mobile-editor-summary { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; margin-bottom: 7px; background: var(--hx-surface, #fff); border: 1px solid var(--hx-border, #cbd5e1); border-top: 0; border-radius: 0 0 12px 12px; font-size: 11px; }
    html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .hx-mobile-editor-summary > .ecu-meta-item { flex: none; margin: 0; padding: 0; gap: 5px; }
    html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #userDtcOff { min-width: 0; margin: 0; padding: 0; flex: 0 1 auto; overflow: visible; border-radius: 0; }
    html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #offDtcDisplay { width: auto; min-height: 24px; padding: 3px 7px; font-size: 11px; gap: 5px; border-radius: 6px; }
    /* Mobile summary retains the power icon and live count; only the code text is hidden. */
    html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #offDtcDisplay #offDtcList { display: none; }
    html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #offDtcDisplay .switch-label-title { display: inline-flex; align-items: center; }
    html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #offDtcDisplay { min-width: 30px; justify-content: center; gap: 6px; }
    html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #offDtcCount { position: static; margin: 0; padding: 0; background: transparent; color: inherit; font-size: 12px; line-height: 18px; font-weight: 700; }
    html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .dataTables_paginate { min-height: 48px; height: 48px; box-sizing: border-box; padding: 5px 34px 5px 88px; white-space: nowrap; overflow-x: auto; flex-wrap: nowrap; }
    html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .paginate_button { min-width: 27px; padding: 6px!important; height: 34px; margin: 0!important; }
    html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #dtInfo { position: absolute; bottom: 0; left: 0; right: 0; height: 48px; padding: 5px; box-sizing: border-box; pointer-events: none; display: block; font-size: 10px; }
    html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #dtInfoText { display: block; max-width: 80px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #dtcKeyboardHelp { display: block; font-size: 9px; padding: 0; margin: 0; }
    html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .dtc-selection-info { display: block; max-width: 80px; }
    html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #dtcKeyboardHelp button { position: absolute; right: 0; top: 8px; width: 30px; height: 32px; min-width: 30px; min-height: 32px; pointer-events: auto; }
}

html body.hx-site .hx-mobile-editor-dialog { position: fixed; inset: 0; margin: auto; height: fit-content; color: var(--hx-text); }
html body.hx-site .hx-mobile-editor-dialog .hx-editor-fold { max-height: none!important; height: auto!important; overflow: visible!important; width: 100%; padding: 0; background: transparent; }
html body.hx-site .hx-mobile-editor-dialog .hx-editor-fold > summary { display: none!important; }
html body.hx-site .hx-mobile-editor-dialog #ecu-meta-box { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; padding: 0; margin: 0; width: 100%; }
html body.hx-site .hx-mobile-editor-dialog .ecu-meta-item { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; color: var(--hx-text); background: var(--hx-surface); border: 1px solid var(--hx-border); border-radius: 8px; white-space: normal; }
html body.hx-site .hx-mobile-editor-dialog .ecu-meta-item span { color: var(--hx-text); overflow-wrap: anywhere; }
@media(max-width:359px) {
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .dataTables_paginate { padding: 5px; height: 44px; min-height: 44px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #dtInfo { position: relative; height: 32px; min-height: 32px; display: flex; align-items: center; gap: 6px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #dtcKeyboardHelp button { top: 0; }
}

html body.hx-site .hx-mobile-editor-dialog .ecu-meta-item { font-size: 13px; }
@media(max-width:767px) {
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .dataTables_paginate { overflow-y: hidden; }
}

/* Selected-fault details are available at every viewport width, in the top layer. */
#offDtcCount { cursor: pointer; border: 0; font-family: inherit; }
#offDtcCount:focus-visible { outline: 2px solid var(--hx-accent); outline-offset: 3px; }
html body.hx-site .hx-selected-dtc-dialog {
 position: fixed; inset: 0; margin: auto; width: min(640px, calc(100vw - 24px));
 max-height: min(760px, 85dvh); box-sizing: border-box; padding: 18px;
 border: 1px solid var(--hx-border); border-radius: 14px;
 background: var(--hx-surface); color: var(--hx-text); overflow: hidden;
}
.hx-selected-dtc-dialog::backdrop { background: #08132299; backdrop-filter: blur(3px); }
.hx-selected-dtc-dialog header, .hx-selected-dtc-dialog footer:not([hidden]) { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hx-selected-dtc-dialog h2 { margin: 0; font-size: 19px; }
.hx-selected-dtc-dialog p { font-size: 13px; margin: 10px 0; }
.hx-selected-dtc-dialog button, .hx-selected-dtc-dialog input {
 border: 1px solid var(--hx-border); background: var(--hx-surface); color: var(--hx-text); border-radius: 8px; padding: 8px 12px; min-height: 44px;
}
.hx-selected-dtc-dialog input { width: 100%; box-sizing: border-box; font-size: 16px; }
.hx-selected-dtc-dialog ul { list-style: none; padding: 0; margin: 12px 0; min-height: 0; flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; }
.hx-selected-dtc-dialog li { padding: 12px; border: 1px solid var(--hx-border); border-radius: 8px; margin-bottom: 8px; overflow-wrap: anywhere; }
.hx-selected-dtc-dialog li strong { display: block; font-family: monospace; font-size: 13px; margin-bottom: 7px; }
.hx-selected-dtc-dialog li span { font-size: 14px; }
.hx-selected-dtc-dialog button:disabled { opacity: .45; }

html body.hx-site .hx-selected-dtc-dialog[open] { display: flex; flex-direction: column; }
.hx-selected-dtc-dialog > :not(ul) { flex: 0 0 auto; }
html body.hx-site #offDtcIcon { border: 0; padding: 0; margin: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
html body.hx-site #offDtcIcon:focus-visible { outline: 2px solid var(--hx-accent); outline-offset: 3px; }

/* Keyboard instructions are desktop-only; keep the selected-row information visible. */
@media (max-width: 1199px), (hover: none) and (pointer: coarse) {
 html body.hx-site #dtcKeyboardHelp .operations-help-button { display: none; }
}

@media (max-width: 767px) {
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .dataTables_paginate {
  padding-right: 5px; overflow: visible; gap: 2px;
 }
 html body.hx-site #completed_box .dataTables_paginate > span { display: inline-flex; gap: 2px; }
 html body.hx-site #completed_box .dataTables_paginate > span .paginate_button:not([data-mobile-page]),
 html body.hx-site #completed_box .dataTables_paginate .ellipsis { display: none; }
}

/* Editor status text is redundant; retain desktop keyboard help separately. */
html body.hx-site[data-page="/EcuEditor"] #dtInfoText,
html body.hx-site[data-page="/EcuEditor"] .dtc-selection-info { display: none!important; }
@media (max-width: 767px) {
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .ecu-brand {
  display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
 }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .ecu-brand > * { display:inline; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .hx-mobile-editor-summary {
  padding:0; margin:0; border:0; border-radius:0; gap:5px; white-space:nowrap;
 }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .hx-mobile-editor-summary > .ecu-meta-item { gap:3px; font-size:10px; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #dtInfo { display:none; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .dataTables_paginate { padding:5px; }
}

/* Align the icon-only save button and count-only mobile selection control. */
@media (max-width: 767px) {
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #save-btn .btn-text { display:none; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #offDtcDisplay {
  width:40px; min-width:40px; max-width:40px; height:40px; min-height:40px; box-sizing:border-box; padding:3px; align-items:center;
  flex:0 0 40px; justify-content:center;
 }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #save-btn { width:40px; min-width:40px; max-width:40px; height:40px; min-height:40px; flex:0 0 40px; padding:8px; box-sizing:border-box; justify-content:center; }
}

@media (max-width: 767px) {
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #offDtcDisplay #offDtcIcon { display:none; }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #offDtcCount { width:100%; font-variant-numeric:tabular-nums; }
}

/* Keep the mobile title flexible beside Save; information is in the toolbar. */
@media (max-width:767px) {
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .card-header-row {
  display:grid; grid-template-columns:minmax(0,1fr) 40px; gap:5px;
 }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .card-header-row > :is([data-editor-panel="info"],#save-btn) { margin:0; justify-self:stretch; }
}

/* DataTables' no-footer divider creates a hard line at the mobile scroll edge. */
@media (max-width:767px) {
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .dataTables_scrollBody,
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .dataTables_scrollBody > table.dataTable.no-footer {
  border-bottom:0!important;
 }
}

/* Inset only the mobile fault cards; preserve the scroll host and fixed controls. */
@media (max-width:767px) {
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtc_table_new tbody tr {
  margin-inline:8px; width:auto; min-width:0;
 }
}
@media (max-width:359px) {
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtc_table_new tbody tr { margin-inline:4px; }
}

/* Keep the saved-file heading, icon and Ready badge on one line. */
html body.hx-site[data-page="/EcuEditor"] #completed_save_box .ecu-header { width:100%; min-width:0; }
html body.hx-site[data-page="/EcuEditor"] #completed_save_box .card-header-row { display:flex; flex-wrap:nowrap; align-items:center; gap:10px; }
html body.hx-site[data-page="/EcuEditor"] #completed_save_box .ecu-brand { display:flex; flex-direction:row; flex-wrap:nowrap; align-items:center; gap:8px; min-width:0; }
html body.hx-site[data-page="/EcuEditor"] #completed_save_box .card-title { white-space:nowrap; }
html body.hx-site[data-page="/EcuEditor"] #completed_save_box .card-header-row > .badge { flex:none; white-space:nowrap; }
@media(max-width:359px) {
 html body.hx-site[data-page="/EcuEditor"] #completed_save_box .card-header { padding:12px; }
 html body.hx-site[data-page="/EcuEditor"] #completed_save_box .card-title { font-size:16px; }
}

/* Mobile catalogue/history: compact header, independently scrolling records and pinned pager. */
@media(max-width:767px){
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .app-container{flex:1 1 0;min-height:0;height:0!important;padding:18px 10px max(6px,env(safe-area-inset-bottom));overflow:hidden}
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .app-container>.container{padding:0!important;max-width:none}
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .card-fit-screen{border:0!important;background:transparent!important;box-shadow:none!important;border-radius:0;padding:0!important;margin:0;max-height:none}
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .card-header{padding:10px!important;border:1px solid var(--hx-border)!important;border-top:3px solid var(--hx-accent)!important;border-bottom:0!important;border-radius:12px 12px 0 0;background:var(--hx-surface)!important;margin:0!important}
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .card-header-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:8px;margin:0;padding:0;border:0}
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .ecu-brand{display:flex;align-items:center;gap:6px;min-width:0;margin:0;flex-wrap:nowrap}
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .ecu-brand>i{width:24px;height:24px;flex:0 0 24px;font-size:18px;border:0;background:transparent;box-shadow:none;padding:0}
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .card-title{font-size:15px;line-height:1.4;white-space:nowrap;margin:0}
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) #infoCount{font-size:10px;padding:5px 6px;white-space:nowrap;flex:none}
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .card-body{padding:0!important;background:transparent;gap:0}
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .table-wrapper{border:0!important;background:transparent!important;border-radius:0;padding:0;margin:0}
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .dataTables_scrollHead{display:none!important}
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .dataTables_scrollBody{padding:0!important;border:0!important;overflow-x:hidden!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) #page-table{width:100%!important;border:0!important;margin:0!important}
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) #page-table tbody tr{margin-inline:8px;min-width:0;width:auto}
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .table-keyboard-bar, html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) #dtInfoText, html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .dataTables_info{display:none!important}
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .dataTables_paginate, html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .compact-table-footer:has(.pagination){flex:none;display:flex;align-items:center;justify-content:center;gap:4px;background:var(--hx-surface);border:1px solid var(--hx-border);border-radius:10px;margin:8px 0 0!important;padding:6px!important;min-height:48px}
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .pagination{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;margin:0;font-size:12px}
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .dataTables_paginate .paginate_button{min-width:30px;min-height:36px;padding:8px 7px!important;font-size:12px}
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .dataTables_paginate .ellipsis{padding:0 2px}
html[data-variant] body.hx-site[data-page="/SupportedEcuList"] .compact-table-footer{display:none!important}
}
@media(max-width:359px){
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) #page-table tbody tr{margin-inline:4px}
html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .card-title{font-size:13px}
}

.history-mobile-pages{display:none}
@media(max-width:767px){
 html[data-variant] body.hx-site[data-page="/FileHistory"] .history-page-summary{display:none}
 html[data-variant] body.hx-site[data-page="/FileHistory"] .history-mobile-pages{display:flex;gap:4px}
 html[data-variant] body.hx-site[data-page="/FileHistory"] .pagination .btn{min-width:32px;min-height:36px;padding:6px 10px;font-size:12px}
}

/* Catalogue/history mobile pager arrows and subtle scroll boundaries. */
@media(max-width:767px){
 html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) :is(.paginate_button.previous,.paginate_button.next,[data-table-previous],[data-table-next]){font-size:0!important;min-width:32px;display:inline-flex;align-items:center;justify-content:center}
 html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) :is(.paginate_button.previous,[data-table-previous])::before{content:"‹";font-size:22px;line-height:1}
 html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) :is(.paginate_button.next,[data-table-next])::before{content:"›";font-size:22px;line-height:1}

}
/* Match the editor's mobile pager and list spacing. */
@media(max-width:767px){
 html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .app-container{padding-top:12px}
 html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) :is(.table-wrapper,.dataTables_wrapper,.dataTables_scroll){gap:0;padding-top:0!important}
 html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) #page-table{border-spacing:0;border-collapse:collapse}
 html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) #page-table tbody{gap:8px;padding-top:0!important}
 html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) :is(.dataTables_paginate,.compact-table-footer:has(.pagination)){height:48px;min-height:48px;max-height:48px;box-sizing:border-box;padding:5px!important;gap:2px;border:0;border-radius:8px;flex-wrap:nowrap;overflow:hidden}
 html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) :is(.pagination,.history-mobile-pages,.dataTables_paginate>span){display:inline-flex;align-items:center;gap:2px;flex-wrap:nowrap;padding:0;margin:0}
 html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) :is(.paginate_button,.pagination .btn){display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;flex:0 0 30px;width:30px;min-width:30px;height:36px;min-height:36px;max-height:36px;padding:6px!important;margin:0!important;font-size:8px;line-height:1;font-weight:500;border:1px solid var(--hx-border);border-radius:14px;box-shadow:none;transform:none}
 html[data-variant] body.hx-site[data-page="/FileHistory"] .pagination .btn-primary{background:var(--hx-accent);border-color:var(--hx-accent);color:var(--hx-on-accent)}
 html[data-variant] body.hx-site[data-page="/SupportedEcuList"] .dataTables_paginate>span .paginate_button:not([data-mobile-page]),
 html[data-variant] body.hx-site[data-page="/SupportedEcuList"] .dataTables_paginate .ellipsis{display:none}
 html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) :is(.paginate_button.previous,.paginate_button.next,[data-table-previous],[data-table-next])::before{font-size:16px}
}
@media(max-width:359px){
 html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) :is(.dataTables_paginate,.compact-table-footer:has(.pagination)){height:44px;min-height:44px;max-height:44px}
}
@media(max-width:767px){
 html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) :is(.card-body,.table-wrapper,.dataTables_wrapper,.dataTables_scroll){display:flex;flex-direction:column;flex:1 1 0;min-height:0;height:0!important;max-height:none!important;gap:0!important}
 html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .dataTables_scrollBody{flex:1 1 0;height:0!important;min-height:0!important;max-height:none!important}
}
/* Exact measurements from the editor's mobile pager. */
@media(max-width:767px){
 html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) .app-container{padding-top:6px!important}
 html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) :is(.dataTables_paginate,.compact-table-footer:has(.pagination)){border-top:1px solid var(--hx-border)}
 html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) :is(.paginate_button,.pagination .btn){padding:7px!important;border-radius:12px}
 html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) :is(.paginate_button.previous,[data-table-previous])::before{content:""}
 html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) :is(.paginate_button.next,[data-table-next])::before{content:""}
 html[data-variant] body.hx-site:is([data-page="/SupportedEcuList"],[data-page="/FileHistory"]) :is(.paginate_button.previous,.paginate_button.next,[data-table-previous],[data-table-next])::before{font-family:"Font Awesome 6 Free";font-weight:900;font-size:8.8px;line-height:1}
}

/* Desktop/tablet table controls; preserve the compact mobile pager. */
.history-desktop-pages{display:none}
body.hx-site .table-toolbar-help>span{display:none}
body.hx-site .table-toolbar-help{margin-inline-start:auto;padding:0;flex:none}
@media(min-width:768px){
 html body.hx-site:is([data-page="/FileHistory"],[data-page="/SupportedEcuList"]) #dtInfoText,
 html body.hx-site[data-page="/FileHistory"] .history-page-summary,
 html body.hx-site[data-page="/SupportedEcuList"] .compact-table-footer,
 html body.hx-site[data-page="/EcuEditor"] #dtInfo{display:none!important}
 html body.hx-site[data-page="/FileHistory"] .history-desktop-pages{display:inline-flex;align-items:center;gap:2px}
 html body.hx-site[data-page="/FileHistory"] .compact-table-footer{justify-content:center;padding:8px 0!important}
 html body.hx-site[data-page="/FileHistory"] .pagination{display:flex;align-items:center;justify-content:center;gap:2px;margin:0}
 html body.hx-site[data-page="/FileHistory"] .pagination .btn{display:inline-flex;align-items:center;justify-content:center;min-width:28px!important;min-height:28px!important;width:28px;height:28px;padding:0!important;font-size:11px;border-radius:50%;box-sizing:border-box}
 html body.hx-site[data-page="/FileHistory"] .pagination .btn-primary{background:var(--hx-accent);color:var(--hx-on-accent);border-color:var(--hx-accent)}
 html body.hx-site[data-page="/FileHistory"] :is([data-table-next],[data-table-previous]){font-size:0!important}
 html body.hx-site[data-page="/FileHistory"] [data-table-next]::before{content:"";font:900 11px "Font Awesome 6 Free"}
 html body.hx-site[data-page="/FileHistory"] [data-table-previous]::before{content:"";font:900 11px "Font Awesome 6 Free"}
 html body.hx-site[data-page="/EcuEditor"] .dt-toolbar-right .dtc-keyboard-help{margin:0;padding:0;flex:none}
}

/* Short desktop windows use the same dialogs, retaining the full-width table. */
@media (min-width:768px) and (max-height:568px) {
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .hx-mobile-editor-button {
  display:inline-flex;flex:0 0 40px;width:40px;height:40px;align-items:center;justify-content:center;
  border:1px solid var(--hx-border);border-radius:9px;background:var(--hx-surface);color:var(--hx-text);font-weight:700;
 }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #toolBar {
  display:flex!important;align-items:center;flex-wrap:nowrap;gap:8px;margin:0 0 8px!important;padding:0!important;
 }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #toolBar .hx-table-search {flex:1;min-width:0;}
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box .hx-mobile-editor-summary {display:flex;flex:none;margin:0;padding:0;}
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #userDtcOff {margin:0;padding:0;}
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #offDtcDisplay {width:40px;min-width:40px;height:40px;min-height:40px;margin:0;padding:0;justify-content:center;}
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #offDtcDisplay :is(#offDtcList,#offDtcIcon) {display:none;}
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box #offDtcCount {position:static;margin:0;}
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box > .card-body {padding-top:8px;}
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box > .custom-hr {display:none;}
}
@media (min-width:768px) and (max-height:568px) {
 html body.hx-site[data-page="/EcuEditor"] .app-container {padding-top:8px!important;padding-bottom:8px!important;}
 html body.hx-site[data-page="/EcuEditor"] .app-container > .container {padding-top:0!important;padding-bottom:0!important;}
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #completed_box > .card-header {padding-top:8px;padding-bottom:8px;}
}

/* Keep the original control arrangement out of the first paint. */
html body.hx-site[data-page="/EcuEditor"] #completed_box:not(.hx-editor-layout-ready) { visibility:hidden; }
/* Supported ECU cards share the FilesManagement surface and compact type scale. */
@media(max-width:767px),(max-width:1024px) and (max-height:500px){
 html[data-variant] body.hx-site[data-page="/SupportedEcuList"] #page-table tbody{gap:8px!important}
 html[data-variant] body.hx-site[data-page="/SupportedEcuList"] #page-table tbody tr,
 html[data-variant] body.hx-site[data-page="/SupportedEcuList"] #page-table tbody tr:hover{
  padding:12px!important;gap:6px!important;border:1px solid var(--hx-border)!important;
  border-radius:12px!important;background:var(--hx-surface)!important;box-shadow:none!important;
 }
 html[data-variant] body.hx-site[data-page="/SupportedEcuList"] #page-table tbody tr>td{padding:0!important;margin:0!important;background:transparent!important;box-shadow:none!important}
 html body.hx-site[data-page="/SupportedEcuList"] #page-table tbody td:first-child{font-size:14px!important;font-weight:600;line-height:21px;color:var(--hx-muted)}
 html body.hx-site[data-page="/SupportedEcuList"] #page-table tbody td:nth-child(2){font-size:12px!important;font-weight:400;line-height:18px}
 html body.hx-site[data-page="/SupportedEcuList"] #page-table .badge{
  display:inline-block;padding:2px 4px!important;margin:0;border:1px solid var(--hx-border)!important;
  border-radius:4px!important;background:var(--hx-bg)!important;color:var(--hx-accent)!important;box-shadow:none!important;
  font-family:inherit;font-size:11px!important;font-weight:400;line-height:16px!important;letter-spacing:normal;white-space:normal;overflow-wrap:anywhere;
 }
}
/* ECU cards use the same surface and spacing as the file cards. */
@media(max-width:767px){
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtc_table_new tbody tr,
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtc_table_new tbody tr:hover{
  padding:12px!important;gap:6px 8px!important;border:1px solid var(--hx-border)!important;
  border-radius:12px!important;background:var(--hx-surface)!important;box-shadow:none!important;
 }
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtc_table_new .hx-dtc-address{font-size:14px;font-weight:600;line-height:21px;color:var(--hx-muted)}
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtc_table_new .hx-dtc-values{font-size:12px;line-height:18px}
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtc_table_new .dtc-status{padding:2px 4px;border-radius:4px;border:1px solid var(--hx-border);background:var(--hx-bg);font-size:11px;line-height:16px;box-shadow:none}
 html[data-variant] body.hx-site[data-page="/EcuEditor"] #dtc_table_new .hx-dtc-description>div{padding-top:0;font-size:12px;line-height:18px}
}
