/* compare.css (2 Nov 2026): the robot comparer (features/compare.js). Uses the page's own tokens (--panel, --line, --teal…),
   so it follows dark and light mode on index.html and robots/index.html. On phones the table becomes stacked cards under a
   sticky row of robot names. Nothing here may be wider than the screen. */
#compare-mount { --cmp-top: 76px; margin-top: 44px; scroll-margin-top: 92px; min-width: 0; }
.cmp-sec { padding: 0 0 clamp(36px, 5vw, 56px); }   /* robots/index.html: its own band under the hero */
.cmp-sec #compare-mount { margin-top: 0; }
.cmp-open { gap: 10px; }
.cmp-open .cmp-ico { width: 18px; height: 18px; flex: none; }
.cmp-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.cmp-panel { position: relative; margin-top: 22px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 24px; padding: clamp(18px, 3vw, 34px); min-width: 0; }
.cmp-panel[hidden] { display: none; }
.cmp-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.cmp-title { font-family: var(--display); font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; margin: 0; }
.cmp-lead { margin: 4px 0 0; color: var(--soft); font-size: 15.5px; }
.cmp-x { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: var(--soft); cursor: pointer; }
.cmp-x:hover { color: var(--ink); border-color: var(--soft); }
.cmp-x svg { width: 18px; height: 18px; }

/* the picker: every robot as a chip with its photo (or its key number when the site has no photo) */
.cmp-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; margin-top: 20px; }
.cmp-chip { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: center; gap: 10px; min-width: 0; padding: 6px 12px 6px 6px; text-align: start;
  font: inherit; color: var(--ink); background: rgba(255, 255, 255, .03); border: 1px solid var(--line-2); border-radius: 14px; cursor: pointer; transition: border-color .2s, background .2s, opacity .2s; }
html[dir="rtl"] .cmp-chip { padding: 6px 6px 6px 12px; }
.cmp-chip:hover { border-color: var(--soft); }
.cmp-chip[aria-pressed="true"] { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 14%, transparent); }
.cmp-chip.is-full { opacity: .45; cursor: not-allowed; }
.cmp-th { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; overflow: hidden; background: radial-gradient(circle at 50% 70%, var(--panel-2), transparent 75%); }
.cmp-th img { display: block; width: 46px; height: 46px; object-fit: contain; }
.cmp-cn { display: grid; min-width: 0; line-height: 1.3; }
.cmp-cn b { font-family: var(--display); font-weight: 800; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-cn small { font-size: 12.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-num { position: absolute; top: -7px; inset-inline-end: -5px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--teal); color: #00243A; font: 800 12.5px/1 var(--display); font-style: normal; }
html[data-theme="light"] .cmp-num { color: #FFFFFF; }
.cmp-badge { display: grid; place-items: center; align-content: center; gap: 0; line-height: 1; color: var(--teal); }
.cmp-badge b { font-family: var(--display); font-weight: 900; }
.cmp-badge small { font-size: 11px; color: var(--dim); }
.cmp-th.cmp-badge b { font-size: 15px; }
.cmp-status { margin: 14px 0 0; min-height: 1px; color: var(--soft); font-size: 14.5px; }
.cmp-status:empty { display: none; }

/* the table: one row per question, one column per robot */
.cmp-table { --n: 2; margin-top: 26px; min-width: 0; }
.cmp-row { display: grid; grid-template-columns: minmax(120px, 190px) repeat(var(--n), minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cmp-row > * { min-width: 0; padding: 14px 14px; overflow-wrap: break-word; }
.cmp-k { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--dim); }
.cmp-c { font-size: 15px; line-height: 1.5; }
.cmp-c + .cmp-c { border-inline-start: 1px solid var(--line); }
.cmp-head { position: sticky; top: var(--cmp-top); z-index: 3; background: var(--panel); border-top: 0; border-bottom: 1px solid var(--line-2); }
.cmp-h { position: relative; display: grid; justify-items: start; align-content: end; gap: 8px; padding-inline-end: 40px; }
.cmp-hp { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 150px; height: 104px; overflow: hidden; }
.cmp-hp img { display: block; height: 104px; width: 100%; object-fit: contain; }
.cmp-hp.cmp-badge { flex-direction: column; }
.cmp-hp.cmp-badge b { font-size: 38px; }
.cmp-hp.cmp-badge small { font-size: 14px; }
.cmp-hn { display: grid; line-height: 1.25; min-width: 0; }
.cmp-hn a, .cmp-hn b { font-family: var(--display); font-weight: 800; font-size: 19px; color: var(--ink); text-decoration: none; }
.cmp-hn a:hover { color: var(--teal); }
.cmp-hn small { color: var(--dim); font-size: 13px; }
.cmp-rm { position: absolute; top: 12px; inset-inline-end: 8px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--soft); cursor: pointer; }
.cmp-rm:hover { color: var(--ink); border-color: var(--soft); }
.cmp-rm svg { width: 14px; height: 14px; }
.cmp-v { display: block; }
.cmp-v + .cmp-v { margin-top: 8px; }
.cmp-v b { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--ink); }
.cmp-v small { display: block; font-size: 12.5px; color: var(--dim); line-height: 1.35; }
.cmp-na { color: var(--dim); }
.cmp-c ul { margin: 0; padding-inline-start: 18px; display: grid; gap: 4px; }
.cmp-c p { margin: 0; color: var(--soft); font-size: 14.5px; }
.cmp-wa { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 800; font-size: 14.5px; color: #0B3B1E; background: #25D366; border-radius: 999px; padding: 7px 14px; text-decoration: none; }
.cmp-wa:hover { background: #3be07a; }
.cmp-pg { display: block; margin-top: 8px; font-size: 14px; color: var(--soft); text-underline-offset: 3px; }
.cmp-pg:hover { color: var(--ink); }
.cmp-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.cmp-note { margin: 0; color: var(--dim); font-size: 13.5px; max-width: 70ch; }
.cmp-copy { font: inherit; font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--ink); background: transparent; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 14px; cursor: pointer; }
.cmp-copy:hover { border-color: var(--soft); }
html[data-theme="light"] .cmp-chip { background: #FFFFFF; }
html[data-theme="light"] .cmp-chip[aria-pressed="true"] { background: #EAF6FA; }

/* phones: stacked cards, the robot names stay at the top while scrolling */
@media (max-width: 700px) {
  #compare-mount { margin-top: 32px; }
  .cmp-panel { border-radius: 18px; padding: 16px 12px; }
  .cmp-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .cmp-chip { grid-template-columns: 38px minmax(0, 1fr); gap: 8px; padding: 5px 8px 5px 5px; border-radius: 12px; }
  html[dir="rtl"] .cmp-chip { padding: 5px 5px 5px 8px; }
  .cmp-th, .cmp-th img { width: 38px; height: 38px; }
  .cmp-cn b { font-size: 14.5px; }
  .cmp-cn small { font-size: 11.5px; }
  .cmp-table { margin-top: 18px; }
  .cmp-row { grid-template-columns: repeat(var(--n), minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; margin-top: 8px; background: rgba(255, 255, 255, .02); }
  html[data-theme="light"] .cmp-row:not(.cmp-head) { background: #F6FAFC; }
  .cmp-row > * { padding: 4px 10px 12px; }
  .cmp-row > .cmp-k { grid-column: 1 / -1; padding: 10px 10px 2px; font-size: 13px; }
  .cmp-c + .cmp-c { border-inline-start: 1px solid var(--line); }
  .cmp-c { font-size: 14px; }
  .cmp-v b { font-size: 14.5px; }
  .cmp-v small { font-size: 11.5px; }
  .cmp-row.cmp-head { margin-top: 0; background: var(--panel); border-radius: 0 0 14px 14px; border: 0; border-bottom: 1px solid var(--line-2); box-shadow: 0 10px 18px -14px rgba(0, 0, 0, .55); }
  .cmp-head > .cmp-k { display: none; }
  .cmp-row > .cmp-h { justify-items: start; align-content: start; gap: 4px; padding: 8px 8px 10px; }
  .cmp-hp { width: 34px; height: 34px; }
  .cmp-hp img { height: 34px; }
  .cmp-hp.cmp-badge b { font-size: 13px; }
  .cmp-hp.cmp-badge small { font-size: 9.5px; }
  .cmp-hn a, .cmp-hn b { font-size: 15px; }
  .cmp-hn small { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cmp-rm { top: 6px; inset-inline-end: 4px; width: 26px; height: 26px; }
  .cmp-c ul { padding-inline-start: 14px; }
  .cmp-r-best li:nth-child(n+3) { display: none; }
  .cmp-wa { padding: 6px 10px; font-size: 13px; }
}
