/* ══ Phone list layout (≤ 768px) ═══════════════════════════════════════════
   Shared by the phone layouts of the reference pages (Paint & Trim Codes,
   Option Codes, Body Types): section tabs, chips that scroll sideways, card
   lists, a corner Add button and bottom sheets, after the Register and Dealers
   mobile layouts. Global (not scoped) so every page uses the same rules; the
   classes all start ml- so they can't collide. Colours and type follow themes.css. */

.ml-page {
    display: flex;
    flex-direction: column;
    padding-bottom: 96px;   /* clear the Add button */
}

.ml-kicker {
    margin: 0;
    font-family: 'Oswald', sans-serif;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
}

.ml-title {
    margin: 2px 0 2px;
    font-family: 'Oswald', sans-serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-primary);
}

.ml-sub {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 300;
    line-height: 1.35;
    color: var(--text-muted);
}

/* ── Section tabs: one equal-width segment each ── */
.ml-tabs {
    display: grid;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    gap: 3px;
    margin-bottom: 10px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-subtle);
}

.ml-tab {
    min-width: 0;
    height: 50px;
    padding: 0 4px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.ml-tab-label {
    font-family: 'Oswald', sans-serif;
    font-size: 15px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.1;
}

.ml-tab-count {
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
}

.ml-tab.is-on {
    background: var(--accent);
    color: var(--accent-hover-text);
    box-shadow: var(--shadow-sm);
}

.ml-tab.is-on .ml-tab-count { color: inherit; opacity: 0.8; }

/* ── Search ── */
.ml-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 4px 0 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
}

.ml-search:focus-within { border-color: var(--accent); }

.ml-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-primary);
    font-family: 'Lato', sans-serif;
    font-size: 16px;   /* 16px stops iOS zooming into the field */
}

.ml-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.ml-search-x {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ml-stripe {
    display: flex;
    height: 4px;
    margin: 12px -16px 0;
}

.ml-stripe span { flex: 1; opacity: 0.85; }
.ml-stripe span:nth-child(1) { background: #c8102e; }
.ml-stripe span:nth-child(2) { background: #1a3a6e; }
.ml-stripe span:nth-child(3) { background: #c9a84c; }
.ml-stripe span:nth-child(4) { background: #2e7d32; }
.ml-stripe span:nth-child(5) { background: #e8e8e8; }
.ml-stripe span:nth-child(6) { background: #8b1a1a; }
.ml-stripe span:nth-child(7) { background: #4a4a4a; }
.ml-stripe span:nth-child(8) { background: var(--accent); }

/* ── Toolbar: sort button + chips that scroll sideways ── */
.ml-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 -16px;
    padding: 10px 0 10px 16px;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
}

.ml-filter-btn {
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--bg-card);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ml-chips {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-right: 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
}

.ml-chips::-webkit-scrollbar { display: none; }

.ml-chip {
    flex: none;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg-card);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Oswald', sans-serif;
    font-size: 15px;
    letter-spacing: 0.04em;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.ml-chip span {
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    letter-spacing: 0;
    color: var(--text-muted);
}

.ml-chip.is-on {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-hover-text);
}

.ml-chip.is-on span { color: inherit; opacity: 0.8; }

.ml-count {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 40px;
    padding: 4px 2px 2px;
    font-size: 13px;
    color: var(--text-muted);
}

.ml-count-sort {
    height: 36px;
    padding: 0 2px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    text-align: right;
    cursor: pointer;
}

.ml-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 40px 16px;
    color: var(--text-muted);
    font-size: 15px;
    text-align: center;
}

.ml-link-btn {
    height: 40px;
    padding: 0 8px;
    border: 0;
    background: transparent;
    color: var(--accent);
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

/* ── Cards ── */
/* Each page sets its item heights (they must match the ItemSize given to Virtualize) */
.ml-item { padding-bottom: 10px; box-sizing: border-box; }

.ml-card {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 6px 10px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
    font-family: 'Lato', sans-serif;
    text-align: left;
    overflow: hidden;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.08s ease, border-color 0.08s ease;
}

.ml-card--stack { padding-left: 14px; }

.ml-card:active {
    transform: scale(0.985);
    border-color: var(--accent);
}

.ml-card-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}

.ml-card-top {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
}

.ml-code {
    flex: none;
    font-family: monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.ml-code--lg { font-size: 18px; }

.ml-mono { font-family: monospace; }

.ml-tag {
    flex: none;
    max-width: 60%;
    padding: 1px 7px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
}

.ml-tag--soft {
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent);
}

.ml-card-lux {
    min-width: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
}

.ml-card-name {
    font-family: 'Oswald', sans-serif;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ml-card-note {
    min-height: 16px;
    font-size: 13px;
    line-height: 16px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ml-card-model {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ml-chev {
    flex: none;
    color: var(--text-muted);
    opacity: 0.6;
}

/* Swatch fill — image, hex colour, or hatched when there's no swatch */
.ml-fill {
    position: relative;
    display: block;
    flex: none;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 6px;
    background-color: var(--bg-subtle);
}

.ml-fill img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ml-fill--none {
    background: repeating-linear-gradient(45deg, var(--border) 0 2px, transparent 2px 7px);
}

.ml-card-sw { width: 56px; height: 56px; border-radius: 8px; }

/* Trim cards: linked paint codes as a strip of chips */
.ml-card-strip {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    height: 24px;
    margin-top: 2px;
    overflow: hidden;
}

.ml-strip-sw { width: 22px; height: 22px; border-radius: 4px; }

.ml-strip-label {
    min-width: 0;
    padding-left: 4px;
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Combination block: body, top half for two-tones, insert band */
.ml-combo {
    position: relative;
    flex: none;
    display: block;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.ml-combo .ml-fill {
    position: absolute;
    inset: 0;
    border: 0;
    border-radius: 0;
}

.ml-combo .ml-combo-top { clip-path: polygon(0 0, 100% 0, 0 100%); }

.ml-combo .ml-combo-insert {
    inset: auto 0;
    top: 41%;
    height: 18%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.ml-card-combo { width: 60px; height: 80px; }

/* A paint on one line: role, swatch chip, code and colour */
.ml-pline {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 13px;
    line-height: 18px;
    color: var(--text-primary);
}

.ml-pline-role {
    flex: none;
    width: 42px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.ml-pline-sw { width: 18px; height: 18px; border-radius: 4px; }

.ml-pline-text {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ml-pline--lg { font-size: 15px; line-height: 22px; gap: 10px; }
.ml-pline--lg .ml-pline-sw { width: 28px; height: 28px; }

.ml-prefix-tile {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
    overflow: hidden;
}

/* ── Add button ── */
.ml-fab {
    position: fixed;
    right: 16px;
    bottom: calc(24px + env(safe-area-inset-bottom));
    z-index: 1000;
    height: 56px;
    padding: 0 22px 0 16px;
    border: 0;
    border-radius: 28px;
    background: var(--accent);
    color: var(--accent-hover-text);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: var(--shadow-md);
    cursor: pointer;
}

/* ── Bottom sheets ── */
.ml-sheet-wrap {
    position: fixed;
    inset: 0;
    z-index: 1350;   /* over the MudBlazor app bar, under its dialogs */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.ml-sheet-backdrop {
    position: absolute;
    inset: 0;
    padding: 0;
    border: 0;
    background: rgba(10, 9, 8, 0.6);
    cursor: pointer;
    animation: ml-fade 0.18s ease-out;
}

.ml-sheet {
    position: relative;
    max-height: 88dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    animation: ml-rise 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ml-sheet--tall { max-height: 94dvh; }

@keyframes ml-fade { from { opacity: 0; } }
@keyframes ml-rise { from { transform: translateY(40px); opacity: 0.4; } }

@media (prefers-reduced-motion: reduce) {
    .ml-sheet, .ml-sheet-backdrop { animation: none; }
    .ml-card { transition: none; }
}

.ml-sheet-grip {
    width: 40px;
    height: 4px;
    margin: 8px auto 0;
    border-radius: 2px;
    background: var(--border);
}

.ml-sheet-head {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px 6px 20px;
}

.ml-sheet-titles { flex: 1; min-width: 0; }

.ml-sheet-kicker {
    margin: 0;
    font-family: 'Oswald', sans-serif;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.ml-sheet-head h2 {
    margin: 0;
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.ml-icon-btn {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ml-sheet-body {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ml-sheet-label {
    margin-top: 6px;
    font-family: 'Oswald', sans-serif;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

.ml-quick-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ml-quick {
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg);
    color: var(--text-primary);
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.ml-quick.is-on {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-hover-text);
}

.ml-segment {
    display: flex;
    align-self: flex-start;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px;
}

.ml-seg {
    height: 38px;
    padding: 0 18px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--text-primary);
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.ml-seg.is-on {
    background: var(--accent);
    color: var(--accent-hover-text);
}

/* Big swatch / combination preview at the top of the sheet */
.ml-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-subtle);
}

.ml-hero-sw { width: 112px; height: 72px; border-radius: 8px; }
.ml-hero-combo { width: 72px; height: 96px; }

.ml-hero-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.ml-hero-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

/* Form fields */
.ml-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0;
}

.ml-field > span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.ml-field em { font-style: normal; color: var(--accent); }
.ml-field i { font-weight: 400; text-transform: none; letter-spacing: 0; }

.ml-input {
    width: 100%;
    height: 46px;
    box-sizing: border-box;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text-primary);
    font-family: 'Lato', sans-serif;
    font-size: 16px;
}

.ml-input:focus { outline: none; border-color: var(--accent); }
.ml-input:disabled { opacity: 0.55; }
.ml-input--mono { font-family: monospace; font-weight: 700; }

.ml-textarea {
    height: auto;
    min-height: 84px;
    padding: 10px 12px;
    line-height: 1.4;
    resize: vertical;
}

/* Read-only details */
.ml-dl { margin: 0; display: flex; flex-direction: column; }

.ml-dl-row {
    display: flex;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--divider);
}

.ml-dl-row dt {
    flex: none;
    width: 108px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-top: 2px;
}

.ml-dl-row dd {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 15px;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.ml-dl-empty { color: var(--text-muted); }

.ml-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}

.ml-section-head .ml-sheet-label { margin-top: 0; }

.ml-paint-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
}

.ml-paint-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--divider);
}

.ml-paint-list li:last-child { border-bottom: 0; }

.ml-pline--preview {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-subtle);
}

.ml-hint {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* Where a paint is used */
.ml-mini-row { display: flex; flex-wrap: wrap; gap: 6px; }

.ml-mini {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 4px 9px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg);
    font-family: monospace;
    font-size: 13px;
    font-weight: 700;
}

.ml-mini small {
    font-family: 'Lato', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
}

.ml-mini--more { color: var(--text-muted); }

.ml-alert {
    padding: 10px 12px;
    border: 1px solid #c0392b;
    border-radius: 6px;
    background: color-mix(in srgb, #c0392b 12%, transparent);
    color: var(--text-primary);
    font-size: 14px;
}

/* Sheet footer buttons */
.ml-sheet-foot {
    display: flex;
    gap: 10px;
    padding: 12px 20px 20px;
    border-top: 1px solid var(--border);
}

.ml-btn {
    height: 48px;
    padding: 0 18px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    font-family: 'Oswald', sans-serif;
    font-size: 15px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}

.ml-btn--sm {
    height: 38px;
    padding: 0 14px;
    font-size: 13px;
    background: var(--bg-card);
}

.ml-btn--primary {
    flex: 1;
    border: 0;
    background: var(--accent);
    color: var(--accent-hover-text);
}

.ml-btn--primary:disabled { opacity: 0.45; cursor: default; }

.ml-btn--danger {
    border-color: #c0392b;
    color: #c0392b;
}

/* A code tile wide enough for a body code (e.g. 80769) */
.ml-prefix-tile--wide {
    width: auto;
    min-width: 52px;
    max-width: 96px;
    padding: 0 10px;
    font-size: 17px;
}

/* ── Plain tappable rows in a sheet (e.g. the model list) ── */
.ml-rows { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }

.ml-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--divider);
}

.ml-row:last-child { border-bottom: 0; }

.ml-row-main {
    flex: 1;
    min-width: 0;
    min-height: 52px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-family: 'Lato', sans-serif;
    text-align: left;
    cursor: pointer;
}

.ml-row-title {
    font-family: 'Oswald', sans-serif;
    font-size: 17px;
    letter-spacing: 0.03em;
}

.ml-row-sub { font-size: 12px; font-weight: 700; color: var(--accent); }
.ml-row.is-on .ml-row-title { color: var(--accent); }

/* ── Small code chips on cards and in sheets (body codes, RPO numbers) ── */
.ml-codes {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    height: 22px;
    overflow: hidden;
}

.ml-codes--wrap { height: auto; flex-wrap: wrap; overflow: visible; gap: 6px; }

.ml-code-chip {
    flex: none;
    padding: 1px 6px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-subtle);
    font-family: monospace;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    color: var(--text-primary);
}

.ml-code-chip--more { color: var(--text-muted); font-family: 'Lato', sans-serif; }

.ml-codes-none { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

.ml-card-desc {
    font-size: 14px;
    line-height: 19px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

/* ── Multi-select as toggle chips (e.g. body types an RPO applies to) ── */
.ml-toggle-row { display: flex; flex-wrap: wrap; gap: 8px; }

.ml-toggle {
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.ml-toggle b { font-family: monospace; font-size: 14px; }
.ml-toggle small { font-size: 12px; color: var(--text-muted); }

.ml-toggle.is-on {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.ml-toggle.is-on small { color: var(--text-primary); }

/* ── Multi-select as a checklist (long lists with descriptions, e.g. RPOs) ── */
.ml-checklist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }

.ml-check {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 6px 2px;
    border-bottom: 1px solid var(--divider);
    cursor: pointer;
}

.ml-check:last-child { border-bottom: 0; }

.ml-check input {
    flex: none;
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: var(--accent);
}

.ml-check-code { flex: none; min-width: 52px; font-family: monospace; font-size: 15px; font-weight: 700; }
.ml-check-desc { min-width: 0; font-size: 14px; color: var(--text-primary); overflow-wrap: anywhere; }
.ml-check-desc small { display: block; font-size: 12px; color: var(--text-muted); }

/* Delete next to Edit in a read-only sheet's footer */
.ml-btn--ghost { background: transparent; }

.ml-check--static { cursor: default; }
