.weight-dialog { width:min(1050px,95vw);max-height:94dvh;padding:24px;box-sizing:border-box;overflow:auto;color:var(--ink,#15202b); }
.weight-heading { display:flex;justify-content:space-between;align-items:start;gap:16px;position:sticky;top:-24px;background:white;padding:16px 0;z-index:2;border-bottom:1px solid var(--border,#d7dfe5); }
.weight-heading h2 { margin:0;font-size:1.4rem;color:var(--ink,#15202b); }.weight-heading p { margin:6px 0;font-size:.85rem;color:var(--ink,#15202b); }
.weight-settings { display:grid;grid-template-columns:1fr 1fr;gap:12px 20px;align-items:end; }.weight-settings .actions { grid-column:1/-1; }
.weight-dialog button,.weight-axle-dialog button,.weight-dialog input,.weight-dialog select,.weight-axle-dialog input,.weight-axle-dialog select { min-height:48px;box-sizing:border-box; }
.weight-dialog button,.weight-axle-dialog button { cursor:pointer; }.weight-dialog button:hover:not(:disabled),.weight-axle-dialog button:hover:not(:disabled) { filter:brightness(.94); }
.weight-dialog button:disabled,.weight-axle-dialog button:disabled { cursor:default;opacity:.6; }
.weight-dialog :focus-visible,.weight-axle-dialog :focus-visible { outline:3px solid #2877a8;outline-offset:3px; }
.weight-dialog [aria-invalid="true"],.weight-axle-dialog [aria-invalid="true"] { border:2px solid #a62b25; }
.weight-dialog details { border-top:1px solid var(--border,#d7dfe5);padding:12px 0; }.weight-dialog summary,.weight-axle-dialog summary { min-height:48px;align-content:center;cursor:pointer; }
.weight-diagram-scroll { overflow-x:auto;border:1px solid var(--border,#d7dfe5);border-radius:6px;background:#fff;scrollbar-gutter:stable; }
#weight-top { position:relative; }
#weight-top .weight-axle-button { position:absolute;top:calc(var(--axle-button-top) - 5px);transform:translate(-50%,-50%);min-width:48px;padding:0;border:0;background:transparent;color:white;font-size:12px; }
.weight-axle-button span { display:inline-block;padding:2px 5px;border-radius:5px;background:var(--green,#146b4d);line-height:1.1; }
#weight-top { min-width:700px; }#weight-top svg { display:block;width:100%;font-family:inherit;font-size:15px;fill:#163a2e; }
.weight-distance-list { display:grid;grid-template-columns:1fr 1fr;gap:10px 24px; }.weight-distance { display:grid;grid-template-columns:90px 1fr 1fr;gap:8px;align-items:center; }.weight-distance label { margin:0;font-size:13px; }.weight-distance input { width:100%; }
.weight-checkbox { display:flex;align-items:center;gap:12px;min-height:48px; }.weight-checkbox input { width:24px!important;height:24px;min-height:24px!important;flex-shrink:0; }
.weight-axle-dialog { width:min(560px,94vw);box-sizing:border-box;max-height:min(90dvh,var(--axle-dialog-height,90dvh));overflow:auto;overscroll-behavior:contain;padding:24px;position:fixed;inset:max(env(safe-area-inset-top),var(--axle-dialog-top,12px)) 0 auto;margin:0 auto; }.weight-pair { display:grid;grid-template-columns:1fr 1fr;gap:16px; }.weight-pair input { width:100%; }
.weight-permit-row { display:grid;grid-template-columns:1fr 1fr 2fr auto;gap:12px;align-items:end;margin-bottom:12px; }.weight-permit-row input { width:100%; }.weight-permit-row label { min-width:0; }
.weight-footer { position:sticky;bottom:-24px;z-index:2;background:white;border-top:1px solid var(--border,#d7dfe5);padding:12px 0 max(12px,env(safe-area-inset-bottom)); }
.weight-dialog { scroll-padding-block:96px; }
@media(max-width:650px) { .weight-footer { bottom:-16px; } }.weight-gross { font-size:1.5rem;font-weight:700;color:var(--green,#146b4d); }
.weight-results-scroll { overflow:auto; }.weight-dialog table { width:100%;border-collapse:collapse; }.weight-dialog th,.weight-dialog td { text-align:left;padding:10px;border-bottom:1px solid var(--border,#d7dfe5); }.weight-dialog caption { text-align:left;font-weight:600;margin:12px 0; }.weight-over { background:#fff0ed;color:#85251e; }.weight-dialog ul { padding-left:22px; }.weight-dialog li { margin:10px 0; }
.weight-preview { width:min(1000px,94vw);max-height:94dvh;overflow:auto; }.weight-preview img { width:100%;height:auto; }.weight-preview>button { position:sticky;top:0;min-height:48px; }
#weight-error:empty,#weight-axle-error:empty { display:none; }
.weight-layout-picker { padding:12px 0 20px;border-bottom:1px solid var(--border,#d7dfe5); }
.weight-axle-button.weight-raised span { background:#edf3f1;color:#163a2e;border:2px dashed #163a2e; }
.weight-reference-scroll { overflow:auto;max-height:70dvh;border:1px solid var(--border,#d7dfe5); }
.weight-reference-scroll img { display:block;width:100%;max-width:none; }
@media(max-width:650px){.weight-dialog { padding:16px; }.weight-heading { top:-16px; }.weight-heading button { max-width:145px; }.weight-settings,.weight-distance-list { grid-template-columns:1fr; }.weight-permit-row { grid-template-columns:1fr 1fr; }.weight-permit-row button { align-self:center; }.weight-footer button { width:100%; }.weight-axle-dialog { padding:16px; }}

#weight-summary{margin:18px 0;padding:12px 16px;border:1px solid var(--border,#d7dfe5);border-radius:8px}#weight-summary h3{margin-top:0}#weight-screening-status.weight-over{padding:8px;border-radius:6px}
#weight-top .weight-axle-total-back { fill:white; }
#weight-top .weight-axle-total,
#weight-top .weight-tandem-total { font-weight:700;font-variant-numeric:tabular-nums; }
#weight-top .weight-tandem-label,
#weight-top .weight-tandem-total { font-size:21px; }
#weight-top svg{font-size:19px}@media(max-width:650px){#weight-top svg{font-size:26px}}

.weight-configuration { margin:16px 0 4px;font-weight:650; }
.weight-layout-picker .actions { margin-top:12px; }
.weight-dialog h3 { margin:22px 0 6px; }
.weight-distance { grid-template-columns:minmax(110px,1.5fr) minmax(0,1fr) minmax(0,1fr);padding:10px 12px;background:#f5f8f7;border:1px solid var(--border,#d7dfe5);border-radius:6px; }
.weight-distance strong { align-self:center; }
.weight-distance strong span { display:block;font-weight:400;margin-top:3px; }
.weight-distance input { font-variant-numeric:tabular-nums; }
.weight-derived-span { margin:10px 0 12px;color:#334b45;font-size:.9rem; }
#weight-summary h3 { margin:0 0 6px; }
#weight-summary #weight-result-title { margin:14px 0 0; }
#weight-exception-guidance.weight-over { padding:8px 10px;border-radius:6px; }
.weight-dialog td { font-variant-numeric:tabular-nums; }
.weight-dialog tr.weight-most-over { font-weight:700; }
.weight-dialog tr.weight-most-over td:last-child { font-size:1.1em; }
@media(max-width:650px) { .weight-distance { padding:8px 10px; } }

#weight-top .weight-span-gross { font-weight:700;font-variant-numeric:tabular-nums; }

#weight-top .weight-limit-capsule { fill:#d71920; }
#weight-top .weight-reading-over { fill:#fff;font-weight:700; }
#weight-top .weight-axle-total.weight-reading-over { font-size:15px; }
#weight-top .weight-tandem-total.weight-reading-over { font-size:17px; }
#weight-top.weight-dense-diagram .weight-axle-total.weight-reading-over { font-size:12px; }
#weight-top.weight-dense-diagram .weight-tandem-total.weight-reading-over { font-size:14px; }


.weight-layout-dialog { width:min(960px,94vw); max-height:90dvh; box-sizing:border-box; }
.weight-layout-dialog button,.weight-layout-dialog input,.weight-layout-dialog select { min-height:48px; }
.weight-layout-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.25fr); gap:20px; align-items:start; }
.weight-side-preview { margin:10px 0; padding:12px; border:1px solid var(--border,#d7dfe5); border-radius:8px; background:#f3f8f5; color:#163a2e; }
.weight-side-preview svg { display:block; width:100%; height:auto; }
.weight-side-preview figcaption { font-weight:600; }
.weight-side-preview p { margin:4px 0 0; }
@media(max-width:650px){.weight-layout-grid { grid-template-columns:1fr; gap:8px; }}


.weight-selected-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.35fr); gap:16px; align-items:center; }
.weight-selected-layout .weight-side-preview { margin:0; }
@media(max-width:520px){.weight-selected-layout { grid-template-columns:1fr; gap:8px; }}

.weight-distance-delete { grid-column:1/-1;justify-self:end; }
#weight-span-error:empty { display:none; }
