/* A separate mobile interaction: readable cards, not a squeezed desktop grid.
 * Desktop column widths, visibility and persisted order are never modified. */
.boq-mobile-table-controls,.boq-mobile-details-toggle{display:none}
@media screen and (max-width:767px),screen and (max-width:991px) and (hover:none) and (pointer:coarse){
  html body .boq-mobile-card-panel{display:block!important;flex:none!important;min-width:0!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
  html body .boq-mobile-card-panel[hidden]{display:none!important}
  html body .boq-mobile-table-wrap{display:block!important;flex:none!important;min-width:0!important;max-width:100%!important;overflow:visible!important;max-height:none!important;height:auto!important;min-height:0!important}
  html body table.boq-mobile-table{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;table-layout:auto!important;border-collapse:separate!important;overflow:visible!important}
  .boq-mobile-table>colgroup{display:none!important}
  .boq-mobile-table>tbody{display:flex!important;flex-direction:column;gap:7px;width:100%;min-width:0}
  html body .boq-mobile-table>thead{display:none!important;position:static!important;width:100%;border:1px solid var(--line);margin:0 0 12px;padding:10px;background:var(--white);box-sizing:border-box}
  html body .boq-mobile-table.boq-mobile-head-open>thead{display:block!important}
  .boq-mobile-table>thead>tr{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;border:0!important;background:none!important}
  html body .boq-mobile-table>thead>tr>th{position:static!important;display:block!important;width:auto!important;min-width:0!important;max-width:100%!important;height:auto!important;padding:0!important;border:0!important;overflow:visible!important;white-space:normal!important}
  html body .boq-mobile-table>thead>tr>th[data-boq-mobile-head-control="false"],html body .boq-mobile-table>thead>tr>th[hidden]{display:none!important}
  .boq-mobile-table .boq-column-handle,.boq-mobile-table .boq-column-drag,.boq-mobile-table .column-resizer{display:none!important}
  .boq-mobile-table .boq-table-filter-row{margin-top:10px}
  .boq-mobile-table .boq-table-filter-row th::before,.boq-mobile-table .fn-analysis-filters th::before,.boq-mobile-table .ms-filter-row th::before{content:attr(data-boq-mobile-label);display:block;font-size:12px;font-weight:600;line-height:1.4;padding:0 0 5px;color:var(--muted);overflow-wrap:anywhere}
  .boq-mobile-table-controls{display:flex;width:100%;min-height:44px;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;margin:0 0 12px;border:1px solid var(--line);border-radius:0;background:var(--white);color:var(--ink);font:inherit;text-align:left;cursor:pointer;box-sizing:border-box}
  .boq-mobile-table-controls::after{content:'⌄';font-size:20px;line-height:1}.boq-mobile-table-controls[aria-expanded="true"]::after{content:'⌃'}
  .boq-mobile-table-controls[hidden]{display:none!important}
  html body .boq-mobile-table tbody tr.boq-mobile-card{display:flex!important;flex-wrap:wrap;gap:4px 8px;position:relative;width:100%;min-width:0;max-width:100%;height:auto!important;padding:8px!important;border:1px solid var(--line)!important;background:var(--white);box-sizing:border-box;overflow:visible!important;contain:layout style}
  html body .boq-mobile-table tbody tr.boq-mobile-card>td,html body .boq-mobile-table tbody tr.boq-mobile-card>th{display:block!important;position:static!important;flex:1 1 calc(50% - 8px);width:auto!important;max-width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;padding:0!important;border:0!important;white-space:normal!important;text-overflow:clip!important;overflow:visible!important;line-height:1.4!important;overflow-wrap:anywhere;text-align:left!important;box-sizing:border-box;font-size:14px}
  html body .boq-mobile-table tbody tr.boq-mobile-card>[data-boq-mobile-role="title"]{order:1;flex:1 1 100%;font-size:14px;line-height:1.4!important;font-weight:600}
  html body .boq-mobile-table tbody tr.boq-mobile-card>[data-boq-mobile-role="selection"]{position:absolute!important;top:4px;right:4px;order:0;flex:none;width:44px!important;max-width:44px!important;align-self:center}
  html body .boq-mobile-table tbody tr.boq-mobile-card[data-boq-mobile-selection="true"]>[data-boq-mobile-role="title"]{padding-right:48px!important;min-height:40px!important}
  html body .boq-mobile-table tbody tr.boq-mobile-card[data-boq-mobile-selection-count="2"]>[data-boq-mobile-role="selection"]{width:92px!important;max-width:92px!important}
  html body .boq-mobile-table tbody tr.boq-mobile-card[data-boq-mobile-selection-count="2"]>[data-boq-mobile-role="title"]{padding-right:96px!important}
  html body .boq-mobile-table tbody tr.boq-mobile-card>[data-boq-mobile-role="actions"]{order:4;display:flex!important;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px;flex:1 1 100%}
  html body .boq-mobile-table tbody tr.boq-mobile-card>[data-boq-mobile-role="actions"]>.boq-mobile-details-toggle{margin-left:auto}
  html body .boq-mobile-table tbody tr.boq-mobile-card>[data-boq-mobile-role="amount"],html body .boq-mobile-table tbody tr.boq-mobile-card>[data-boq-mobile-role="quantity"]{order:2;font-variant-numeric:tabular-nums}
  html body .boq-mobile-table tbody tr.boq-mobile-card>[data-boq-mobile-role="status"]{order:3;display:flex!important;align-items:center;justify-content:flex-end;flex:1 1 calc(50% - 8px)}
  html body .boq-mobile-table tbody tr.boq-mobile-card>[data-boq-mobile-role="status"] .status-pill{font-size:11px;line-height:16px;min-height:24px;padding:3px 7px}
  html body .boq-mobile-table tbody tr.boq-mobile-card>[data-boq-mobile-role="secondary"]{order:5;flex:1 1 100%;padding-top:6px!important;border-top:1px solid var(--line)!important}
  html body .boq-mobile-table tbody tr.boq-mobile-card:not(.boq-mobile-expanded)>[data-boq-mobile-role="secondary"]{display:none!important}
  html body .boq-mobile-table tbody tr.boq-mobile-card>[data-boq-mobile-role="secondary"]::before,html body .boq-mobile-table tbody tr.boq-mobile-card>[data-boq-mobile-role="amount"]::before,html body .boq-mobile-table tbody tr.boq-mobile-card>[data-boq-mobile-role="quantity"]::before{content:attr(data-boq-mobile-label);display:block;color:var(--muted);font-size:11px;font-weight:500;line-height:15px;margin-bottom:1px;overflow-wrap:anywhere}
  html body .boq-mobile-table tbody tr.boq-mobile-card>[hidden],html body .boq-mobile-table tbody tr[hidden],html body .boq-mobile-table .boq-span-continuation{display:none!important}
  html body .boq-mobile-table .boq-mobile-details-toggle{display:inline-flex;align-items:center;justify-content:center;width:auto;max-width:100%;min-height:44px;padding:8px 6px;border:0;background:transparent;color:var(--teal);font:inherit;font-size:12px!important;font-weight:500;text-align:left;cursor:pointer;gap:3px}
  html body .boq-mobile-table tbody tr.boq-mobile-card[data-boq-mobile-footer="floating"]{padding-bottom:52px!important}
  html body .boq-mobile-table tbody tr.boq-mobile-card[data-boq-mobile-footer="floating"] .boq-mobile-details-toggle{position:absolute;bottom:4px;right:8px}
  .boq-mobile-details-toggle::after{content:' ⌄'}.boq-mobile-details-toggle[aria-expanded="true"]::after{content:' ⌃'}
  html body .boq-mobile-table .boq-mobile-details-toggle[hidden]{display:none!important}
  html body .boq-mobile-table .boq-mobile-group{display:block!important;width:100%;height:auto!important;min-width:0;padding:0!important;border:0!important}
  html body .boq-mobile-table .boq-mobile-group>td,html body .boq-mobile-table .boq-mobile-group>th{display:block!important;width:100%!important;min-width:0!important;height:auto!important;padding:10px 12px!important;border:1px solid var(--line)!important;white-space:normal!important;line-height:1.5!important;overflow:visible!important;overflow-wrap:anywhere;box-sizing:border-box}
  .boq-mobile-table .group-total{display:block;float:none;margin-top:4px}
  html body .boq-mobile-table :is(button,.icon-btn,.btn,summary,select,input:not([type="checkbox"]):not([type="radio"]),textarea){min-height:44px!important;height:auto!important;max-width:100%!important;font-size:16px!important;box-sizing:border-box}
  html body .boq-mobile-table :is(button,.btn,summary){white-space:normal!important;overflow-wrap:anywhere}
  html body .boq-mobile-table :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){width:100%!important;min-width:0!important;padding:10px!important}
  html body .boq-mobile-table :is(input.quantity,.cell-input,.cost-line-input){border:1px solid var(--line)!important;background:var(--field,var(--white))!important;color:var(--ink)!important;border-radius:0!important}
  html body .boq-mobile-table :is(.icon-btn,.boq-color-button){min-width:44px!important;width:auto!important;display:inline-flex;align-items:center;justify-content:center;padding:10px!important}
  html body .boq-mobile-table input:is([type="checkbox"],[type="radio"]){appearance:none;-webkit-appearance:none;width:44px!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background-color:transparent!important;background-repeat:no-repeat!important;background-position:center!important;background-size:20px 20px!important;cursor:pointer;flex:0 0 44px;box-sizing:border-box}
  html body .boq-mobile-table input[type="checkbox"]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Crect x='1' y='1' width='18' height='18' rx='2' fill='none' stroke='%23828ca2' stroke-width='1.5'/%3E%3C/svg%3E")!important}
  html body .boq-mobile-table input[type="checkbox"]:checked{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Crect x='1' y='1' width='18' height='18' rx='2' fill='%232849ff'/%3E%3Cpath d='m5 10 3 3 7-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important}
  html body .boq-mobile-table input[type="checkbox"]:indeterminate{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Crect x='1' y='1' width='18' height='18' rx='2' fill='%232849ff'/%3E%3Cpath d='M5 10h10' stroke='white' stroke-width='2'/%3E%3C/svg%3E")!important}
  html body .boq-mobile-table input[type="radio"]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='9' fill='none' stroke='%23828ca2' stroke-width='1.5'/%3E%3C/svg%3E")!important}
  html body .boq-mobile-table input[type="radio"]:checked{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='9' fill='none' stroke='%232849ff' stroke-width='1.5'/%3E%3Ccircle cx='10' cy='10' r='5' fill='%232849ff'/%3E%3C/svg%3E")!important}
  html body .boq-mobile-table input:is([type="checkbox"],[type="radio"]):disabled{opacity:.45;cursor:default}
  html body .boq-mobile-table input:is([type="checkbox"],[type="radio"]):focus-visible{outline:2px solid var(--teal);outline-offset:-4px}
  .boq-mobile-table :is(.row-actions,.cost-row-actions,.picker-actions,.catalog-choice){display:flex!important;flex-wrap:wrap;gap:4px;width:100%}
  html body .boq-mobile-table tbody tr.boq-mobile-card>[data-boq-mobile-role="actions"]>:is(.row-actions,.cost-row-actions,.picker-actions){flex:1 1 auto;width:auto;min-width:0}
  html body .boq-mobile-table tbody tr.boq-mobile-card>[data-boq-mobile-role="title"] .cost-record-link{font-size:14px!important;padding:6px 0;text-align:left}
  .boq-mobile-table :is(.description,.description-cell,.cell-secondary,.line-note,.schedule-note,.code-chip,.estimate-id-link){white-space:normal!important;overflow:visible!important;text-overflow:clip!important;max-width:100%;overflow-wrap:anywhere}
  .boq-mobile-table :is(.description-text,.boq-compact-details,.boq-table-cell-details){max-height:none!important;line-clamp:unset!important;-webkit-line-clamp:unset!important}
  /* Last deliberately: compact desktop links and the shared16px control rule
   * must not override mobile primary titles or the short footer caption. */
  html body .boq-mobile-table tbody tr.boq-mobile-card>[data-boq-mobile-role="title"] :is(a,strong,button){font-size:14px!important;line-height:1.4!important}
  html body .boq-mobile-table tbody tr.boq-mobile-card button.boq-mobile-details-toggle{font-size:13px!important;min-height:44px!important}
  /* A material is a small product card: its original private photo, current
   * price, delivery and unit stay visible without changing desktop columns. */
  html body .boq-mobile-table tbody tr.boq-mobile-material>[data-boq-mobile-role="photo"]{display:flex!important;align-items:flex-start;justify-content:center;order:0;flex:0 0 64px;width:64px!important;max-width:64px!important}
  html body .boq-mobile-table tbody tr.boq-mobile-material>[data-boq-mobile-role="title"]{flex:1 1 calc(100% - 80px);min-width:0}
  html body .boq-mobile-table tbody tr.boq-mobile-material>[data-boq-mobile-role="title"]>button{width:100%;padding:0!important;white-space:normal!important;text-align:left;justify-content:flex-start;border:0;background:none;color:var(--ink)}
  html body .boq-mobile-table tbody tr.boq-mobile-material[data-boq-mobile-photo="true"]>[data-boq-mobile-role="title"]{min-height:64px!important}
  html body .boq-mobile-table tbody tr.boq-mobile-material>[data-boq-mobile-role="photo"] .boq-image-cell{width:64px!important;max-width:64px!important;height:64px!important;min-height:64px!important;padding:4px!important;border:1px solid var(--line)!important;border-radius:0!important}
  html body .boq-mobile-table tbody tr.boq-mobile-material>[data-boq-mobile-role="photo"] :is(.p7-thumb,.boq-image-cell img){width:54px!important;max-width:54px!important;height:54px!important;min-height:54px!important;max-height:54px!important;object-fit:contain;border-radius:0!important;background:var(--field,var(--white))}
  html body .boq-mobile-table tbody tr.boq-mobile-material[data-boq-mobile-photo="empty"]>[data-boq-mobile-role="photo"] .boq-image-cell{width:44px!important;max-width:44px!important;height:44px!important;min-height:44px!important}
  html body .boq-mobile-table tbody tr.boq-mobile-material>:is([data-boq-mobile-role="amount"],[data-boq-mobile-role="quantity"]){flex:1 1 calc(33.333% - 8px);font-size:13px!important}
  html body .boq-mobile-table tbody tr.boq-mobile-material>.boq-material-actions{flex:1 1 auto;width:auto}
  html body .boq-mobile-table tbody tr.boq-mobile-material>[data-boq-mobile-role="actions"]>.boq-material-actions{display:flex;flex-wrap:nowrap;gap:4px;flex:0 0 auto;min-width:0}
  html body .boq-mobile-table tbody tr.boq-mobile-material>[hidden][data-boq-mobile-essential="true"]{display:block!important}
  html body .boq-mobile-table tbody tr.boq-mobile-material>[hidden][data-boq-mobile-essential="true"][data-boq-mobile-role="actions"]{display:flex!important}
  html body .boq-mobile-table tbody tr.boq-mobile-material>[hidden][data-boq-mobile-essential="true"][data-boq-mobile-role="photo"]{display:flex!important}
  .boq-mobile-table-controls:focus-visible,.boq-mobile-details-toggle:focus-visible{outline:2px solid var(--teal);outline-offset:2px}
}
@media print{.boq-mobile-table-controls,.boq-mobile-details-toggle{display:none!important}}
@media screen and (forced-colors:active) and (max-width:767px),screen and (forced-colors:active) and (max-width:991px) and (hover:none) and (pointer:coarse){html body .boq-mobile-table input:is([type="checkbox"],[type="radio"]){appearance:auto;-webkit-appearance:auto;background-image:none!important}}
