/* Portable Solution Comparison Tool — desktop-focused layout */

:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --header-tint: #edf2f7;
  --text: #1a1a18;
  --text-muted: #5c5c56;
  --border: #e4e4df;
  --accent: #6b7280;
  --accent-soft: #e8e9ec;
  --pill-bg: #e8e9ec;
  --shadow: 0 1px 3px rgba(26, 26, 24, 0.06);
  --filter-bar-height: 0px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-width: 960px;
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
}

.page-header {
  text-align: center;
  padding: 1rem 2rem 0.875rem;
  border-bottom: 1px solid var(--border);
  background: var(--header-tint);
}

.page-title {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.main {
  padding: 1.25rem 0.75rem 3rem;
  max-width: none;
  margin: 0 auto;
}

.filter-bar {
  position: sticky;
  top: 0;
  z-index: 11;
  margin: 0 0.5rem 0.5rem;
  padding: 0.75rem 0.65rem;
  background: var(--header-tint);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.filter-bar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: flex-end;
  justify-content: center;
}

.filter-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  flex: 0 1 auto;
}

.filter-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
}

.filter-input {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.875rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  width: 10rem;
}

.filter-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.table-panel {
  margin-left: auto;
  margin-right: auto;
  padding: 1.25rem 0.5rem 1.5rem;
}

.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.corner-cell {
  width: 18%;
  min-width: 168px;
  vertical-align: top;
  padding: 0.75rem 0.65rem 1.05rem 0;
  position: sticky;
  top: var(--filter-bar-height);
  z-index: 10;
  background: var(--header-tint);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.col-head {
  width: 16.4%;
  vertical-align: top;
  text-align: center;
  font-weight: 400;
  padding: 0.75rem 0.65rem 1.05rem 0.65rem;
  position: sticky;
  top: var(--filter-bar-height);
  z-index: 10;
  background: var(--header-tint);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.col-head-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.select-floater-host {
  width: 100%;
  text-align: center;
}

.logo-trigger-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 10px;
  width: 100%;
}

.vendor-logo {
  display: block;
  width: 8rem;
  height: 2.5rem;
  object-fit: contain;
  object-position: center;
}

.vendor-logo[hidden] {
  display: none;
}

.select-anchor {
  display: inline-block;
  text-align: left;
  max-width: 100%;
}

.product-select {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  padding: 0.45rem 2rem 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: var(--bg);
  color: var(--text);
  cursor: pointer;
  appearance: none;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 0.85rem, calc(100% - 9px) 0.85rem;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.product-select option {
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 400;
  font-style: normal;
  color: var(--text);
  font-size: 0.875rem;
}

.product-select option:disabled {
  color: var(--text-muted);
}

.col-head.is-filter-nonconforming,
td.value-cell.is-filter-nonconforming {
  background-color: var(--accent-soft);
  color: var(--text-muted);
  opacity: 0.65;
}

.product-select:hover {
  border-color: #c9cac4;
}

.product-select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.product-select.has-selection {
  font-weight: 700;
}

.info-trigger {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.info-trigger[hidden] {
  display: none;
}

.info-trigger:hover {
  background: #dde0e5;
}

.info-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.untested-trigger {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.untested-trigger[hidden] {
  display: none;
}

.untested-trigger:hover {
  background: #dde0e5;
}

.untested-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.spec-label-cell {
  padding: 0.71875rem 0.65rem 0.71875rem 0;
  text-align: left;
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.8125rem;
  color: #3a3a36;
  vertical-align: top;
  width: 18%;
}

.spec-label-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.spec-label-text {
  flex: 1;
  min-width: 0;
}

.pin-trigger {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pin-trigger svg {
  display: block;
}

.pin-trigger svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.pin-trigger.is-pinned {
  background: var(--accent);
  color: var(--surface);
}

.pin-trigger.is-pinned svg path {
  fill: currentColor;
  stroke: currentColor;
}

.pin-trigger:hover {
  background: #dde0e5;
}

.pin-trigger.is-pinned:hover {
  background: #5a6270;
}

.pin-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.value-cell {
  padding: 0.71875rem 0.65rem;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.6;
  vertical-align: top;
  border-left: 1px solid var(--border);
  color: var(--text);
  word-wrap: break-word;
}

.value-text {
  display: block;
}

.cell-na {
  color: var(--text-muted);
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 0.78rem;
}

.tbd-pill {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: "DM Mono", ui-monospace, monospace;
}

.popover {
  position: fixed;
  z-index: 1000;
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(26, 26, 24, 0.12);
}

.popover-body {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.8125rem;
  color: var(--text);
  line-height: 1.5;
}

.footnote {
  max-width: 1100px;
  margin: 0.65rem auto 0;
  padding: 0 0.875rem;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  text-align: left;
  line-height: 1.5;
}
