/* Public pages: comparison tables and the category list */
:root {
  --bg: #fafaf8; --panel: #fff; --text: #1c1c1a; --muted: #5f5f5c; --line: #a9a9a2; --head: #f2f2ee; --group: #55554f;
  --accent: #1f5bd8; --accent-text: #fff; --save: #e0a100; --danger: #c62828; --row-hover: #f3f6fd;
  --row-h: 3.75rem; --cell-max: 25rem;
  --group-s: inset 2px 0 0 var(--group); --group-e: inset -2px 0 0 var(--group);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141414; --panel: #1d1d1d; --text: #ececec; --muted: #a3a3a3; --line: #5c5c5c; --head: #242424; --group: #a8a8a8;
    --accent: #7aa2ff; --accent-text: #111; --save: #f5c242; --danger: #ff6b6b; --row-hover: #232a36;
  }
}
* { box-sizing: border-box; scrollbar-width: thin; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
main { max-width: 100rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 1rem; }
button { font: inherit; color: inherit; }
button.link { border: 0; background: none; color: var(--accent); padding: 0; cursor: pointer; text-decoration: underline; }
input, select { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: .35rem .5rem; min-width: 0; }

/* Keyboard help: the skip link appears when it gets focus, and every control shows a clear outline */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: .5rem; top: -10rem; z-index: 100; padding: .5rem 1rem; border-radius: 6px; background: var(--accent); color: var(--accent-text); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: .5rem; }
#main:focus { outline: none; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Header and footer */
.site-top { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.5rem; padding: .7rem 1rem; background: var(--panel); border-bottom: 1px solid var(--line); }
.site-top .brand { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.site-top .cat-trigger { color: var(--text); text-decoration: none; font-size: .95rem; }
.site-top .brands-link { color: var(--text); text-decoration: none; font-size: .95rem; }
.site-top .brands-link:hover { color: var(--accent); text-decoration: underline; }
.site-top .brands-link[aria-current] { font-weight: 600; }
.pm-brand-tools { align-items: center; }
.pm-sort-toggle { padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); cursor: pointer; white-space: nowrap; }
.pm-sort-toggle strong { color: var(--accent); }
.pm-sort-toggle:hover { border-color: var(--accent); }
.pm-brand-tools .pm-button { padding: .35rem 1rem; }
.pm-intro { margin: -.25rem 0 1.25rem; max-width: 50rem; }
.pm-brand-count { margin: 0 0 .75rem; color: var(--muted); font-size: .9rem; }
.pm-pages ul { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 1.25rem 0 0; padding: 0; }
.pm-pages a { display: inline-block; min-width: 2.25rem; padding: .35rem .6rem; text-align: center; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); text-decoration: none; }
.pm-pages a[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.pm-brand-cats { margin: 0 0 1rem; }
.pm-brand-cats ul { display: inline; list-style: none; margin: 0; padding: 0; }
.pm-brand-cats li { display: inline; }
.pm-brand-cats li + li::before { content: " · "; color: var(--muted); }
.pm-cat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .15rem; }
.pm-cat-list a { display: inline-block; padding: .3rem 0; color: var(--text); text-decoration: none; }
.pm-cat-list a:hover { color: var(--accent); text-decoration: underline; }
.pm-cat-list a[aria-current] { font-weight: 600; }
.pm-cat-list .pm-desc { margin-left: 0; white-space: pre-line; }
.pm-cat-list li.has-thumb { display: flow-root; }
.pm-cat-thumb { float: left; width: 3rem; height: 3rem; margin: .25rem .75rem .35rem 0; object-fit: contain; background: #fff; border-radius: 6px; }
.pm-cat-thumb[hidden] { display: none; }
.site-top .saved-link { margin-left: auto; color: var(--text); text-decoration: none; white-space: nowrap; }
.site-top .saved-link .count { display: inline-block; min-width: 1.4rem; padding: 0 .4rem; margin-left: .2rem; border-radius: 99px; background: var(--head); border: 1px solid var(--line); font-size: .8rem; text-align: center; }
.site-top .saved-link[aria-current] { font-weight: 600; }
.site-top .saved-link:hover { color: var(--accent); }
.site-top .admin-link { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.site-foot { max-width: 100rem; margin: 0 auto; padding: 1rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }

/* Category Description, under the category page's heading */
.pm-category-desc { margin: -.5rem 0 1rem; max-width: 60rem; white-space: pre-line; line-height: 1.5; overflow-wrap: anywhere; }

/* Category cards on the home page: a product image, the name, the start of the description and
   the number of products */
.category-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: .9rem; }
.category-cards a { display: flex; gap: .9rem; align-items: flex-start; height: 100%; padding: .9rem; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--text); }
.category-cards a:hover { border-color: var(--accent); }
.category-cards a:hover strong { color: var(--accent); text-decoration: underline; }
.category-cards img, .category-cards .no-img { flex: none; width: 5rem; height: 5rem; object-fit: contain; background: #fff; border-radius: 6px; }
.category-cards .no-img { background: var(--head); }
.category-cards .body { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.category-cards strong { font-size: 1.05rem; line-height: 1.3; }
.category-cards .desc { color: var(--muted); font-size: .88rem; line-height: 1.4; overflow-wrap: anywhere; }
.category-cards .n { color: var(--muted); font-size: .85rem; font-weight: 600; }

/* Tools above the table: search, filters, columns */
.pm-tools { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-start; margin-bottom: .75rem; }
.pm-tools .search { flex: 1 1 14rem; max-width: 24rem; }
.pm-tools details { position: relative; }
.pm-tools summary { list-style: none; cursor: pointer; padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); user-select: none; }
.pm-tools summary::-webkit-details-marker { display: none; }
.pm-tools summary::after { content: " ▾"; color: var(--muted); }
.pm-tools details[open] > summary { border-color: var(--accent); }
.pm-trigger { cursor: pointer; padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.pm-trigger:hover { border-color: var(--accent); }
.pm-tools .badge { display: inline-block; min-width: 1.3rem; padding: 0 .35rem; margin-left: .3rem; border-radius: 99px; background: var(--accent); color: var(--accent-text); font-size: .8rem; text-align: center; }
.pm-popup { position: absolute; z-index: 20; top: calc(100% + .3rem); left: 0; min-width: 16rem; max-width: min(90vw, 60rem); max-height: 70vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .8rem; box-shadow: 0 6px 24px rgba(0,0,0,.15); }
.pm-filter-grid { display: flex; flex-direction: column; gap: .9rem; width: min(calc(100vw - 3.5rem), 22rem); }
.pm-filter { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.pm-filter .label { font-weight: 600; font-size: .9rem; }
.pm-filter .range { display: flex; gap: .4rem; align-items: center; }
.pm-filter .range input { width: 100%; text-align: right; }
.pm-filter .choices { display: flex; flex-direction: column; gap: .1rem; max-height: 11rem; overflow: auto; }
.pm-check { display: flex; gap: .4rem; align-items: baseline; font-size: .9rem; cursor: pointer; }
.pm-check .n { color: var(--muted); font-size: .8rem; }

/* Filters, Columns and View windows: full screen height, scrolling inside */
.pm-modal { height: 100vh; height: 100dvh; max-height: none; width: fit-content; min-width: min(20rem, 100vw); max-width: min(calc(100vw - 1rem), 40rem); margin: 0 auto;
  padding: 0; border: 2px solid var(--line); border-radius: 0; background: var(--panel); color: var(--text); flex-direction: column; overflow: hidden; }
.pm-modal[open] { display: flex; }
.pm-modal::backdrop { background: rgba(0,0,0,.45); }
.pm-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); flex: none; }
.pm-modal-head h2 { font-size: 1.1rem; margin: 0; }
.pm-modal .close { border: 0; background: none; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 .3rem; }
.pm-modal .close:hover { color: var(--text); }
.pm-modal-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 1rem; }
.pm-modal-body > .choices { display: flex; flex-direction: column; gap: .3rem; }
.pm-modal .pm-filter .choices { max-height: none; overflow: visible; }
.pm-modal-foot { flex: none; display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; border-top: 1px solid var(--line); }
.pm-modal-foot:empty { display: none; }
/* Key Groups in the Filters and Columns windows */
.pm-group { margin: 0; padding: .5rem .75rem .7rem; border: 2px solid var(--group); border-radius: 6px; min-width: 0; display: flex; flex-direction: column; gap: inherit; }
.pm-group legend { padding: 0 .35rem; font-weight: 600; font-size: .85rem; }
.pm-modal-body > .choices > .pm-group { margin: .25rem 0; }
/* Sort window */
.pm-sort-now { margin: 0 0 .3rem; font-weight: 600; }
.pm-sort-hint { margin: 0 0 .8rem; color: var(--muted); font-size: .85rem; }
.pm-sort-list { display: flex; flex-direction: column; gap: .25rem; }
.pm-sort-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; width: 100%; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); text-align: left; cursor: pointer; }
.pm-sort-item:hover { border-color: var(--accent); }
.pm-sort-item[aria-pressed=true] { border: 2px solid var(--accent); font-weight: 600; }
.pm-sort-item .dir { color: var(--accent); }
.pm-foot-group { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.pm-col { display: flex; flex-direction: column; gap: .2rem; }
.pm-desc { max-height: 20vh; overflow-y: auto; margin: 0 0 .35rem 1.6rem; padding: .35rem .6rem; border-left: 2px solid var(--line); color: var(--muted); font-size: .85rem; line-height: 1.4; overflow-wrap: anywhere; }
.pm-popup-foot { display: flex; justify-content: space-between; gap: 1rem; margin-top: .8rem; padding-top: .6rem; border-top: 1px solid var(--line); }

/* The table */
.pm-scroll { overflow: auto; max-height: calc(100vh - 1rem); max-height: calc(100dvh - 1rem); border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.pm-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Columns take the width their content needs, up to --cell-max and 40% of the screen width.
   The box scrolls both ways, so the header row stays in view. */
.pm-table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: .95rem; }
.pm-table th, .pm-table td { padding: 0 .75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
.pm-table td { height: var(--row-h); background: var(--panel); }
.pm-table th { height: 3rem; background: var(--head); font-size: .85rem; font-weight: 600; position: sticky; top: 0; z-index: 3; }
.pm-table tbody tr:last-child td { border-bottom: 0; }
.pm-table tbody tr:hover td { background: var(--row-hover); }
.pm-table .num { text-align: right; }
.pm-table th .unit { color: var(--muted); font-weight: 400; }
.pm-table td.empty { color: var(--muted); }

/* Cells keep one height: content is clipped to two lines and the column's maximum width */
.pm-table .c { max-width: min(var(--cell-max), 40vw); white-space: normal; overflow-wrap: break-word; line-height: 1.35;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.pm-table td.num .c { white-space: nowrap; display: block; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.pm-table td.clipped { cursor: zoom-in; }
.pm-table td.clipped:not(.col-product) { position: relative; }
.pm-table td.clipped::after { content: ""; position: absolute; right: 3px; bottom: 3px; border: 5px solid transparent; border-right-color: var(--muted); border-bottom-color: var(--muted); opacity: .6; }
.pm-table td.clipped:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Key Groups: a heading over the group's columns and a border along its sides. The empty cells
   over other columns join their headings. */
.pm-table thead td { position: sticky; top: 0; z-index: 3; background: var(--head); padding: 0; border-bottom: 0; }
.pm-table .pm-group-row > * { height: 2rem; }
.pm-table.has-groups thead tr + tr th { top: 2rem; }
.pm-table th.pm-g { text-align: center; font-size: .8rem; padding: 0 .5rem; box-shadow: var(--group-s), var(--group-e), inset 0 2px 0 var(--group); }
.pm-table .g-s { box-shadow: var(--group-s); }
.pm-table .g-e { box-shadow: var(--group-e); }
.pm-table .g-s.g-e { box-shadow: var(--group-s), var(--group-e); }

/* Arrows that scroll the table sideways */
.pm-arrows { display: flex; gap: .35rem; margin-left: auto; }
.pm-arrow { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.15rem; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--text); cursor: pointer; }
.pm-arrow:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pm-arrow:disabled { opacity: .4; cursor: default; }
.pm-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Save, View and product columns stay in view while scrolling sideways (not on narrow screens) */
.pm-table .col-save { width: 3.25rem; min-width: 3.25rem; padding: 0; text-align: center; }
.pm-table .col-view { width: 3rem; min-width: 3rem; padding: 0; text-align: center; }
@media (min-width: 40rem) {
  .pm-table .col-save, .pm-table .col-view, .pm-table .col-product { position: sticky; z-index: 2; }
  .pm-table .col-save { left: 0; }
  .pm-table .col-view { left: 3.25rem; }
  .pm-table.no-save .col-view { left: 0; }
  .pm-table .col-product { left: 6.25rem; box-shadow: 1px 0 0 var(--line); }
  .pm-table.no-save .col-product { left: 3rem; }
  .pm-table.no-view .col-product { left: 3.25rem; }
  .pm-table.no-save.no-view .col-product { left: 0; }
  .pm-table th.col-save, .pm-table th.col-view, .pm-table th.col-product,
  .pm-table thead td.col-save, .pm-table thead td.col-view, .pm-table thead td.col-product { z-index: 4; }
}
.pm-table .col-product .c { display: block; }
.pm-table .col-product a, .pm-table .col-product .p { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.pm-table .col-product a:hover .name { text-decoration: underline; }
.pm-table .col-product img { width: 40px; height: 40px; object-fit: contain; flex: none; background: #fff; border-radius: 4px; }
.pm-table .col-product .name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font-weight: 500; }
.pm-table td.col-product { min-width: min(16rem, 40vw); }
@media (max-width: 39.99rem) {
  .pm-table .col-product img { display: none; }
}

/* Sort buttons in the header */
.pm-table th .sort { display: inline-flex; align-items: center; gap: .3rem; border: 0; background: none; padding: .4rem 0; cursor: pointer; font-weight: 600; text-align: inherit; }
.pm-table th .sort::after { content: "↕"; color: var(--muted); opacity: .5; font-size: .85em; }
.pm-table th[aria-sort=ascending] .sort::after { content: "↑"; opacity: 1; color: var(--accent); }
.pm-table th[aria-sort=descending] .sort::after { content: "↓"; opacity: 1; color: var(--accent); }

/* Save buttons */
.save { width: 2.25rem; height: 2.25rem; border: 0; background: none; border-radius: 50%; cursor: pointer; font-size: 1.35rem; line-height: 1; color: var(--muted); }
.save::before { content: "☆"; }
.save[aria-pressed=true] { color: var(--save); }
.save[aria-pressed=true]::before { content: "★"; }
.save:hover { background: var(--row-hover); }
.save:focus-visible { outline: 2px solid var(--accent); }
.save[aria-busy=true] { opacity: .5; }

/* Below the table */
.pm-more { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin: .75rem 0; color: var(--muted); font-size: .9rem; }
.pm-more button { padding: .45rem 1.2rem; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text); cursor: pointer; }
.pm-empty { padding: 1.5rem 1rem; text-align: center; color: var(--muted); }
.pm-notes { margin-top: 1.5rem; color: var(--muted); font-size: .8rem; max-width: 60rem; }
.pm-notes p { margin: 0 0 .5rem; }

/* View buttons and the product window */
.view { width: 2.25rem; height: 2.25rem; border: 0; background: none; border-radius: 50%; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.view:hover { color: var(--accent); background: var(--row-hover); }
.view:focus-visible { outline: 2px solid var(--accent); }
.pm-product { width: 40rem; }
.pm-product-top { display: flex; flex-wrap: wrap; gap: 1rem; }
.pm-product-media { flex: 1 1 14rem; min-width: 0; }
.pm-product-info { flex: 1 1 14rem; min-width: 0; }
.pm-gallery-main { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; background: #fff; border-radius: 8px; border: 1px solid var(--line); }
.pm-gallery-main img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pm-thumbs { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.pm-thumbs button { width: 3.25rem; height: 3.25rem; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.pm-thumbs button[aria-pressed=true] { border: 2px solid var(--accent); }
.pm-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pm-product-title { margin: 0 0 .6rem; font-size: .9rem; color: var(--muted); }
.pm-availability { margin: 0 0 .6rem; font-size: .9rem; font-weight: 600; }
.pm-features { margin: .8rem 0 0; padding-left: 1.1rem; font-size: .9rem; }
.pm-features li { margin-bottom: .3rem; }
.pm-product h3 { font-size: 1rem; margin: 1.2rem 0 .4rem; }
.pm-details-note { margin: 0 0 .5rem; font-size: .8rem; color: var(--muted); }
.pm-view-link { margin: 0 0 .75rem; font-size: .9rem; }
.pm-price-note { margin: 1.2rem 0 0; font-size: .8rem; color: var(--muted); }
.pm-sources p { margin: 0 0 .4rem; font-size: .9rem; }
.pm-sources ul { margin: 0; padding-left: 1.1rem; font-size: .9rem; }
.pm-sources li { margin-bottom: .3rem; overflow-wrap: anywhere; }
.pm-details { margin: 0; }
.pm-details > div { display: grid; grid-template-columns: minmax(7rem, 40%) 1fr; gap: .75rem; padding: .35rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.pm-details dt { color: var(--muted); }
.pm-details dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.pm-button { display: inline-block; padding: .5rem 1.2rem; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text); text-decoration: none; font-weight: 600; }
.pm-button:hover { filter: brightness(1.08); }
.pm-open-form { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin: 1.25rem 0; }
button.pm-button { cursor: pointer; }

/* Lightbox with a cell's full content */
.pm-lightbox { width: min(40rem, calc(100vw - 2rem)); max-height: 80vh; padding: 0; border: 2px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); }
.pm-lightbox::backdrop { background: rgba(0,0,0,.45); }
.pm-lightbox-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: .9rem 1rem .2rem; }
.pm-lightbox h2 { font-size: 1.05rem; margin: 0; }
.pm-lightbox .close { border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 .2rem; }
.pm-lightbox-product { margin: 0 1rem; color: var(--muted); font-size: .85rem; }
.pm-lightbox-body { padding: .8rem 1rem 1.2rem; white-space: pre-line; overflow-wrap: anywhere; }

/* Short message at the bottom of the screen */
.pm-toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 50; max-width: calc(100vw - 2rem); padding: .6rem 1rem; border-radius: 8px; background: var(--text); color: var(--bg); box-shadow: 0 4px 16px rgba(0,0,0,.25); font-size: .9rem; }

/* My Saved Products */
.pm-intro { color: var(--muted); margin: 0 0 1rem; max-width: 60rem; }
.pm-notice { padding: .6rem .9rem; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); max-width: 60rem; }
.pm-notice.ok { border-color: var(--accent); }
.pm-notice.err, .pm-error { color: var(--danger); }
.pm-notice.err { border-color: var(--danger); }
.pm-saved { margin-bottom: 1.75rem; }
.pm-saved-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0 0 .5rem; }
.pm-saved h2 { font-size: 1.2rem; margin: 0; }
.pm-saved h2 a { color: var(--text); text-decoration: none; }
.pm-saved h2 a:hover { color: var(--accent); text-decoration: underline; }
.pm-saved h2 .n { color: var(--muted); font-size: .85rem; font-weight: 400; margin-left: .3rem; }
/* Saved lists are short, so cells show everything instead of clipping */
.pm-saved .pm-table td { height: auto; padding-top: .55rem; padding-bottom: .55rem; }
.pm-saved .pm-table .c { display: block; -webkit-line-clamp: unset; line-clamp: none; }
.pm-saved .pm-table td.col-save form { margin: 0; }
.remove { width: 2.25rem; height: 2.25rem; border: 0; background: none; border-radius: 50%; cursor: pointer; font-size: 1.4rem; line-height: 1; color: var(--muted); }
.remove:hover { color: var(--danger); background: var(--row-hover); }
.remove:focus-visible { outline: 2px solid var(--accent); }
.remove:disabled { opacity: .5; cursor: default; }
.pm-others { margin: 0; padding-left: 1.2rem; }
.pm-others li { margin: .3rem 0; }
.pm-others form { display: inline; margin-left: .5rem; }
.pm-link { max-width: 44rem; margin-top: 2rem; padding: 1rem 1.1rem 1.1rem; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.pm-link h2 { font-size: 1.2rem; margin: 0 0 .5rem; }
.pm-link p { margin: 0 0 .75rem; }
.pm-warning { padding: .55rem .8rem; border-left: 4px solid var(--save); background: var(--head); border-radius: 0 6px 6px 0; }
.pm-link-row { display: flex; gap: .5rem; }
.pm-link-row input { flex: 1; }
.pm-link-row button { padding: .35rem 1rem; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text); cursor: pointer; white-space: nowrap; }

/* Compare: a tick box per row, the bar at the bottom of the screen and the side-by-side window */
.pm-table:not(.can-compare) .col-compare { display: none; }
.pm-table .col-compare { width: 3.25rem; min-width: 3.25rem; padding: 0; text-align: center; font-size: .75rem; }
.compare { width: 1.25rem; height: 1.25rem; margin: 0; cursor: pointer; accent-color: var(--accent); }
.pm-compare-bar { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 1rem; padding: .5rem .6rem .5rem 1rem; border-radius: 99px; background: var(--panel); border: 1px solid var(--accent); box-shadow: 0 4px 16px rgba(0,0,0,.2); white-space: nowrap; }
.pm-compare-bar .pm-button { border-radius: 99px; padding: .4rem 1.1rem; }
.pm-compare { max-width: min(calc(100vw - 1rem), 72rem); }
.pm-compare .pm-modal-body { padding: 0; overflow: auto; }
.pm-compare-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .92rem; }
.pm-compare-table th, .pm-compare-table td { padding: .5rem .75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; min-width: 9rem; }
.pm-compare-table thead th { position: sticky; top: 0; z-index: 2; background: var(--head); vertical-align: bottom; }
.pm-compare-table thead img { display: block; width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 4px; margin-bottom: .35rem; }
.pm-compare-table tbody th { position: sticky; left: 0; z-index: 1; background: var(--head); font-weight: 600; font-size: .85rem; min-width: 8rem; max-width: 12rem; }
.pm-compare-table td { background: var(--panel); }
.pm-compare-table .unit { color: var(--muted); font-weight: 400; }
.pm-compare-table td.empty { color: var(--muted); }
@media (max-width: 39.99rem) {
  .pm-compare-table th, .pm-compare-table td { min-width: 7.5rem; padding: .45rem .6rem; }
  .pm-compare-table tbody th { min-width: 6.5rem; }
}
.has-compare-bar .pm-toast { bottom: 5rem; }
.has-compare-bar main { padding-bottom: 6rem; }

/* Bigger Save and View buttons on touch screens */
@media (pointer: coarse) {
  .save, .view, .remove { width: 2.75rem; height: 2.75rem; }
  .pm-table .col-save, .pm-table .col-compare { width: 3.5rem; min-width: 3.5rem; }
  .pm-table .col-view { width: 3.25rem; min-width: 3.25rem; }
  .compare { width: 1.5rem; height: 1.5rem; }
}
@media (pointer: coarse) and (min-width: 40rem) {
  .pm-table .col-view { left: 3.5rem; }
  .pm-table .col-product { left: 6.75rem; }
  .pm-table.no-save .col-product { left: 3.25rem; }
  .pm-table.no-view .col-product { left: 3.5rem; }
  .pm-table.no-save.no-view .col-product { left: 0; }
}

/* No smooth scrolling or animation for visitors whose device asks for reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
