/* =========================================================
   LUMISCHEMA COMPARE DEVICES  (page-compare.php)
   Component styles only. Page width, gutter, the main/sidebar columns and
   the top gap under the header come from layout-system.css. The page sits
   in the 900px main column next to the GeneratePress sidebar.
   Palette follows device-single.css.
   ========================================================= */

.ls-cmp {
    --ls-cmp-label: 170px;
    --ls-cmp-blue: #0b5fd8;
    --ls-cmp-ink: #10233f;
    --ls-cmp-head: #0b2a52;
    --ls-cmp-muted: #4a5d7a;
    --ls-cmp-line: #e3ebf7;
    --ls-cmp-panel: #edf4ff;
    --ls-cmp-border: #d6e4fb;
    --ls-cmp-best: #16803d;
    padding-bottom: 8px;
    color: var(--ls-cmp-ink);
}
.ls-cmp *,
.ls-cmp *::before,
.ls-cmp *::after { box-sizing: border-box; }
.ls-cmp a { text-decoration: none; }
.ls-cmp svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ls-cmp [hidden] { display: none !important; }

/* Breadcrumb: shared .ls-crumbs in global.css. */

/* ---------- Heading: title left, "Specs comparison" label right ---------- */
.ls-cmp-head { margin: 0 0 24px; }
.ls-cmp-head-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 0 0 10px;
}
.ls-cmp-eyebrow {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 5px 12px;
    border-radius: 6px;
    background: var(--ls-cmp-blue);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}
.ls-cmp-eyebrow svg { width: 15px; height: 15px; }
.ls-cmp-head h1 {
    flex: 1 1 260px;
    min-width: 0;
    margin: 0;
    color: var(--ls-cmp-head);
    font-size: clamp(20px, 2vw, 24px);
    line-height: 1.2;
    letter-spacing: -.3px;
    font-weight: 800;
    overflow-wrap: anywhere;
}
/* Full width of the main content column. */
.ls-cmp-intro p { margin: 0; max-width: none; color: #33465f; font-size: 15px; line-height: 1.65; }

/* ---------- Toolbar ---------- */
.ls-cmp-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 18px;
    margin: 0 0 16px;
    padding: 12px 16px;
    background: var(--ls-cmp-panel);
    border: 1px solid var(--ls-cmp-border);
    border-radius: 12px;
}
.ls-cmp-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    color: var(--ls-cmp-ink);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.ls-cmp-switch input {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 32px;
    height: 18px;
    margin: 0;
    flex: 0 0 32px;
    border-radius: 999px;
    background: #9fb3cf;
    cursor: pointer;
    transition: background .15s ease;
}
.ls-cmp-switch input::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(11, 42, 82, .25);
    transition: transform .15s ease;
}
.ls-cmp-switch input:checked { background: var(--ls-cmp-blue); }
.ls-cmp-switch input:checked::after { transform: translateX(14px); }
/* What the switch did, e.g. "4 identical rows hidden" (compare.js). */
.ls-cmp-switch-note { flex-basis: 100%; margin: -6px 0 0; color: var(--ls-cmp-muted); font-size: 12px; }
.ls-cmp-switch-note:empty { display: none; }
.ls-cmp-switch input:focus-visible { outline: 2px solid var(--ls-cmp-blue); outline-offset: 2px; }
.ls-cmp-toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ls-cmp-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid #cfe0fa;
    border-radius: 8px;
    background: #fff;
    color: var(--ls-cmp-blue);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.ls-cmp-tool-btn svg { width: 16px; height: 16px; }
.ls-cmp-tool-btn:hover,
.ls-cmp-tool-btn:focus-visible { border-color: var(--ls-cmp-blue); color: var(--ls-cmp-blue); }
.ls-cmp-copy-status { flex-basis: 100%; margin: 0; color: var(--ls-cmp-best); font-size: 13px; font-weight: 600; }
.ls-cmp-copy-status:empty { display: none; }

/* ---------- Table ---------- */
.ls-cmp-table-wrap {
    /* visible (not hidden) so the search suggestions can hang below the slot. */
    position: relative;
    overflow: visible;
    background: #fff;
    border: 1px solid #dbe7f8;
    border-radius: 14px;
}
.ls-cmp-table {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    table-layout: fixed;
}
/* :where() keeps this reset at low specificity so the row rules below win. */
.ls-cmp-table :where(th, td) {
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    vertical-align: top;
}

/* Column widths come from the head row: label column + equal device columns. */
.ls-cmp-devices > .ls-cmp-corner { width: var(--ls-cmp-label); }

/* Head row: device cards and empty slots. */
.ls-cmp-devices > * { height: 1px; padding: 16px 12px; border-bottom: 1px solid #dbe7f8; }
/* height: 1px lets the cards and empty slots fill the row height. */
.ls-cmp-devices > :first-child { padding-left: 20px; }
.ls-cmp-devices > :last-child { padding-right: 16px; }
.ls-cmp-corner { vertical-align: middle !important; }
.ls-cmp-corner-count { display: block; color: var(--ls-cmp-muted); font-size: 14px; font-weight: 400; }
.ls-cmp-corner-count strong { color: var(--ls-cmp-blue); font-size: 22px; font-weight: 800; }
.ls-cmp-corner-note { display: block; margin-top: 10px; color: var(--ls-cmp-muted); font-size: 13px; font-weight: 400; line-height: 1.6; }

.ls-cmp-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    padding: 14px 12px 14px;
    text-align: center;
    background: #f4f8fe;
    border: 1px solid #e0eaf9;
    border-radius: 12px;
}
.ls-cmp-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #cfe0fa;
    border-radius: 50%;
    background: #fff;
    color: var(--ls-cmp-ink);
}
.ls-cmp-remove svg { width: 14px; height: 14px; }
.ls-cmp-remove:hover,
.ls-cmp-remove:focus-visible { border-color: #c62828; color: #c62828; }
/* Same pill as the Phone Finder (red, white, uppercase); top-left because Remove (×) is top-right. */
.ls-cmp-rumored {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    padding: 4px 10px;
    background: #dc2626;
    border-radius: 11px 0 6px 0;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.2;
    text-transform: uppercase;
}
.ls-cmp-card-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 130px;
    margin: 10px 0 12px;
}
.ls-cmp-card-thumb img { display: block; width: auto; height: auto; max-width: 80%; max-height: 130px; object-fit: contain; }
.ls-cmp-noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #9fb3cf; }
.ls-cmp-noimg svg { width: 44%; max-width: 72px; height: auto; stroke-width: 1.4; }
.ls-cmp-brand {
    margin-bottom: 6px;
    padding: 3px 9px;
    border-radius: 5px;
    background: #e1ecff;
    color: #0a4fb5;
    font-size: 12px;
    font-weight: 700;
}
.ls-cmp-name {
    display: block;
    margin-bottom: 8px;
    color: var(--ls-cmp-head);
    font-size: 14px;
    line-height: 1.3;
    font-weight: 800;
    overflow-wrap: anywhere;
}
.ls-cmp-name:hover,
.ls-cmp-name:focus-visible { color: var(--ls-cmp-blue); }
.ls-cmp-price { display: block; margin: 0 0 12px; }
.ls-cmp-price small { display: block; color: var(--ls-cmp-muted); font-size: 12px; font-weight: 400; }
.ls-cmp-price strong { display: block; color: var(--ls-cmp-blue); font-size: 14px; line-height: 1.3; font-weight: 800; }
.ls-cmp-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-height: 40px;
    margin-top: auto;
    padding: 0 12px;
    border-radius: 8px;
    background: #0B5FD8;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}
.ls-cmp-card-btn svg { width: 15px; height: 15px; }
.ls-cmp-card-btn:hover,
.ls-cmp-card-btn:focus-visible { background: #0849a8; color: #fff; } /* darker #0B5FD8 */

/* Empty slot */
.ls-cmp-slot-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 100%;
    min-height: 300px;
    padding: 18px 14px;
    text-align: center;
    border: 2px dashed #bcd1f3;
    border-radius: 12px;
    background: #fafcff;
}
.ls-cmp-slot-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #d9e6fa;
    color: var(--ls-cmp-blue);
}
.ls-cmp-slot-icon svg { width: 26px; height: 26px; }
.ls-cmp-slot-text { color: var(--ls-cmp-muted); font-size: 14px; font-weight: 400; }
.ls-cmp-slot-link { color: var(--ls-cmp-blue); font-size: 14px; font-weight: 700; }
.ls-cmp-slot-link:hover { text-decoration: none; }

.ls-cmp-search { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.ls-cmp-search label { color: var(--ls-cmp-head); font-size: 15px; font-weight: 800; }
.ls-cmp-input { position: relative; display: block; }
.ls-cmp-input svg {
    position: absolute;
    left: 11px;
    top: 50%;
    width: 15px;
    height: 15px;
    margin-top: -7.5px;
    color: #4b5563;
    stroke-width: 2.2;
    pointer-events: none;
}
.ls-cmp-input input {
    display: block;
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 0 12px 0 34px;
    background: #fff;
    border: 1px solid #cdd3dd;
    border-radius: 7px;
    color: #111827;
    font: inherit;
    font-size: 14px;
    font-weight: 400;
}
.ls-cmp-input input::-webkit-search-cancel-button { display: none; }
.ls-cmp-input input::placeholder { color: #6b7380; opacity: 1; }
.ls-cmp-input input:focus { outline: 2px solid var(--ls-cmp-blue); outline-offset: 0; border-color: var(--ls-cmp-blue); }
.ls-cmp-search-btn {
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 7px;
    background: #12125a;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.ls-cmp-search-btn:hover,
.ls-cmp-search-btn:focus-visible { background: #0a0a3d; }

/* Group heading rows */
.ls-cmp-group-row > th {
    padding: 12px 20px;
    background: #eef4ff;
    border-bottom: 1px solid #dbe7f8;
    color: var(--ls-cmp-head);
    font-size: 17px;
    line-height: 1.2;
    font-weight: 800;
}
/* Collapsible group heading: icon, name, row count, chevron. Click to hide / show its rows. */
.ls-cmp-group-row > th { padding: 0; }
.ls-cmp-group-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    padding: 10px 20px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}
.ls-cmp-group-toggle:hover { background: #e4edfb; color: inherit; }
.ls-cmp-group-toggle:focus-visible { outline: 2px solid var(--ls-cmp-blue); outline-offset: -2px; }
.ls-cmp-group-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 30px; width: 30px; height: 30px; border-radius: 8px; background: #fff; border: 1px solid #d6e4fb; }
.ls-cmp-group-icon svg { width: 17px; height: 17px; fill: none; stroke: var(--ls-cmp-blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ls-cmp-group-name { flex: 1 1 auto; min-width: 0; }
.ls-cmp-group-count { flex: 0 0 auto; padding: 0 8px; border-radius: 999px; background: #fff; color: #4a5d7a; font-size: 11px; font-weight: 700; line-height: 20px; }
.ls-cmp-group-chevron { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.ls-cmp-group.is-collapsed .ls-cmp-group-chevron { transform: rotate(-90deg); }
.ls-cmp-group.is-collapsed .ls-cmp-row { display: none; }
@media (prefers-reduced-motion: reduce) { .ls-cmp-group-chevron { transition: none; } }
.ls-cmp-group + .ls-cmp-group .ls-cmp-group-row > th { border-top: 1px solid #dbe7f8; }

/* Spec rows */
.ls-cmp-row > * {
    padding: 12px 12px;
    border-bottom: 1px solid #edf2fa;
    font-size: 15px;
    line-height: 1.45;
}
.ls-cmp-row > th { padding-left: 20px; color: var(--ls-cmp-muted); font-weight: 600; }
.ls-cmp-row > :last-child { padding-right: 16px; }
.ls-cmp-group .ls-cmp-row:last-child > * { border-bottom: 0; }
.ls-cmp-row:hover > * { background: #f7faff; }
.ls-cmp-cell { color: var(--ls-cmp-ink); overflow-wrap: anywhere; }
.ls-cmp-cell.is-empty { color: #8b97ab; }
.ls-cmp-cell.is-slot { background: #fbfcfe; }
.ls-cmp-cell.is-best .ls-cmp-value { font-weight: 700; }
.ls-cmp-best {
    display: inline-block;
    margin-left: 4px;
    padding: 2px 7px;
    border-radius: 5px;
    background: var(--ls-cmp-best);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: .02em;
    vertical-align: 1px;
    white-space: nowrap;
}
.ls-cmp-corner-note .ls-cmp-best { margin-left: 2px; }

/* "Show differences only" (class added by compare.js) */
.ls-cmp-table.is-diff-only .ls-cmp-row[data-same="1"],
.ls-cmp-table.is-diff-only .ls-cmp-group[data-same="1"] { display: none; }
.ls-cmp-all-same {
    margin: 16px 0 0;
    padding: 14px 16px;
    background: var(--ls-cmp-panel);
    border: 1px solid var(--ls-cmp-border);
    border-radius: 12px;
    color: var(--ls-cmp-ink);
    font-size: 15px;
}

/* ---------- Compact bar while scrolling the table (compare.js) ---------- */
.ls-cmp-sticky {
    /* compare.js sets left and width to match the table below. */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 60;
    display: grid;
    grid-template-columns: var(--ls-cmp-label) repeat(var(--ls-cmp-cols, 3), minmax(0, 1fr));
    align-items: center;
    padding: 8px 0;
    background: #fff;
    border: 1px solid #dbe7f8;
    border-top: 0;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 6px 18px rgba(11, 42, 82, .08);
}
.admin-bar .ls-cmp-sticky { top: 32px; }
.ls-cmp-sticky-label { padding-left: 20px; color: var(--ls-cmp-muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.ls-cmp-sticky-cell { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 12px; }
.ls-cmp-sticky-cell strong { min-width: 0; color: var(--ls-cmp-head); font-size: 14px; line-height: 1.25; font-weight: 800; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ls-cmp-sticky-thumb { display: flex; flex: 0 0 36px; width: 36px; height: 40px; align-items: center; justify-content: center; }
.ls-cmp-sticky-thumb img { display: block; max-width: 36px; max-height: 40px; width: auto; height: auto; object-fit: contain; }

/* ---------- Search results / popular devices ---------- */
.ls-cmp-panel {
    margin: 0 0 24px;
    padding: 18px;
    background: var(--ls-cmp-panel);
    border: 1px solid var(--ls-cmp-border);
    border-radius: 14px;
}
.ls-cmp > :last-child { margin-bottom: 0; }
.ls-cmp-table-wrap + .ls-cmp-panel,
.ls-cmp-all-same + .ls-cmp-panel { margin-top: 28px; }
.ls-cmp-panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin: 0 0 14px; }
.ls-cmp-panel-head h2 { margin: 0; color: #071D33; font-size: 16px; line-height: 1.3; font-weight: 800; }
.ls-cmp-panel-close,
.ls-cmp-panel-link { color: #071D33; font-size: 12px; font-weight: 700; }
.ls-cmp-panel-close:hover,
.ls-cmp-panel-link:hover { text-decoration: none; }
.ls-cmp-empty { margin: 0; color: var(--ls-cmp-muted); font-size: 15px; }

.ls-cmp-pick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.ls-cmp-pick {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 10px;
    background: #fff;
    border: 1px solid #d9e6fa;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(11, 42, 82, .05);
}
.ls-cmp-pick-thumb { display: flex; flex: 0 0 48px; width: 48px; height: 56px; align-items: center; justify-content: center; border-radius: 8px; background: #f1f5fc; overflow: hidden; }
.ls-cmp-pick-thumb img { display: block; max-width: 44px; max-height: 52px; width: auto; height: auto; object-fit: contain; }
.ls-cmp-pick-text { flex: 1; min-width: 0; }
.ls-cmp-pick-text small { display: block; color: var(--ls-cmp-muted); font-size: 12px; }
.ls-cmp-pick-text strong { display: block; color: var(--ls-cmp-head); font-size: 14px; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.ls-cmp-pick-add {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 10px;
    border: 1.5px solid #071D33;
    border-radius: 8px;
    color: #071D33;
    font-size: 13px;
    font-weight: 700;
}
.ls-cmp-pick-add svg { width: 14px; height: 14px; stroke-width: 2.4; }
.ls-cmp-pick-add:hover,
.ls-cmp-pick-add:focus-visible { background: #071D33; color: #fff; }
.ls-cmp-pick-full { flex: 0 0 auto; color: var(--ls-cmp-muted); font-size: 12px; }

/* The wrap no longer clips, so round the last row's outer cells ourselves. */
.ls-cmp-group:last-child .ls-cmp-row:last-child > :first-child { border-bottom-left-radius: 13px; }
.ls-cmp-group:last-child .ls-cmp-row:last-child > :last-child { border-bottom-right-radius: 13px; }

/* ---------- As-you-type search suggestions (compare.js) ---------- */
.ls-cmp-suggest {
    position: absolute;
    z-index: 40;
    max-height: 360px;
    overflow-y: auto;
    padding: 6px;
    background: #fff;
    border: 1px solid #cfe0fa;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(11, 42, 82, .16);
    text-align: left;
}
.ls-cmp-suggest.is-loading { opacity: .7; }
.ls-cmp-suggest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 6px 8px;
    border-radius: 8px;
    color: #071D33;
}
.ls-cmp-suggest-item[aria-selected="true"],
.ls-cmp-suggest-item:hover { background: #edf4ff; }
.ls-cmp-suggest-item[aria-disabled="true"] { cursor: default; opacity: .7; }
.ls-cmp-suggest-thumb { display: flex; flex: 0 0 36px; width: 36px; height: 42px; align-items: center; justify-content: center; border-radius: 6px; background: #f1f5fc; overflow: hidden; }
.ls-cmp-suggest-thumb img { display: block; max-width: 32px; max-height: 40px; width: auto; height: auto; object-fit: contain; }
.ls-cmp-suggest-text { flex: 1; min-width: 0; }
.ls-cmp-suggest-text small { display: block; color: var(--ls-cmp-muted); font-size: 11px; font-weight: 400; }
.ls-cmp-suggest-text strong { display: block; color: #071D33; font-size: 14px; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.ls-cmp-suggest-add { flex: 0 0 auto; color: #071D33; font-size: 12px; font-weight: 800; white-space: nowrap; }
.ls-cmp-suggest-empty { margin: 0; padding: 10px; color: var(--ls-cmp-muted); font-size: 14px; }

/* ---------- Responsive ---------- */
/* 1001-1200px: the main column is narrow because the sidebar is beside it. */
@media (min-width: 1001px) and (max-width: 1200px) {
    .ls-cmp { --ls-cmp-label: 140px; }
    .ls-cmp-pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ls-cmp-row > * { font-size: 14px; }
}
@media (max-width: 782px) {
    .admin-bar .ls-cmp-sticky { top: 46px; }
}
@media (max-width: 900px) {
    .ls-cmp-pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phones: the label moves above its values, devices stay side by side.
   Explicit ARIA roles in the markup keep the table semantics. */
@media (max-width: 760px) {
    /* Label stays on the right of the title on phones too. */
    .ls-cmp-head-row { flex-wrap: nowrap; align-items: flex-start; }
    .ls-cmp-head h1 { font-size: 20px; flex: 1 1 auto; }
    .ls-cmp-eyebrow { margin-top: 2px; padding: 4px 8px; font-size: 11px; gap: 4px; }
    .ls-cmp-eyebrow svg { width: 13px; height: 13px; }
    .ls-cmp-intro p { font-size: 15px; }
    .ls-cmp-toolbar { padding: 8px 12px; }
    .ls-cmp-table-wrap { border-radius: 12px; }
    .ls-cmp-table,
    .ls-cmp-table thead,
    .ls-cmp-table tbody { display: block; }
    .ls-cmp-devices,
    .ls-cmp-row {
        display: grid;
        grid-template-columns: repeat(var(--ls-cmp-cols, 3), minmax(0, 1fr));
    }
    .ls-cmp-group-row { display: block; }
    .ls-cmp-group-row > th { display: block; padding: 0; font-size: 16px; }
    .ls-cmp-group-toggle { padding: 10px 12px; }
    .ls-cmp-devices > * { display: block; width: auto; height: auto; padding: 10px 4px; border-bottom: 0; }
    .ls-cmp-devices > :first-child,
    .ls-cmp-devices > :last-child { padding-left: 8px; padding-right: 8px; }
    .ls-cmp-devices > :nth-child(2) { padding-left: 8px; }
    .ls-cmp-devices { border-bottom: 1px solid #dbe7f8; padding-bottom: 6px; }
    .ls-cmp-devices > .ls-cmp-corner {
        grid-column: 1 / -1;
        width: auto;
        padding: 10px 12px 2px;
    }
    .ls-cmp-corner-count strong { font-size: 18px; }
    .ls-cmp-corner-note { display: inline; margin: 0 0 0 8px; }

    .ls-cmp-card { padding: 10px 6px 10px; border-radius: 10px; }
    .ls-cmp-remove { top: 4px; right: 4px; width: 30px; height: 30px; }
    .ls-cmp-rumored { padding: 3px 6px; font-size: 9px; border-radius: 9px 0 5px 0; }
    .ls-cmp-card-thumb { height: 84px; margin: 18px 0 8px; }
    .ls-cmp-card-thumb img { max-height: 84px; }
    .ls-cmp-brand { font-size: 11px; padding: 2px 6px; }
    .ls-cmp-name { font-size: 13px; margin-bottom: 6px; }
    .ls-cmp-price small { font-size: 11px; }
    .ls-cmp-price strong { font-size: 14px; }
    .ls-cmp-card-btn { min-height: 36px; padding: 0 6px; font-size: 12px; gap: 5px; }
    .ls-cmp-card-btn svg { display: none; }

    .ls-cmp-slot-box { min-height: 220px; padding: 12px 6px; gap: 8px; border-radius: 10px; }
    .ls-cmp-slot-icon { width: 40px; height: 40px; border-radius: 10px; }
    .ls-cmp-slot-icon svg { width: 20px; height: 20px; }
    .ls-cmp-search label { font-size: 13px; }
    .ls-cmp-input svg { display: none; }
    .ls-cmp-input input { height: 40px; padding: 0 8px; font-size: 14px; }
    .ls-cmp-slot-text,
    .ls-cmp-slot-link { font-size: 12px; }

    .ls-cmp-row { border-bottom: 1px solid #edf2fa; }
    .ls-cmp-group .ls-cmp-row:last-child { border-bottom: 0; }
    .ls-cmp-row > * { display: block; padding: 4px 8px 10px; border-bottom: 0; font-size: 14px; }
    .ls-cmp-row > th {
        grid-column: 1 / -1;
        padding: 10px 12px 2px;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: .04em;
        text-transform: uppercase;
    }
    .ls-cmp-row > td:nth-child(2) { padding-left: 12px; }
    .ls-cmp-row > :last-child { padding-right: 12px; }
    .ls-cmp-row:hover > * { background: transparent; }
    .ls-cmp-cell.is-slot { background: transparent; }
    .ls-cmp-best { margin: 4px 0 0; display: table; }

    .ls-cmp-sticky { grid-template-columns: repeat(var(--ls-cmp-cols, 3), minmax(0, 1fr)); padding: 6px 4px; }
    .ls-cmp-sticky-cell { padding: 0 8px; }
    .ls-cmp-sticky-label { display: none; }
    .ls-cmp-sticky-cell { gap: 6px; }
    .ls-cmp-sticky-thumb { flex-basis: 24px; width: 24px; height: 30px; }
    .ls-cmp-sticky-thumb img { max-width: 24px; max-height: 30px; }
    .ls-cmp-sticky-cell strong { font-size: 12px; }

    .ls-cmp-panel { padding: 14px; }
    .ls-cmp-panel-head h2 { font-size: 19px; }
}
@media (max-width: 520px) {
    .ls-cmp-pick-grid { grid-template-columns: minmax(0, 1fr); }
}
/* Popular devices: 6 on PC, 4 on phones. */
@media (max-width: 760px) {
    .ls-cmp-pick-grid > li:nth-child(n+5) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .ls-cmp-switch input,
    .ls-cmp-switch input::after { transition: none; }
}

/* Multicolour icons */
.ls-cmp-group-icon svg.ls-ico { width: 20px; height: 20px; }
.ls-cmp-noimg svg.ls-ico { width: 44%; max-width: 72px; height: auto; aspect-ratio: 1; }
.ls-cmp-input svg.ls-ico { width: 18px; height: 18px; }
.ls-cmp-eyebrow svg.ls-ico,
.ls-cmp-tool-btn svg.ls-ico,
.ls-cmp-card-btn svg.ls-ico { width: 18px; height: 18px; }
.ls-cmp-group-icon { background: transparent !important; border: 0 !important; }
.ls-cmp-group-icon svg.ls-ico { width: 24px; height: 24px; }

/* Vertical divider between the device columns in the spec rows only (not between the device cards),
   so it is always clear which value belongs to which device. PC and mobile. */
.ls-cmp-row > td + td { border-left: 1px solid #d3e0f3; }

/* Section headers (Overview, Body, Display ...): icon + name centred, like the device page;
   the row count and the arrow stay on the right. */
.ls-cmp-group-toggle { position: relative; justify-content: center; padding-left: 72px; padding-right: 72px; }
.ls-cmp-group-name { flex: 0 1 auto; text-align: center; }
.ls-cmp-group-count { position: absolute; top: 50%; right: 44px; transform: translateY(-50%); }
.ls-cmp-group-chevron { position: absolute; top: 50%; right: 16px; margin-top: -9px; }
@media (max-width: 768px) {
    .ls-cmp-group-toggle { padding-left: 64px; padding-right: 64px; }
    .ls-cmp-group-count { right: 40px; }
    .ls-cmp-group-chevron { right: 12px; }
}

/* PC: also a divider between the spec names and the first device column. */
@media (min-width: 769px) {
        .ls-cmp-row > td:first-of-type { border-left: 1px solid #d3e0f3; }
}


/* Swap (⇄ between two cards) and Change (under each card). */
.ls-cmp-devices > .ls-cmp-device { position: relative; }
.ls-cmp-swap { position: absolute; top: 50%; right: 0; z-index: 3; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px;
    margin-top: -17px; transform: translateX(50%); border: 1px solid #c3d3ea; border-radius: 50%; background: #fff; color: #0b5fd8;
    box-shadow: 0 2px 8px rgba(7, 29, 51, .12); text-decoration: none; }
.ls-cmp-swap svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ls-cmp-swap:hover, .ls-cmp-swap:focus-visible { background: #0b5fd8; border-color: #0b5fd8; color: #fff; }
.ls-cmp-change { display: inline-flex; align-items: center; justify-content: center; gap: 5px; margin-top: 8px; color: #0b5fd8; font-size: 12.5px; font-weight: 700; text-decoration: none; }
.ls-cmp-change svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ls-cmp-change:hover, .ls-cmp-change:focus-visible { text-decoration: none; }
.ls-cmp-slot.is-changing .ls-cmp-slot-box { border-color: #0b5fd8; background: #f3f8ff; }
.ls-cmp-pick-add svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 768px) {
    .ls-cmp-swap { width: 30px; height: 30px; margin-top: -15px; }
    .ls-cmp-swap svg { width: 15px; height: 15px; }
    .ls-cmp-change { font-size: 12px; }
}

/* In-place swap: a soft fade on the cells that moved (no reload, no jump). */
@keyframes ls-cmp-swap-in { from { opacity: .35; } to { opacity: 1; } }
.ls-cmp-swapped { animation: ls-cmp-swap-in .28s ease-out; }
@media (prefers-reduced-motion: reduce) { .ls-cmp-swapped { animation: none; } }

/* Coloured swap / change icons keep their own colours (no single-colour stroke). */
.ls-cmp-swap svg.ls-cmp-ico-swap, .ls-cmp-change svg.ls-cmp-ico-change, .ls-cmp-pick-add svg.ls-cmp-ico-change, .ls-cmp-slot-icon svg.ls-cmp-ico-change { fill: initial; stroke: none; }
.ls-cmp-swap svg.ls-cmp-ico-swap { width: 19px; height: 19px; }
.ls-cmp-change svg.ls-cmp-ico-change { width: 16px; height: 16px; }
.ls-cmp-slot-icon svg.ls-cmp-ico-change { width: 22px; height: 22px; }
.ls-cmp-swap:hover, .ls-cmp-swap:focus-visible { background: #eaf2ff; border-color: #0b5fd8; color: #0b5fd8; }

/* Multi-line values (text-area fields): each line on its own row, like the device page spec table. */
.ls-cmp-line { display: block; }
.ls-cmp-line + .ls-cmp-line { margin-top: 5px; padding-top: 5px; border-top: 1px dashed #e3ebf6; }

/* An extra column the reader opened ("Add a third device") can be closed again. */
.ls-cmp-slot-box { position: relative; }
.ls-cmp-slot-close {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
    border-radius: 50%; background: #fff; border: 1px solid #dbe7f8; color: #4a5d7a;
}
.ls-cmp-slot-close:hover, .ls-cmp-slot-close:focus-visible { border-color: #c62828; color: #c62828; }
.ls-cmp-slot-close svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

/* Spec values sit centred under each device card (PC and mobile). The label column on PC stays left. */
.ls-cmp-row > td.ls-cmp-cell { text-align: center; }
.ls-cmp-cell .ls-cmp-best { margin-left: 4px; }
@media (max-width: 782px) {
    /* On phones the label spans the full width above its values, so centre it too. */
    .ls-cmp-row > th { text-align: center; padding-left: 12px; padding-right: 12px; }
    .ls-cmp-row > td.ls-cmp-cell .ls-cmp-best { margin: 4px auto 0; }
}

/* Spec names (Brand, Announced, Technology ...) in bold; values stay normal weight. */
.ls-cmp-row > th { font-weight: 800; color: #1f2f46; }

/* Section headings (Overview, Network, Body, Display ...) a little bigger. */
.ls-cmp-group-name { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.ls-cmp-group-toggle { min-height: 54px; }
.ls-cmp-group-icon { flex-basis: 34px; width: 34px; height: 34px; }
.ls-cmp-group-icon svg.ls-ico { width: 28px; height: 28px; }
@media (max-width: 782px) {
    .ls-cmp-group-name { font-size: 18px; }
}

/* Remove (×) on each card and Close on an extra column: red with a white ×. */
.ls-cmp-remove,
.ls-cmp-slot-close { background: #dc2626; border-color: #dc2626; color: #fff; box-shadow: 0 2px 6px rgba(220, 38, 38, .3); }
.ls-cmp-remove:hover, .ls-cmp-remove:focus-visible,
.ls-cmp-slot-close:hover, .ls-cmp-slot-close:focus-visible { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.ls-cmp-remove svg, .ls-cmp-slot-close svg { stroke: #fff; stroke-width: 2.8; }

/* "VS" between two devices; the swap (⇄) button moves just below it. */
.ls-cmp-vs {
    position: absolute; top: 50%; right: 0; z-index: 4;
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin-top: -38px; transform: translateX(50%);
    border: 3px solid #fff; border-radius: 50%;
    background: linear-gradient(135deg, #0b5fd8, #6d28d9); color: #fff;
    font-size: 14px; font-weight: 900; letter-spacing: .02em; line-height: 1;
    box-shadow: 0 3px 10px rgba(11, 95, 216, .35);
    pointer-events: none;
}
.ls-cmp-vs ~ .ls-cmp-swap { margin-top: 8px; }
@media (max-width: 768px) {
    .ls-cmp-vs { width: 34px; height: 34px; margin-top: -34px; font-size: 12px; border-width: 2px; }
    .ls-cmp-vs ~ .ls-cmp-swap { margin-top: 6px; }
}

/* Smaller Remove (×) and Close buttons. */
.ls-cmp-remove, .ls-cmp-slot-close { width: 24px; height: 24px; }
.ls-cmp-remove svg, .ls-cmp-slot-close svg { width: 11px; height: 11px; }
@media (max-width: 782px) {
    .ls-cmp-remove, .ls-cmp-slot-close { width: 22px; height: 22px; }
    .ls-cmp-remove svg, .ls-cmp-slot-close svg { width: 10px; height: 10px; }
}

/* Spec names on phones: style picked in Devices > Site Extras > Compare page (class on the table). */
@media (max-width: 782px) {
    .ls-cmp-row > th .ls-cmp-lbl { display: inline-flex; align-items: center; justify-content: center; gap: 4px; max-width: 100%; }

    /* A: Tinted strip */
    .ls-cmp-table.is-lbl-strip .ls-cmp-row > th {
        margin-bottom: 4px; padding: 7px 12px; background: #eaf2ff; color: #0b4fb3;
        border-top: 1px solid #d6e4fb; border-bottom: 1px solid #d6e4fb;
    }
    .ls-cmp-table.is-lbl-strip .ls-cmp-row > td { padding-top: 6px; }

    /* B: Blue pill */
    .ls-cmp-table.is-lbl-pill .ls-cmp-row > th { padding: 12px 12px 6px; background: transparent; }
    .ls-cmp-table.is-lbl-pill .ls-cmp-row > th .ls-cmp-lbl {
        padding: 4px 12px; border-radius: 999px; background: #0b5fd8; color: #fff; font-size: 11px; line-height: 1.4;
    }
    .ls-cmp-table.is-lbl-pill .ls-cmp-row > th .ls-tip { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .85); }

    /* C: Lines either side */
    .ls-cmp-table.is-lbl-lines .ls-cmp-row > th { display: flex; align-items: center; gap: 10px; padding: 12px 14px 4px; color: #0b5fd8; }
    .ls-cmp-table.is-lbl-lines .ls-cmp-row > th::before,
    .ls-cmp-table.is-lbl-lines .ls-cmp-row > th::after { content: ""; flex: 1 1 0; min-width: 12px; height: 2px; background: linear-gradient(90deg, transparent, #9cc0f5); }
    .ls-cmp-table.is-lbl-lines .ls-cmp-row > th::after { background: linear-gradient(90deg, #9cc0f5, transparent); }
    .ls-cmp-table.is-lbl-lines .ls-cmp-row > th .ls-cmp-lbl { flex: 0 1 auto; text-align: center; }
}
