/*
 * Product comparison: accessible, horizontal table for up to five products.
 * Separate from all scoring, research and category-matching CSS.
 */
.compare-dock[hidden] { display: none !important; }
body.compare-has-selection { padding-bottom: 170px; }
.compare-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 950;
  border-top: 2px solid #282828;
  background: #fff;
  box-shadow: 0 -8px 26px rgb(38 38 38 / 15%);
  color: #262626;
}
.compare-dock-content {
  width: min(100% - 28px, 1280px);
  margin: 0 auto;
  padding: 11px 0 max(11px, env(safe-area-inset-bottom));
}
.compare-dock-heading,
.compare-dock-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.compare-count {
  font-weight: 750;
  color: #262626;
  font-size: .95rem;
}
.compare-dock-actions { justify-content: flex-end; }
.compare-clear {
  border: 0;
  color: #262626;
  background: transparent;
  padding: 8px;
  text-decoration: underline;
  cursor: pointer;
  font-size: .88rem;
}
.compare-open {
  border: 1px solid #171717;
  border-radius: 9px;
  background: #171717;
  color: #fff;
  padding: 10px 16px;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}
.compare-open:hover:not(:disabled) { background: #101010; }
.compare-open:disabled {
  cursor: not-allowed;
  background: #dedede;
  color: #555555;
  border-color: #dedede;
}
.compare-chips {
  display: flex;
  gap: 7px;
  margin-top: 8px;
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: thin;
}
.compare-chip {
  flex: 0 0 auto;
  max-width: 260px;
  padding: 5px 9px;
  border: 1px solid #dadada;
  border-radius: 999px;
  background: #f6f6f6;
  color: #262626;
  font-size: .74rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.compare-status {
  margin: 4px 0 0;
  color: #333333;
  font-size: .8rem;
}
.compare-status:empty { display: none; }
/* Compare selector: a native checkbox styled as the user's requested
   blue pill with an outlined box and green checked state. */
.editorial-results .compare-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  padding: 10px 16px;
  border: 1px solid #c7d9f5;
  border-radius: 13px;
  background: #edf4ff;
  color: #151515;
  cursor: pointer;
  user-select: none;
  font: inherit;
  font-size: 1.1rem;
  line-height: 1.25;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease;
}
.editorial-results .compare-option:hover { background: #dceaff; }
.editorial-results .compare-option.compare-option-selected {
  background: #cfe2ff;
  border-color: #cfe2ff;
}
.editorial-results .compare-option.compare-option-selected:hover {
  background: #c2daff;
}
.editorial-results .compare-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
}
.editorial-results .compare-checkbox-mark {
  display: inline-block;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 2px solid #007843;
  border-radius: 3px;
  background: #fff;
  position: relative;
  box-sizing: border-box;
}
.editorial-results .compare-toggle:checked + .compare-checkbox-mark {
  background: #007843;
}
.editorial-results .compare-toggle:checked + .compare-checkbox-mark::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 19px;
  top: 1px;
  left: 8px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(42deg);
}
.editorial-results .compare-toggle:focus-visible ~ .compare-option-text {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.editorial-results .compare-option:focus-within {
  outline: 3px solid #005f89;
  outline-offset: 3px;
}
.editorial-results .compare-option-text {
  font-weight: 500;
}
.compare-open:focus-visible,
.compare-chip:focus-visible,
.compare-clear:focus-visible,
.compare-dialog button:focus-visible,
.compare-dialog a:focus-visible,
.compare-table-scroll:focus-visible {
  outline: 3px solid #141414;
  outline-offset: 3px;
}
.compare-dialog {
  box-sizing: border-box;
  width: min(95vw, 1340px);
  max-width: none;
  max-height: 92dvh;
  padding: 0;
  border: 1px solid #d1d1d1;
  border-radius: 17px;
  overflow: hidden;
  background: #fff;
  color: #262626;
  box-shadow: 0 20px 70px rgb(30 30 30 / 26%);
}
.compare-dialog::backdrop { background: rgb(23 23 23 / 73%); }
body.compare-dialog-active { overflow: hidden; }
.compare-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 23px 15px;
  background: #f5f5f5;
  border-bottom: 1px solid #e3e3e3;
}
.compare-eyebrow {
  margin: 0 0 3px;
  color: #101010;
  text-transform: uppercase;
  font-size: .73rem;
  font-weight: 750;
  letter-spacing: .09em;
}
.compare-dialog-heading h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  font-family: Georgia, "Times New Roman", serif;
}
.compare-dialog-close {
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid #aeaeae;
  border-radius: 8px;
  color: #101010;
  font-weight: 700;
  background: #fff;
  cursor: pointer;
}
.compare-dialog-body {
  box-sizing: border-box;
  padding: 14px 22px 22px;
  overflow-y: auto;
  max-height: calc(92dvh - 100px);
}
.compare-intro {
  max-width: 950px;
  margin: 2px 0 10px;
  color: #555555;
  font-size: .92rem;
  line-height: 1.5;
}
.compare-scroll-hint {
  margin: 0 0 12px;
  color: #101010;
  font-size: .82rem;
  font-weight: 650;
}
.compare-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid #e5e5e5;
  border-radius: 11px;
  scrollbar-width: thin;
}
.compare-table {
  width: max-content;
  min-width: 100%;
  border-spacing: 0;
  border-collapse: separate;
  table-layout: fixed;
  line-height: 1.45;
  font-size: .86rem;
}
.compare-table th,
.compare-table td {
  vertical-align: top;
  padding: 13px 12px;
  border-right: 1px solid #e7e7e7;
  border-bottom: 1px solid #e7e7e7;
  text-align: left;
  overflow-wrap: anywhere;
}
.compare-table tr:last-child th,
.compare-table tr:last-child td { border-bottom: 0; }
.compare-table tr > :last-child { border-right: 0; }
.compare-table tbody tr:nth-child(even) { background: #fafafa; }
.compare-table .compare-row-label {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 155px;
  min-width: 155px;
  max-width: 155px;
  background: #f2f2f2;
  color: #303030;
  font-weight: 750;
  box-shadow: 2px 0 5px rgb(74 74 74 / 6%);
}
.compare-table td,
.compare-table .compare-product-header {
  box-sizing: border-box;
  width: 238px;
  min-width: 238px;
  max-width: 238px;
}
.compare-table .compare-product-header {
  background: #fff;
  color: #262626;
  font-weight: normal;
}
.compare-table .compare-corner { z-index: 4; }
.compare-top-pick {
  display: block;
  width: fit-content;
  margin-bottom: 7px;
  border-radius: 5px;
  padding: 3px 7px;
  background: #171717;
  color: #fff;
  font-size: .71rem;
  font-weight: 750;
}
.compare-product-picture {
  display: grid;
  place-items: center;
  height: 120px;
  margin-bottom: 9px;
  border-radius: 9px;
  background: #f4f4f4;
}
.compare-product-picture img {
  max-width: 100%;
  max-height: 116px;
  object-fit: contain;
}
.compare-image-placeholder {
  max-width: 140px;
  color: #666666;
  font-size: .72rem;
  text-align: center;
}
.compare-product-brand {
  display: block;
  color: #171717;
  font-size: .77rem;
  font-weight: 750;
}
.compare-product-name {
  display: block;
  margin: 3px 0 10px;
  font-size: .94rem;
  line-height: 1.34;
}
.compare-remove-product {
  padding: 6px 9px;
  border: 1px solid #c3c3c3;
  border-radius: 7px;
  background: #fff;
  color: #101010;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 650;
}
.compare-table a {
  color: #101010;
  text-decoration: underline;
  font-weight: 700;
}
.compare-muted { color: #626262; }
.compare-feature-list {
  margin: 0;
  padding-left: 17px;
}
.compare-feature-list li + li { margin-top: 6px; }
@media (max-width: 600px) {
  .editorial-results .compare-option {
    min-height: 48px;
    padding: 8px 12px;
    gap: 9px;
    font-size: 1rem;
  }
  .editorial-results .compare-checkbox-mark {
    width: 29px;
    height: 29px;
    flex-basis: 29px;
  }
  .editorial-results .compare-toggle:checked + .compare-checkbox-mark::after {
    top: 0;
    left: 7px;
  }
  body.compare-has-selection { padding-bottom: 175px; }
  .compare-dock-content { width: calc(100% - 20px); }
  .compare-dock-heading { gap: 6px; }
  .compare-count { font-size: .84rem; }
  .compare-dock-actions { gap: 2px; }
  .compare-clear { padding: 7px 5px; font-size: .79rem; }
  .compare-open { padding: 9px 10px; font-size: .81rem; }
  .compare-dialog {
    width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
  }
  .compare-dialog-heading { padding: 14px 12px; }
  .compare-dialog-close { padding: 7px 9px; }
  .compare-dialog-body {
    padding: 12px 9px 16px;
    max-height: calc(100dvh - 82px);
  }
  .compare-table .compare-row-label {
    min-width: 105px;
    width: 105px;
    max-width: 105px;
    font-size: .76rem;
    padding: 11px 7px;
  }
  .compare-table td,
  .compare-table .compare-product-header {
    width: 208px;
    min-width: 208px;
    max-width: 208px;
  }
  .compare-table td, .compare-table th { padding: 11px 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .compare-dock, .compare-dialog { scroll-behavior: auto; }
}

/* Optional explanations inside comparison, consistent with the education-first UX. */
.compare-help {
  margin: 0 0 12px;
  padding: 10px 13px;
  border: 1px solid #e5e5e5;
  border-radius: 9px;
  background: #fafafa;
  color: #555555;
  font-size: .83rem;
}
.compare-help summary {
  width: fit-content;
  cursor: pointer;
  color: #101010;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.compare-help summary:focus-visible {
  outline: 3px solid #141414;
  outline-offset: 3px;
}
.compare-help p {
  margin: 9px 0 0;
  line-height: 1.5;
}
