/*
  Compare · v7, 10 Nov 2026. The compare chapter on /product/ (#compare), the picker, 10 category pages and
  56 product pages. v6 had a hub page with a 56-row list (_legacy/compare-v6c.css). Was: the hub, 10 category pages and 56 product pages,
  generated by _build/build.py from one data file. A thin page file on top of site.css; the five-step
  category table (.chain, .lanes) is shared with home and lives in site.css.
  Pulled with the single-page version: the positioning scales ("Axari's assessment: Axari 90, X 50"),
  since they were our own scores of other products and the brief asks for factual, sourced comparisons.
  Previous rules: in _legacy/uc-v5.css.
*/
.cmp-h1 { max-width: 18ch; }
.page-hero .ctas { margin-top: var(--s6); }
.cmp-meta { margin-top: var(--s4); }
.cmp-meta a { color: var(--ink-80); }
.cells .h4 + .body, .cells .body + .ticks, .cells .ticks + .body { margin-top: var(--s3); }
.cells .body + .body { margin-top: var(--s3); }

/* Linked cells: a category or a product, the whole panel is the link. */
.cmp-cell { display: flex; flex-direction: column; gap: var(--s1); text-decoration: none; transition: background-color var(--t-hover) var(--ease); }
.cmp-cell b { font-weight: 500; color: var(--ink); }
.cmp-cell .small { color: var(--ink-80); margin-top: var(--s2); }
.cmp-cell .cap { margin-top: auto; padding-top: var(--s3); }
/* Card hover fill pulled 10 Nov (same call as the customer story cards): the title underline is the cue. */
.cmp-cell:hover b { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 767px) { .cmp-cell:hover { background: none; } }

/* Sources: list rows, the domain then what it supports. */
.cmp-src-h { margin-top: var(--s8); margin-bottom: var(--s3); }
.cmp-src li { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: var(--gutter); padding-block: var(--s3); border-top: 1px solid var(--line); font-size: var(--fs-small); }
.cmp-src a { color: var(--ink-80); overflow-wrap: anywhere; }
.cmp-src span { color: var(--ink-60); }
@media (max-width: 767px) { .cmp-src li { grid-template-columns: 1fr; gap: var(--s1); } }
/* Phones: the source link's hit area grows to 44px without moving the row (was 21px, 10 Nov audit). */
@media (max-width: 767px) { .cmp-src a { justify-self: start; padding-block: 11px; margin-block: -11px; } }

/* ---------- From uc.css (the single-page version) ----------*/
.cmp-h1 { max-width: 18ch; }
.page-hero .updated { margin-top: var(--s4); }
.cmp-jump { margin-top: var(--s5); }
.cmp-stats { margin-top: var(--s8); }
.cmp-stats .stat-n { font-size: var(--fs-h3); }

/* The category chart lives in site.css (.chain / .lanes), shared with the homepage. */

/* Directory: one block per category, products as hairline cells */
.cmp-fam + .cmp-fam { margin-top: var(--s9); }
.cmp-fam-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--s3) var(--s6); margin-bottom: var(--s5); }
.cmp-fam-head .body { margin-top: var(--s2); }
.cmp-cell { display: flex; flex-direction: column; gap: var(--s1); transition: background-color var(--t-hover) var(--ease); }
.cmp-cell b { font-weight: 500; color: var(--ink); }
.cmp-cell .small { color: var(--ink-80); margin-top: var(--s2); }
/* Card hover fill pulled 10 Nov (same call as the customer story cards): the title underline is the cue. */
.cmp-cell:hover b { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 767px) { .cmp-cell:hover { background: none; } }

.cmp-logo { display: flex; align-items: center; gap: var(--s2); }
.cmp-adv { margin-block: var(--s9) var(--s5); max-width: 28ch; }
.cmp-stack { display: grid; gap: var(--s6); }
.cmp-stack .h4 + .body, .cmp-stack .h4 + .ticks { margin-top: var(--s2); }

/* Category and head-to-head views */
.cmp-hero { padding-bottom: var(--s8); }
.cmp-title { max-width: 22ch; }
.cmp-meta { margin-top: var(--s3); }
.cmp-hero .lede { margin-top: var(--s5); }
.cmp-verdict { margin-top: var(--s7); }
.cmp-verdict > :first-child .h4::after { content: none; }
.cmp-sec { padding-block: var(--s9); }
.cmp-answer { margin-top: var(--s3); margin-bottom: var(--s6); }
.cmp-tbl { min-width: 640px; table-layout: fixed; }
.cmp-tbl thead th:first-child { width: 18%; }
.cmp-tbl tbody th { width: 18%; font-size: var(--fs-small); color: var(--ink-60); }
.cmp-tbl thead th:nth-child(2) { color: var(--ink); }
.cmp-extra { margin-top: var(--s5); }
.cmp-sources .h4 { margin-bottom: var(--s4); }
.cmp-sources .cap { margin-top: var(--s4); max-width: 80ch; }
.cmp-more { margin-top: var(--s8); }

.app-bar > span:first-child { display: inline-flex; align-items: center; gap: var(--s2); min-width: 0; }
/* Phones: the comparison table stacks into labelled rows instead of scrolling sideways */
@media (max-width: 767px) {
  .cmp-tbl { min-width: 0; table-layout: auto; }
  .cmp-tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cmp-tbl tr, .cmp-tbl th, .cmp-tbl td { display: block; width: auto !important; }
  /* 10 Nov (Avi): more air between topics, so each reads as its own block. Was var(--s4) (16px). */
  .cmp-tbl tbody tr { padding-block: var(--s6); border-bottom: 1px solid var(--line); }
  .cmp-tbl th, .cmp-tbl td { border: 0; padding: 0; }
  .cmp-tbl td { margin-top: var(--s3); }
  .cmp-tbl td::before { content: attr(data-label); display: block; font-size: var(--fs-cap); color: var(--ink-60); }
  .cmp-tbl tbody th { color: var(--ink); font-weight: 500; }
}

/* ---------- The compare chapter on /product/ (v7, 10 Nov) ----------
   One joined panel: the ten categories on the left, the open one's pane on the right. Every pane sits in
   the same grid cell and the closed ones are only hidden, so the panel is always as tall as the tallest
   pane and switching never moves the page. Without the script, every pane shows in turn. */
.cmp-stage { --pp: 0; padding: 0; }
.cmp-cat-h { margin: 0; }
.cmp-cat-h button { position: relative; isolation: isolate; display: flex; flex-direction: column; gap: 2px; width: 100%; padding: var(--s4) var(--s5); min-height: 52px; justify-content: center; background: none; border: 0; border-radius: 0; text-align: left; font: inherit; cursor: pointer; }
/* The hover and selected fill is the nav menu's row tile (site.css .nm-list): square, held 8px off the
   frame, text 16px inside it on every side, rows touching. Drawn as a layer so the whole row stays the hit
   area and the label never moves (24px from the frame, as before).
   10 Nov, Avi, round 1: no edge-to-edge fill. Round 2: the first inset (8px all round, 8px rounded corners)
   was pulled: rounded corners are product UI only, and the fill hugged the text.
   Phones: each row sits between hairlines, so the tile is inset 8px on every side there. */
.cmp-cat-h button::before { content: ""; position: absolute; inset: 0 var(--s2); z-index: -1; border-radius: 0; transition: background-color var(--t-hover) var(--ease); }
/* 12 Nov (Avi): a list you pick from reads in regular weight; the chosen row is marked by its fill and full ink. */
.cmp-cat-h b { font-size: var(--fs-small); font-weight: 400; color: var(--ink-80); transition: color var(--t-hover) var(--ease); }
.cmp-cat-h .cap { color: var(--ink-60); }
.cmp-cat-h button:hover::before { background: var(--fill-soft); }
.cmp-cat-h button:hover b, .cmp-cat-h button[aria-expanded="true"] b { color: var(--ink); }
.cmp-cat-h button[aria-expanded="true"]::before { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.cmp-cat-h button:focus-visible { outline-offset: -2px; }
.cmp-pane { padding: var(--s7); min-width: 0; }
.cmp-claim { max-width: 26ch; margin-bottom: var(--s7); }
.cmp-pane .lanes-scroll { margin-top: auto; }
.cmp-pane-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s3) var(--s6); margin-top: var(--s6); }
.cmp-names { color: var(--ink-60); max-width: 56ch; }
/* The link holds the right edge in every pane, with or without the product list (10 Nov, Avi: it jumped
   left in the two categories with nothing published). Phones: under the list, at the left. */
.cmp-pane-foot .more { margin-left: auto; flex: none; }
@media (max-width: 767px) { .cmp-pane-foot { flex-direction: column; align-items: flex-start; } .cmp-pane-foot .more { margin-left: 0; } }
.cmp-names a { color: var(--ink-80); }
.cmp-names a:hover { color: var(--ink); }
.cmp-stage:not(.is-on) .cmp-cat + .cmp-cat { border-top: 1px solid var(--line); }

@media (min-width: 768px) {
  .cmp-stage.is-on { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); grid-template-rows: repeat(10, auto) 1fr; }
  .cmp-stage.is-on .cmp-cat { display: contents; }
  /* The divider is the pane's left edge, not the categories' right edge (10 Nov, Avi: borders must line up).
     The tiles below draw theirs as border-left at the same 1/3 line; a border-right here sat 1px short of it.
     Was: border-right on .cmp-cat-h plus a ::after filler in row 11 to carry it down. */
  .cmp-stage.is-on .cmp-cat-h { grid-column: 1; grid-row: var(--r); }
  /* The list's 8px off the frame, top and bottom, like the nav menu box's own padding. */
  .cmp-stage.is-on .cmp-cat:first-child .cmp-cat-h button { padding-top: calc(var(--s4) + var(--s2)); }
  .cmp-stage.is-on .cmp-cat:first-child .cmp-cat-h button::before { top: var(--s2); }
  .cmp-stage.is-on .cmp-cat:last-child .cmp-cat-h button { padding-bottom: calc(var(--s4) + var(--s2)); }
  .cmp-stage.is-on .cmp-cat:last-child .cmp-cat-h button::before { bottom: var(--s2); }
  .cmp-stage.is-on .cmp-pane { grid-column: 2; grid-row: 1 / -1; display: flex; flex-direction: column; visibility: hidden; border-left: 1px solid var(--line); }
  .cmp-stage.is-on .cmp-pane.is-open { visibility: visible; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .cmp-pane { padding: var(--s6); }
}
/* Phones: accordions. The open category's pane sits under its row.
   10 Nov (Avi: "not coming across as tappable accordions"). The rows read as a tab list: no glyph,
   the open row in a filled tile, and the open row could not be closed. Now they use the FAQ's language
   (site.css .faq): the + on the right that turns to × when open, the label in full ink when open, no fill.
   Tapping the open row closes it (compare.js). Desktop keeps the tile and one-always-open tabs.
   Was: the tile on the open row, inset 8px (restore: drop the ::after and the fill override below). */
@media (max-width: 767px) {
  .cmp-cat-h button { padding: var(--s5); flex-direction: row; align-items: center; justify-content: space-between; gap: var(--s4); }
  .cmp-cat-h button::before { inset: var(--s2); }
  .cmp-cat-h button[aria-expanded="true"]::before, .cmp-cat-h button:hover::before { background: none; } /* a tap leaves :hover stuck on touch */
  .cmp-cat-h b { font-size: var(--fs-body); }
  .cmp-cat-h button::after { content: "+"; flex: none; font-size: 24px; font-weight: 400; line-height: 1; color: var(--ink-60); transition: transform var(--t-ui) var(--ease); }
  .cmp-cat-h button[aria-expanded="true"]::after { transform: rotate(45deg); }
  .cmp-cat + .cmp-cat { border-top: 1px solid var(--line); }
  .cmp-stage.is-on .cmp-pane { display: none; }
  .cmp-stage.is-on .cmp-pane.is-open { display: block; }
  .cmp-pane { padding: var(--s4) var(--s5) var(--s6); }
  .cmp-claim { margin-bottom: var(--s5); }
}

/* Most-asked, then search: home's compare row (.linkcols-logos), with search as the sixth cell. */
/* A closed frame joined under the categories, every cell padded from the frame. Its own frame, not
   .panel: .panel > .linkcols carries home's bleed-to-edge rules, which zeroed the phone padding here. */
.cmp-top { border: 1px solid var(--line); border-top: 0; border-radius: var(--r-frame); }
.cmp-top .linkcols { border-top: 0; }
.cmp-top .linkcols li:nth-child(n) a, .cmp-top .linkcols li:nth-child(n) .cmp-find-btn { padding-inline: var(--s5) !important; }
.cmp-find-btn { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; row-gap: var(--s4); width: 100%; min-height: 52px; padding: var(--s5) var(--s4); background: none; border: 0; border-radius: 0; text-align: left; font: inherit; font-size: var(--fs-small); font-weight: 500; color: var(--ink-80); cursor: pointer; transition: color var(--t-hover) var(--ease); }
.cmp-find-btn:hover, .cmp-find-btn[aria-expanded="true"] { color: var(--ink); }
@media (max-width: 479px) { .cmp-find-btn { row-gap: var(--s3); padding-block: var(--s4); } }

/* The switch in a comparison's H1: the product name, with a chevron, opens the picker. */
button.cmp-switch { display: inline; padding: 0; background: none; border: 0; border-radius: 0; font: inherit; color: inherit; letter-spacing: inherit; text-align: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-strong); text-decoration-thickness: 2px; text-underline-offset: 0.14em; transition: text-decoration-color var(--t-hover) var(--ease); }
button.cmp-switch:hover, button.cmp-switch[aria-expanded="true"] { text-decoration-color: var(--ink-60); }
button.cmp-switch svg { display: inline-block; width: 0.42em; height: 0.42em; margin-left: 0.18em; vertical-align: 0.14em; fill: none; stroke: var(--ink-60); stroke-width: 1.4; transition: transform var(--t-hover) var(--ease); }
button.cmp-switch[aria-expanded="true"] svg { transform: rotate(180deg); }
/* 12 Nov (Avi, phone: the name and chevron "go in second line when loads, and then jump"). Two causes:
   compare.js adds the chevron after the first paint, so the balanced H1 rewrapped when it landed; and
   Safari may break before an inline-block, which left the chevron alone on the next line.
   The server-rendered span reserves the chevron's exact width (0.42em + 0.18em) so the first frame
   wraps as the final one does, and the script glues the last word to the chevron (.cmp-sw-end).
   inline-block because a <button> always lays out as one box (a two-word name drops to its own line
   whole); a plain inline span broke between words, so long names jumped a line when the script ran. */
span.cmp-switch { display: inline-block; }
/* The reserve rides on the last word only: a zero-width word joiner (no break before it) with the
   chevron's 0.6em as margin. Padding on the box narrowed every line and wrapped long names early. */
span.cmp-switch::after { content: "\2060"; margin-left: 0.6em; }
.cmp-sw-end { white-space: nowrap; }

/* The picker: the nav menu's surface (square frame, hairline, frosted surface-2), 8px box padding and
   16px rows that fill as a tile, so every floating list on the site reads as one material. */
.cmp-pick { position: absolute; z-index: 300; display: none; }
.cmp-pick.is-open { display: block; animation: cmp-in 160ms var(--ease); }
.cmp-pick.is-up.is-open { animation-name: cmp-in-up; }
@keyframes cmp-in { from { opacity: 0; transform: translateY(-4px); } }
@keyframes cmp-in-up { from { opacity: 0; transform: translateY(4px); } }
.cmp-pick-box { display: flex; flex-direction: column; max-height: var(--h, 440px); padding: var(--s2); border: 1px solid var(--line); border-radius: var(--r-frame); background: color-mix(in srgb, var(--surface-2) 92%, transparent); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); }
.cmp-pick-field { display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s4); border-bottom: 1px solid var(--line); margin: calc(-1 * var(--s2)) calc(-1 * var(--s2)) var(--s2); }
.cmp-pick-field svg { width: 16px; height: 16px; fill: var(--ink-60); flex: none; }
.cmp-pick-field input { flex: 1; min-width: 0; height: 52px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: var(--fs-small); outline: none; }
.cmp-pick-field input::placeholder { color: var(--ink-60); }
.cmp-pick-list { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.cmp-pick-h { padding: var(--s4) var(--s4) var(--s1); font-size: var(--fs-cap); color: var(--ink-60); }
/* 10 Nov (Avi): a hairline between category groups, inset to the row tiles. Same rule as the nav menu's groups. */
.cmp-pick-h ~ .cmp-pick-h { border-top: 1px solid var(--line); margin-top: var(--s2); padding-top: var(--s5); }
.cmp-pick-list [role=option] a { display: block; padding: var(--s3) var(--s4); font-size: var(--fs-small); text-decoration: none; }
.cmp-pick-list b { display: block; font-weight: 500; color: var(--ink-80); }
.cmp-pick-list span { display: block; font-size: var(--fs-cap); color: var(--ink-60); }
.cmp-pick-list .is-active a { background: var(--fill-soft); }
.cmp-pick-list .is-active b, .cmp-pick-list .is-cur b { color: var(--ink); }
.cmp-pick-list .is-cur a { background: color-mix(in srgb, var(--ink) 7%, transparent); }
/* Opened upward, the box keeps its full height so the field never moves while the list filters. */
.cmp-pick.is-up .cmp-pick-box { height: var(--h); }
.cmp-pick-none { padding: var(--s4); font-size: var(--fs-small); color: var(--ink-60); }
/* Phone: a bottom sheet over a scrim, the field on top so the keyboard never covers it. */
.cmp-pick.is-sheet { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); }
.cmp-pick.is-sheet.is-open { display: flex; align-items: flex-end; animation: none; }
.cmp-pick.is-sheet .cmp-pick-box { width: 100%; height: 82dvh; max-height: none; border-width: 1px 0 0; background: var(--surface-2); animation: cmp-sheet 220ms var(--ease); }
@keyframes cmp-sheet { from { transform: translateY(24px); opacity: 0; } }
html.cmp-lock, html.cmp-lock body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .cmp-pick.is-open, .cmp-pick.is-sheet .cmp-pick-box { animation: none; } }

/* On touch devices the picker takes focus on open so the keyboard stays down; no ring on the container itself. */
.cmp-pick:focus { outline: none; }
