/**
 * The load dashboard — pallets, breakdown and manifest as one surface.
 *
 * Replaces .sp-carga-pallets, .sp-composition and .sp-manifest, which were three
 * stacked cards each answering a slice of the same question. See
 * inc/manifest/manifest-dashboard.php for why they were merged.
 *
 * Last in the WooCommerce chain, so it can override single-product-custom.css.
 * It still borrows .sp-manifest__btn and .sp-pallet-reserve-btn from there:
 * those are generic controls, and forking them would give the page two buttons
 * that look the same and drift apart.
 *
 * Numbers are tabular everywhere they sit in a column. A percentage column read
 * as a ranking is the whole point of the panel, and proportional digits make a
 * ranked column look wrong even when every value in it is right.
 */

.sp-load {
    /* NOT redundant. The parent `.product` is a flex column with
       `align-items: start`, so its children size to their content instead of
       filling the column: without this the dashboard comes out ~150px narrower
       than the gallery above it and the tabs below it, flush left, and the page
       reads as though the section is off-centre. The three blocks this replaced
       each carried the same declaration for the same reason. */
    width: 100%;
    margin-top: var(--space-10, 2.5rem);
}

/* Several controls in here are laid out with flex, and any `display` beats the
   user agent's `[hidden] { display: none }`. Both the clear chip and the pager
   are toggled by the attribute alone, so without this they are drawn in states
   that make no sense — a "clear the filter" button on a page with no filter. */
.sp-load [hidden] {
    display: none;
}

/* =============================================
   Header
   ============================================= */

.sp-load__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-6, 1.5rem);
    padding-bottom: var(--space-5, 1.25rem);
    border-bottom: 1px solid var(--border-color, #dee2e6);
}

.sp-load__head-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.sp-load__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.6875rem;
    font-weight: var(--font-semibold, 600);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-gray-500, #6c757d);
}

.sp-load__title {
    margin: 0;
    font-family: var(--font-heading, sans-serif);
    font-size: var(--text-2xl, 1.5rem);
    font-weight: var(--font-semibold, 600);
    letter-spacing: -0.01em;
    line-height: 1.15;
    color: var(--color-secondary, #38444c);
}

.sp-load__source {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4, 1rem);
    margin: 2px 0 0;
    font-size: var(--text-xs, 0.75rem);
    color: var(--color-gray-500, #6c757d);
}

.sp-load__source-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 340px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-load__stats {
    display: grid;
    grid-auto-flow: column;
    gap: var(--space-8, 2rem);
    padding-bottom: 2px;
}

.sp-load__stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sp-load__stat-label {
    font-size: 0.6875rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--color-gray-500, #6c757d);
}

.sp-load__stat-val {
    font-size: var(--text-xl, 1.25rem);
    font-weight: var(--font-semibold, 600);
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
    color: var(--color-secondary, #38444c);
}

.sp-load__download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: var(--border-radius-md, 8px);
    background: #1d6f42;
    color: #fff;
    font-size: var(--text-sm, 0.875rem);
    font-weight: var(--font-semibold, 600);
    text-decoration: none;
    transition: background var(--transition-fast, 150ms);
}

.sp-load__download:hover {
    background: #17572f;
    color: #fff;
}

/* =============================================
   Layout
   ============================================= */

.sp-load__grid {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    gap: var(--space-6, 1.5rem);
    margin-top: var(--space-6, 1.5rem);
    align-items: start;
}

.sp-load__grid--solo {
    grid-template-columns: minmax(0, 1fr);
}

.sp-load__main {
    display: flex;
    flex-direction: column;
    gap: var(--space-6, 1.5rem);
    min-width: 0;
}

.sp-load__panel {
    background: var(--color-white, #fff);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: var(--border-radius-lg, 12px);
    overflow: hidden;
}

.sp-load__dist {
    padding: var(--space-6, 1.5rem);
}

/* =============================================
   Pallet sidebar
   ============================================= */

.sp-load__scopes {
    background: var(--color-white, #fff);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: var(--border-radius-lg, 12px);
    overflow: hidden;
    position: sticky;
    top: var(--space-6, 1.5rem);
}

.sp-load__scopes-head {
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--color-gray-100, #e9ecef);
}

.sp-load__scopes-head h3 {
    margin: 0;
    font-size: 0.7188rem;
    font-weight: var(--font-semibold, 600);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--color-gray-600, #495057);
}

.sp-load__scopes-head p {
    margin: 5px 0 0;
    font-size: 0.7188rem;
    line-height: 1.4;
    color: var(--color-gray-500, #6c757d);
}

.sp-load__scopes-list {
    max-height: 620px;
    overflow-y: auto;
}

.sp-load__scope {
    border-bottom: 1px solid var(--color-gray-100, #e9ecef);
    border-left: 3px solid transparent;
    background: var(--color-white, #fff);
    transition: background var(--transition-fast, 150ms), border-color var(--transition-fast, 150ms);
}

.sp-load__scope:last-child {
    border-bottom: none;
}

.sp-load__scope:hover {
    background: var(--color-gray-50, #f8f9fa);
}

.sp-load__scope.is-selected {
    background: var(--color-primary, #015e7c);
    border-left-color: var(--color-primary-light, #0099cc);
}

.sp-load__scope-btn {
    display: block;
    width: 100%;
    padding: 10px 14px 10px 11px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: var(--color-secondary, #38444c);
}

.sp-load__scope.is-selected .sp-load__scope-btn,
.sp-load__scope.is-selected .sp-load__scope-price {
    color: #fff;
}

.sp-load__scope-top,
.sp-load__scope-foot {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.sp-load__scope-code {
    font-family: var(--font-accent, monospace);
    font-size: 0.7813rem;
    font-weight: var(--font-medium, 500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.sp-load__scope-units {
    font-size: 0.7813rem;
    font-weight: var(--font-semibold, 600);
    white-space: nowrap;
    flex: none;
    font-variant-numeric: tabular-nums;
}

.sp-load__scope-bar {
    display: flex;
    gap: 1.5px;
    height: 4px;
    margin: 7px 0 6px;
    border-radius: 2px;
    overflow: hidden;
    background: var(--color-gray-200, #dee2e6);
}

.sp-load__scope-bar > span {
    height: 100%;
    min-width: 2px;
    background: var(--seg, #c7ccd0);
}

.sp-load__scope-meta {
    font-size: 0.6875rem;
    font-variant-numeric: tabular-nums;
    color: var(--color-gray-500, #6c757d);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.sp-load__scope-tag {
    flex: none;
    font-size: 0.6563rem;
    font-weight: var(--font-semibold, 600);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--color-gray-500, #6c757d);
    white-space: nowrap;
}

.sp-load__scope.is-selected .sp-load__scope-meta,
.sp-load__scope.is-selected .sp-load__scope-tag {
    color: rgba(255, 255, 255, 0.78);
}

.sp-load__scope-buy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 11px 10px 11px;
}

.sp-load__scope-price {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    font-size: var(--text-sm, 0.875rem);
    font-weight: var(--font-bold, 700);
    font-variant-numeric: tabular-nums;
    color: var(--color-primary, #015e7c);
}

.sp-load__scope-off {
    font-size: 0.6563rem;
    font-weight: var(--font-semibold, 600);
    padding: 1px 5px;
    border-radius: var(--border-radius-full, 9999px);
    background: rgba(40, 167, 69, 0.12);
    color: #1d7a33;
}

.sp-load__scope.is-selected .sp-load__scope-off {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

/* The compact reserve control, moved here with the pallet card it belongs to.
   Every state the old accordion could show still shows: a state that quietly
   stopped rendering is a buyer who cannot tell an approved reservation from a
   missing one. */
/* The size carries !important because the theme's own button rules do, and a
   card 264px wide has no room for a full-size button — that is what pushed the
   control past the card edge when it was first written without them. */
.sp-load__scope-buy .sp-pallet-reserve-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: none;
    padding: 5px 10px !important;
    font-size: 0.6875rem !important;
    min-width: 0 !important;
    /* .sync-reserve-btn is the page's full-width primary CTA and sets
       width: 100%. The class has to stay — reservation.js binds on it — so the
       width is what gets overridden, not the class. */
    width: auto !important;
    font-weight: var(--font-semibold, 600);
    line-height: 1.4;
    border: none;
    border-radius: var(--border-radius-sm, 4px);
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition-fast, 150ms), opacity var(--transition-fast, 150ms);
}

.sp-load__scope-buy .sp-pallet-reserve-btn:not([disabled]):not(.sp-pallet-reserve-btn--login):not(.sp-pallet-reserve-btn--pay) {
    background: var(--color-primary, #015e7c);
    color: #fff;
}

.sp-load__scope-buy .sp-pallet-reserve-btn:not([disabled]):not(.sp-pallet-reserve-btn--login):not(.sp-pallet-reserve-btn--pay):hover {
    background: var(--color-primary-dark, #014555);
}

.sp-load__scope-buy .sp-pallet-reserve-btn--login {
    background: transparent;
    border: 1px solid var(--border-color, #dee2e6);
    color: var(--color-secondary, #38444c);
}

.sp-load__scope-buy .sp-pallet-reserve-btn--pay {
    background: #16a34a;
    color: #fff;
}

.sp-load__scope-buy .sp-pallet-reserve-btn--pay:hover {
    background: #15803d;
    color: #fff;
}

.sp-load__scope-buy .sp-pallet-reserve-btn--sold,
.sp-load__scope-buy .sp-pallet-reserve-btn--reserved,
.sp-load__scope-buy .sp-pallet-reserve-btn--waitlist {
    background: var(--color-gray-50, #f8f9fa);
    color: var(--color-gray-500, #6c757d);
    cursor: default;
}

/* On a selected card the ground is the brand blue, so the outline and the
   "nothing you can do" states need their own contrast rather than inheriting
   colours picked against white. */
.sp-load__scope.is-selected .sp-pallet-reserve-btn:not([disabled]):not(.sp-pallet-reserve-btn--pay) {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.sp-load__scope.is-selected .sp-pallet-reserve-btn[disabled] {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.75);
}

/* =============================================
   Panel chrome shared by both right-hand panels
   ============================================= */

.sp-load__panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-5, 1.25rem);
    flex-wrap: wrap;
}

.sp-load__items .sp-load__panel-head {
    padding: var(--space-5, 1.25rem) var(--space-6, 1.5rem) var(--space-3, 0.75rem);
    align-items: baseline;
}

.sp-load__dist .sp-load__panel-head {
    margin-bottom: var(--space-5, 1.25rem);
}

.sp-load__panel-titles {
    min-width: 0;
}

.sp-load__panel-titleline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.sp-load__panel-titleline h3 {
    margin: 0;
    font-family: var(--font-heading, sans-serif);
    font-size: var(--text-lg, 1.125rem);
    font-weight: var(--font-semibold, 600);
    letter-spacing: -0.01em;
    color: var(--color-secondary, #38444c);
}

.sp-load__chip {
    font-family: var(--font-accent, monospace);
    font-size: var(--text-xs, 0.75rem);
    font-weight: var(--font-medium, 500);
    padding: 3px 9px;
    border-radius: var(--border-radius-sm, 4px);
    background: var(--color-gray-50, #f8f9fa);
    border: 1px solid var(--color-gray-100, #e9ecef);
    color: var(--color-gray-700, #343a40);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-load__clear {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: var(--border-radius-sm, 4px);
    background: var(--color-white, #fff);
    font-size: var(--text-xs, 0.75rem);
    font-weight: var(--font-semibold, 600);
    color: var(--color-gray-600, #495057);
    cursor: pointer;
    transition: border-color var(--transition-fast, 150ms), color var(--transition-fast, 150ms);
}

.sp-load__clear:hover {
    border-color: var(--color-primary, #015e7c);
    color: var(--color-primary, #015e7c);
}

.sp-load__panel-sub {
    margin: 5px 0 0;
    font-size: var(--text-xs, 0.75rem);
    color: var(--color-gray-500, #6c757d);
}

.sp-load__panel-note {
    font-size: var(--text-xs, 0.75rem);
    font-variant-numeric: tabular-nums;
    color: var(--color-gray-500, #6c757d);
    white-space: nowrap;
}

.sp-load__toggle {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: var(--border-radius-md, 8px);
    background: var(--color-gray-50, #f8f9fa);
    flex: none;
}

.sp-load__toggle button {
    border: none;
    cursor: pointer;
    font: inherit;
    font-size: var(--text-xs, 0.75rem);
    font-weight: var(--font-semibold, 600);
    padding: 6px 14px;
    border-radius: 6px;
    background: transparent;
    color: var(--color-gray-500, #6c757d);
}

.sp-load__toggle button.is-on {
    background: var(--color-white, #fff);
    color: var(--color-secondary, #38444c);
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));
}

/* =============================================
   Breakdown
   ============================================= */

.sp-load__stack {
    display: flex;
    gap: 2px;
    width: 100%;
    height: 10px;
    margin-bottom: var(--space-4, 1rem);
    border-radius: 5px;
    overflow: hidden;
    background: var(--color-gray-100, #e9ecef);
}

.sp-load__stack-seg {
    height: 100%;
    min-width: 3px;
    background: var(--seg, #c7ccd0);
}

.sp-load__rows {
    display: flex;
    flex-direction: column;
}

.sp-load__row {
    display: grid;
    grid-template-columns: minmax(120px, 190px) minmax(0, 1fr) 60px 200px;
    align-items: center;
    gap: var(--space-4, 1rem);
    width: 100%;
    padding: 9px 8px;
    border: none;
    border-radius: var(--border-radius-sm, 4px);
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-fast, 150ms);
}

.sp-load__row:hover:not(:disabled) {
    background: var(--color-gray-50, #f8f9fa);
}

.sp-load__row:disabled {
    cursor: default;
}

.sp-load__row.is-selected {
    background: rgba(1, 94, 124, 0.07);
}

.sp-load__row-name {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: var(--text-sm, 0.875rem);
    font-weight: var(--font-semibold, 600);
    color: var(--color-secondary, #38444c);
}

.sp-load__row-name > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-load__swatch {
    width: 9px;
    height: 9px;
    flex: none;
    border-radius: 2px;
    background: var(--seg, #c7ccd0);
}

.sp-load__swatch--sm {
    width: 7px;
    height: 7px;
}

.sp-load__row-track {
    height: 14px;
    border-radius: 3px;
    background: var(--color-gray-50, #f8f9fa);
    overflow: hidden;
}

.sp-load__row-fill {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: 3px;
    background: var(--seg, #c7ccd0);
}

.sp-load__row-pct {
    font-size: var(--text-sm, 0.875rem);
    font-weight: var(--font-semibold, 600);
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--color-secondary, #38444c);
}

.sp-load__row-meta {
    font-size: var(--text-xs, 0.75rem);
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
    color: var(--color-gray-500, #6c757d);
}

/* Subcategories sit UNDER their category rather than replacing the list, so
   they are indented and their bars are lighter: they are a level down, not a
   competing set of categories. */
.sp-load__subs {
    padding: 2px 0 8px 26px;
    border-left: 2px solid var(--color-gray-100, #e9ecef);
    margin-left: 12px;
}

.sp-load__row--sub .sp-load__row-name {
    font-size: var(--text-xs, 0.75rem);
    font-weight: var(--font-normal, 400);
    color: var(--color-gray-600, #495057);
}

.sp-load__row--sub .sp-load__row-track {
    height: 8px;
}

.sp-load__row--sub .sp-load__row-pct {
    font-size: var(--text-xs, 0.75rem);
    font-weight: var(--font-medium, 500);
}

/* =============================================
   Items
   ============================================= */

.sp-load__search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 var(--space-6, 1.5rem) var(--space-3, 0.75rem);
    padding: 7px 12px;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: var(--border-radius-md, 8px);
    color: var(--color-gray-400, #adb5bd);
}

.sp-load__search input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: none;
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-secondary, #38444c);
}

.sp-load__table-wrap {
    max-height: 560px;
    overflow: auto;
}

.sp-load__table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm, 0.875rem);
}

.sp-load__table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px var(--space-3, 0.75rem);
    background: var(--color-gray-50, #f8f9fa);
    border-bottom: 1px solid var(--border-color, #dee2e6);
    font-size: 0.6563rem;
    font-weight: var(--font-semibold, 600);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
    color: var(--color-gray-500, #6c757d);
}

.sp-load__table td {
    padding: 10px var(--space-3, 0.75rem);
    border-bottom: 1px solid var(--color-gray-100, #e9ecef);
    color: var(--color-gray-700, #343a40);
    vertical-align: top;
}

.sp-load__table tbody tr:last-child td {
    border-bottom: none;
}

.sp-load__table tbody tr:hover {
    background: var(--color-gray-50, #f8f9fa);
}

.sp-load__table th:first-child,
.sp-load__table td:first-child {
    padding-left: var(--space-6, 1.5rem);
}

.sp-load__table th:last-child,
.sp-load__table td:last-child {
    padding-right: var(--space-6, 1.5rem);
}

.sp-load__num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.sp-load__mono {
    font-family: var(--font-accent, monospace);
    font-size: var(--text-xs, 0.75rem);
    color: var(--color-gray-600, #495057);
    white-space: nowrap;
}

.sp-load__cell-cat {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.sp-load__cell-sub {
    color: var(--color-gray-500, #6c757d);
}

.sp-load__empty {
    padding: var(--space-8, 2rem) var(--space-6, 1.5rem);
    text-align: center;
    color: var(--color-gray-500, #6c757d);
}

.sp-load__items.is-loading .sp-load__table-wrap {
    opacity: 0.45;
    transition: opacity var(--transition-fast, 150ms);
}

.sp-load__pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4, 1rem);
    padding: var(--space-3, 0.75rem) var(--space-6, 1.5rem);
    border-top: 1px solid var(--color-gray-100, #e9ecef);
    font-size: var(--text-xs, 0.75rem);
    font-variant-numeric: tabular-nums;
    color: var(--color-gray-500, #6c757d);
}

.sp-load__pager button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: var(--border-radius-sm, 4px);
    background: var(--color-white, #fff);
    font-size: var(--text-xs, 0.75rem);
    font-weight: var(--font-semibold, 600);
    color: var(--color-gray-700, #343a40);
    cursor: pointer;
}

.sp-load__pager button:hover:not(:disabled) {
    border-color: var(--color-primary, #015e7c);
    color: var(--color-primary, #015e7c);
}

/* A blocked control has to look blocked. The theme has no global :disabled
   state, which is why this is spelled out here. */
.sp-load__pager button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.sp-load__gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3, 0.75rem);
    padding: var(--space-6, 1.5rem);
    border-top: 1px solid var(--color-gray-100, #e9ecef);
    background: var(--color-gray-50, #f8f9fa);
    text-align: center;
}

.sp-load__gate > i {
    font-size: var(--text-xl, 1.25rem);
    color: var(--color-primary, #015e7c);
}

.sp-load__gate p {
    margin: 0;
    font-size: var(--text-sm, 0.875rem);
    color: var(--color-gray-600, #495057);
}

.sp-load__gate-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3, 0.75rem);
}

/* =============================================
   Narrow screens
   ============================================= */

@media (max-width: 1024px) {
    .sp-load__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    /* The sidebar becomes a horizontal rail. Sticky would pin a row of pallet
       cards over the panel they filter. */
    .sp-load__scopes {
        position: static;
    }

    .sp-load__scopes-list {
        display: flex;
        max-height: none;
        overflow-x: auto;
    }

    .sp-load__scope {
        flex: none;
        width: 240px;
        border-bottom: none;
        border-right: 1px solid var(--color-gray-100, #e9ecef);
        border-left-width: 0;
        border-top: 3px solid transparent;
    }

    .sp-load__scope.is-selected {
        border-top-color: var(--color-primary-light, #0099cc);
    }
}

@media (max-width: 782px) {
    .sp-load__head {
        align-items: flex-start;
    }

    .sp-load__stats {
        grid-auto-flow: row;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-3, 0.75rem) var(--space-6, 1.5rem);
        width: 100%;
    }

    /* The bar and the percentage carry the reading; the metric line is the
       first thing that can go when there is no room for four columns. */
    .sp-load__row {
        grid-template-columns: minmax(0, 1fr) 52px;
        gap: 8px 10px;
        padding: 10px 8px;
    }

    .sp-load__row-track {
        grid-column: 1 / -1;
        order: 3;
    }

    .sp-load__row-meta {
        grid-column: 1 / -1;
        order: 4;
        text-align: left;
    }

    .sp-load__table th:first-child,
    .sp-load__table td:first-child {
        padding-left: var(--space-4, 1rem);
    }

    .sp-load__table th:last-child,
    .sp-load__table td:last-child {
        padding-right: var(--space-4, 1rem);
    }
}
