.filter-box,
.filter-box__title,
.filter-box__search,
.filter-box__list,
.fb-option,
.filter-box--range,
.filter-box__range-inputs,
.filter-box__presets,
.fb-preset {
  display: none;
}

.filter-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-menu-btn:hover { border-color: var(--esp-red); color: var(--text-primary); }

.filter-menu-btn.is-active {
  border-color: var(--esp-red);
  color: var(--text-primary);
  background: var(--esp-red-muted);
}

.filter-menu-btn.is-open {
  border-color: var(--esp-red);
  color: var(--esp-red);
  background: var(--bg-elevated);
}

.filter-menu-btn__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 0.6875rem;
  font-weight: 700;
  background: var(--esp-red);
  color: #fff;
  border-radius: 9px;
}

.filter-menu-btn__chev { opacity: 0.5; }

.filter-popover__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.filter-popover__title {
  font-size: 0.8125rem;
  font-weight: 600;
  flex: 1;
}

.filter-popover__search {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  background: var(--bg-input);
  color: var(--text-primary);
}

.filter-popover__body {
  overflow-y: auto;
  padding: 8px;
  max-height: min(300px, 45vh);
}

.filter-popover__body--range { padding: 14px; }

.fp-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  font-size: 0.8125rem;
  line-height: 1.4;
  cursor: pointer;
  border-radius: var(--radius);
  color: var(--text-primary);
}

.fp-option:hover:not(.is-disabled) { background: var(--row-hover); }
.fp-option.is-hidden { display: none; }
.fp-option.is-disabled { opacity: 0.35; cursor: not-allowed; }
.fp-option input { accent-color: var(--esp-red); margin-top: 2px; flex-shrink: 0; }
.fp-option__text { flex: 1; }
.fp-option__count { color: var(--text-muted); font-size: 0.75rem; min-width: 1.5em; text-align: right; }

.fp-range-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.fp-range-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.fp-range-input {
  width: 72px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background: var(--bg-input);
  color: var(--text-primary);
}

.fp-range-unit {
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding-bottom: 8px;
}

.fp-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fp-preset {
  padding: 5px 10px;
  font-size: 0.75rem;
  color: var(--text-link);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.fp-preset:hover { background: var(--esp-red-muted); border-color: var(--esp-red); }

.facet-sidebar__top,
.facet-section,
.facet-option,
.facet-range,
.sidebar,
.sidebar-overlay,
.mobile-filter-btn,
.search-bar {
  display: none;
}

.results-table--head,
.results-table--body {
  width: 100%;
  min-width: 1310px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.col-img { width: 72px; }
.col-name { width: 14%; }
.col-type { width: 64px; }
.col-series { width: 76px; }
.col-gpio { width: 56px; }
.col-cpu { width: 11%; }
.col-wifi { width: 88px; }
.col-sram { width: 64px; }
.col-flash { width: 64px; }
.col-psram { width: 64px; }
.col-integ { width: 110px; }
.col-pcb { width: 72px; }
.col-bom { width: 64px; }
.col-price { width: 80px; }
.col-docs { width: 128px; }
.col-action { width: 48px; }

.results-table--head th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  user-select: none;
  letter-spacing: 0.02em;
  background: var(--bg-elevated);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.results-table thead {
  background: var(--bg-elevated);
}

.results-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  user-select: none;
  letter-spacing: 0.02em;
  background: var(--bg-elevated);
}

.results-table th.is-sortable { cursor: pointer; }
.results-table th.is-sortable:hover { color: var(--esp-red); }

.results-table th .sort-icon {
  margin-left: 4px;
  opacity: 0.4;
  font-size: 0.6875rem;
}

.results-table th.is-sorted { color: var(--esp-red); }
.results-table th.is-sorted .sort-icon { opacity: 1; }

.results-table tbody tr {
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.12s;
  cursor: pointer;
}

.results-table tbody tr.skeleton-row { cursor: default; }

.results-table tbody tr:nth-child(even) { background: var(--row-stripe); }
.results-table tbody tr:hover { background: var(--row-hover); }

.results-table td {
  padding: 12px 14px;
  vertical-align: middle;
}

.results-table th:nth-child(1),
.results-table td:nth-child(1),
.results-table th:nth-child(3),
.results-table td:nth-child(3),
.results-table th:nth-child(4),
.results-table td:nth-child(4),
.results-table th:nth-child(5),
.results-table td:nth-child(5),
.results-table th:nth-child(7),
.results-table td:nth-child(7),
.results-table th:nth-child(8),
.results-table td:nth-child(8),
.results-table th:nth-child(9),
.results-table td:nth-child(9),
.results-table th:nth-child(10),
.results-table td:nth-child(10),
.results-table th:nth-child(11),
.results-table td:nth-child(11),
.results-table th:nth-child(12),
.results-table td:nth-child(12),
.results-table th:nth-child(13),
.results-table td:nth-child(13),
.results-table th:nth-child(14),
.results-table td:nth-child(14),
.results-table th:nth-child(15),
.results-table td:nth-child(15),
.results-table th:nth-child(16),
.results-table td:nth-child(16) {
  text-align: center;
}

.results-table td:nth-child(1) .product-thumb,
.results-table td:nth-child(1) .product-thumb--logo {
  display: block;
  margin: 0 auto;
}

.results-table td:nth-child(7) .feature-icons,
.results-table td:nth-child(15) .doc-links-inline {
  justify-content: center;
}

.td-img {
  width: 72px;
}

.product-thumb {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  padding: 0;
}

.product-thumb--logo {
  width: 64px;
  height: 64px;
  padding: 0;
  background: transparent;
}

.td-name__link {
  color: inherit;
  font-weight: 500;
}

.td-name__link:hover {
  color: var(--esp-red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.product-thumb--fallback {
  opacity: 0.55;
  filter: grayscale(0.2);
}

.product-thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.td-name {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.td-name a { color: inherit; font-weight: 500; }
.td-name a:hover { color: var(--esp-red); }

.td-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.td-mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.complexity-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-input);
}

.complexity-badge__dots {
  display: flex;
  gap: 3px;
}

.complexity-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
}

.complexity-badge__dot.is-on { background: var(--esp-red); }

.complexity-badge--low { border-color: rgba(62, 207, 142, 0.35); }
.complexity-badge--mid { border-color: rgba(107, 163, 255, 0.35); }
.complexity-badge--high { border-color: rgba(231, 53, 43, 0.45); }

.td-bom {
  cursor: help;
  text-decoration: underline dotted var(--text-muted);
  text-underline-offset: 3px;
}

.td-price {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--status-active);
  cursor: help;
}

.td-price.is-unknown {
  color: var(--text-muted);
  font-weight: 400;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
}

.badge--active { background: rgba(62, 207, 142, 0.15); color: var(--status-active); }
.badge--preview { background: rgba(107, 163, 255, 0.15); color: var(--status-preview); }
.badge--legacy { background: rgba(122, 130, 144, 0.2); color: var(--status-legacy); }
.badge--qfn { background: var(--bg-input); color: var(--text-secondary); border: 1px solid var(--border); }
.badge--som { background: var(--esp-red-muted); color: var(--esp-red); }

.btn-icon {
  padding: 6px 12px;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  background: var(--bg-input);
}

.btn-icon:hover {
  border-color: var(--esp-red);
  color: var(--esp-red);
}

.btn-icon.is-selected {
  background: var(--esp-red);
  border-color: var(--esp-red);
  color: #fff;
}

.doc-links-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-start;
}

.results-table td.td-docs {
  padding: 12px 14px;
}

.doc-link-sm--table {
  padding: 3px 6px;
  font-size: 0.6875rem;
}

.doc-link-sm--table::after {
  content: none;
}

.doc-link-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-link);
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  white-space: nowrap;
  background: var(--bg-input);
}

.doc-link-sm::after {
  content: '';
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  background: currentColor;
  opacity: 0.6;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M6.5 3H3v10h10V9.5M9.5 2.5H13.5V6.5M13 3L7.5 8.5' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M6.5 3H3v10h10V9.5M9.5 2.5H13.5V6.5M13 3L7.5 8.5' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.doc-link-sm:hover {
  background: var(--esp-red-muted);
  text-decoration: none;
  border-color: var(--esp-red);
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  cursor: pointer;
  transition: border-color var(--ease-out), background var(--ease-out);
}

.product-card:hover {
  border-color: var(--border-focus);
  background: var(--row-hover);
}

.product-card:active {
  background: var(--row-hover);
}

.product-card__head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.product-card__thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-card__title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-card__name {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--text-primary);
}

.product-card__name:hover {
  color: var(--esp-red);
  text-decoration: none;
}

.product-card__sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.product-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.product-card__compare {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: var(--bg-input);
  transition: background var(--ease-out), border-color var(--ease-out), color var(--ease-out);
}

.product-card__compare.is-selected {
  background: var(--esp-red);
  border-color: var(--esp-red);
  color: #fff;
}

.product-card__specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  background: var(--bg-input);
  border-radius: var(--radius-sm);
}

.product-card__spec {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-card__spec-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.product-card__spec-value {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.product-card__docs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-soft);
}

@media (max-width: 420px) {
  .product-card__specs {
    grid-template-columns: repeat(2, 1fr);
  }
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.empty-state__icon {
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.empty-state__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.empty-state__hint {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  max-width: 360px;
  margin-bottom: var(--space-5);
}

.compare-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-top: 2px solid var(--esp-red);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  max-height: 55vh;
  overflow: auto;
  transform: translateY(100%);
  transition: transform var(--ease-medium);
  z-index: 300;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
}

.compare-drawer.is-open { transform: translateY(0); }

.compare-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 1;
}

.compare-drawer__title {
  font-size: 0.9375rem;
  font-weight: 600;
}

.compare-table-wrap { padding: 20px 32px; overflow-x: auto; }

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.compare-table th,
.compare-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.compare-table th {
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-elevated);
}

.compare-table td { font-family: var(--font-mono); font-size: 0.8125rem; }

.compare-table .row-label {
  font-family: var(--font-sans);
  color: var(--text-secondary);
  position: sticky;
  left: 0;
  background: var(--bg-surface);
}

.compare-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-7);
  z-index: 250;
  padding: 12px 24px;
  background: var(--esp-red);
  color: #fff;
  font-weight: 600;
  font-size: var(--text-base);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  transition: background var(--ease-out), transform var(--ease-out);
}

.compare-bar:hover {
  background: var(--esp-red-hover);
  transform: scale(1.03);
}

.btn-close {
  padding: 8px 16px;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text-primary);
}

.btn-close:hover { border-color: var(--esp-red); color: var(--esp-red); }

.feature-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-start;
}

.feature-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.feature-dot.is-on { background: var(--esp-red); box-shadow: 0 0 6px var(--esp-red-glow); }
.feature-dot[title] { cursor: help; }

.decoder-panel {
  flex-shrink: 0;
  margin-top: var(--space-5);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.decoder-panel__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color var(--ease-out), background var(--ease-out);
}

.decoder-panel__summary::-webkit-details-marker {
  display: none;
}

.decoder-panel__summary::after {
  content: '+';
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--text-muted);
}

.decoder-panel[open] .decoder-panel__summary::after {
  content: '−';
}

.decoder-panel__summary:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.decoder-panel__body {
  padding: 0 var(--space-5) var(--space-5);
  border-top: 1px solid var(--border-soft);
}

.decoder-panel__title {
  display: none;
}

.decoder-panel__row {
  display: flex;
  gap: var(--space-3);
  padding-top: var(--space-4);
}

.decoder-panel__input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background: var(--bg-input);
  color: var(--text-primary);
}

.decoder-panel__input:focus {
  border-color: var(--esp-red);
  outline: none;
}

.decoder-panel__btn {
  padding: 12px 20px;
  background: var(--esp-red);
  color: #fff;
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: var(--radius);
}

.decoder-panel__btn:hover { background: var(--esp-red-hover); }

.decoder__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.decoder__field {
  padding: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

.decoder__field-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.decoder__field-value {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  margin-top: 4px;
}

.fm-category__title {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--esp-red);
  margin-bottom: var(--space-1);
  grid-column: 1 / -1;
}

.fm-group { margin-bottom: 16px; }

.fm-group__title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.fm-group__options {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fm-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 8px;
  font-size: 0.8125rem;
  border-radius: var(--radius);
  cursor: pointer;
}

.fm-option:hover:not(.is-disabled) { background: var(--row-hover); }
.fm-option.is-disabled { opacity: 0.35; cursor: not-allowed; }
.fm-option input { accent-color: var(--esp-red); margin-top: 2px; }
.fm-option__text { flex: 1; }
.fm-option__count { color: var(--text-muted); font-size: 0.75rem; }

.fm-ranges { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }

.fm-range-block {
  padding: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

.fm-range-block__label { font-weight: 600; font-size: 0.8125rem; margin-bottom: 10px; }
.fm-range-block__inputs { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
.fm-range-block__inputs label { display: flex; flex-direction: column; gap: 4px; font-size: 0.6875rem; color: var(--text-muted); }
.fm-range-input {
  width: 72px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}
.fm-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-preset {
  padding: 4px 8px;
  font-size: 0.75rem;
  color: var(--text-link);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}
.fm-preset:hover { border-color: var(--esp-red); }

.compare-drawer__actions { display: flex; gap: 10px; }

.compare-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.8125rem;
}

.compare-legend__item {
  padding: 4px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.compare-col-head { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.compare-col-head__name { font-family: var(--font-mono); font-size: 0.75rem; }

.compare-score { font-size: 0.6875rem; font-weight: 600; font-family: var(--font-sans); }
.compare-score--positive { color: var(--status-active); }
.compare-score--negative { color: var(--status-negative); }
.compare-score--neutral { color: var(--text-muted); }

.compare-cell--win {
  background: rgba(62, 207, 142, 0.12);
  box-shadow: inset 3px 0 0 var(--status-active);
}

.compare-cell--lose {
  background: var(--status-negative-muted);
  box-shadow: inset 3px 0 0 var(--status-negative);
}

.compare-cell--equal {
  background: rgba(107, 163, 255, 0.1);
}

.compare-cell--mid { background: transparent; }
.compare-cell--neutral { background: transparent; }

.compare-legend__item.compare-cell--win,
.compare-legend__item.compare-cell--lose,
.compare-legend__item.compare-cell--equal {
  box-shadow: none;
  border: 1px solid var(--border);
}

@media (max-width: 640px) {
  .compare-drawer {
    max-height: 85vh;
  }

  .compare-drawer__header {
    padding: var(--space-3) var(--space-4);
  }

  .compare-drawer__title {
    font-size: var(--text-sm);
  }

  .compare-table-wrap {
    padding: var(--space-4);
  }

  .compare-bar {
    display: block;
    left: var(--space-4);
    right: var(--space-4);
    bottom: var(--space-4);
    text-align: center;
  }

  .btn-close {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
  }
}
