.mss-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
#selection-tray[hidden],
#compare-tool [hidden],
#catalog-focus-note[hidden] { display: none; }

/* The shortlist follows visits to the catalog and the individual model sheets. */
body.mss-has-tray { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
#selection-tray {
  position: fixed;
  z-index: 20;
  inset: auto 0 0;
  padding: 10px max(16px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  color: var(--text, #f1f4f5);
  background: #202428;
  border-top: 1px solid #657078;
  box-shadow: 0 -4px 18px #0004;
}
.mss-tray-inner {
  width: min(100%, 1220px);
  margin: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.mss-tray-inner > strong { font-size: .95rem; font-weight: 650; white-space: nowrap; }
.mss-tray-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mss-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding-left: 9px;
  background: #2d3237;
  border: 1px solid var(--line, #4c565e);
  border-radius: 4px;
  font: 500 .8rem/1.25 var(--mono, monospace);
}
.mss-chip button,
.mss-clear {
  border: 0;
  background: transparent;
  color: var(--muted, #bfccd3);
  font: inherit;
  cursor: pointer;
}
.mss-chip button { font-size: 1.15rem; padding: 7px 9px; }
.mss-clear { min-height: 44px; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; }
.mss-chip button:hover, .mss-clear:hover { color: var(--text, #f1f4f5); }
.mss-compare-action {
  margin-left: auto;
  flex-shrink: 0;
  border-radius: 4px;
  padding: 12px 16px;
  background: var(--accent, #ff9e5c);
  color: #201911;
  font-size: .94rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}
.mss-compare-action:hover { background: #ffb17e; color: #201911; }
#selection-tray :focus-visible, #compare-tool :focus-visible {
  outline: 2px solid var(--accent, #ff9e5c);
  outline-offset: 3px;
}

#compare-tool { min-width: 0; margin: 30px 0 56px; }
#compare-pickers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 12px;
}
.mss-slot {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 15px 18px;
  background: var(--panel, #25292d);
  color: var(--text, #f1f4f5);
  border: 1px solid var(--line, #4c565e);
  border-radius: 5px;
}
.mss-slot-brand, .mss-slot small { color: var(--muted, #bfccd3); font-size: .82rem; }
.mss-slot small { font-family: var(--mono, monospace); overflow-wrap: anywhere; }
.mss-slot-filled > a { color: var(--text, #f1f4f5); font-size: 1.1rem; font-weight: 650; text-underline-offset: 3px; }
.mss-slot button {
  margin-top: auto;
  padding: 5px 0 1px;
  border: 0;
  background: transparent;
  color: var(--muted, #bfccd3);
  font: inherit;
  font-size: .88rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.mss-slot button:hover, .mss-slot-filled > a:hover { color: var(--accent, #ff9e5c); }
.mss-slot-pick { justify-content: center; border-style: dashed; }
.mss-slot-pick label { font-weight: 650; font-size: .94rem; }
.mss-slot-pick select, #mss-share-link {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 9px 34px 9px 12px;
  border: 1px solid #657078;
  border-radius: 4px;
  background-color: var(--bg, #1b1f24);
  color: var(--text, #f1f4f5);
  font: inherit;
  color-scheme: dark;
}
#compare-empty { max-width: 70ch; padding: 26px 0; }
#compare-empty p { margin-bottom: 14px; }
.comparison-example { margin: 1rem 0 1.25rem; }
.comparison-example > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .3rem 1rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.comparison-example small, .comparison-example dd a { display: block; color: var(--muted); font-size: .875rem; }
.comparison-example dd { min-width: 14rem; }
.comparison-example dd strong { font-variant-numeric: tabular-nums; }
#compare-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin: 22px 0 12px;
}
#compare-options label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 9px;
  font-size: .94rem;
}
#different-only { width: 18px; height: 18px; margin: 0; accent-color: var(--accent, #ff9e5c); }
#mss-share-link { flex-basis: 100%; font-size: .94rem; }
#compare-table {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line, #4c565e);
  border-top: 2px solid var(--accent, #ff9e5c);
  border-radius: 2px;
  scrollbar-color: #6b767f #25292d;
}
.mss-metrics {
  width: 100%;
  border-spacing: 0;
  border-collapse: separate;
  table-layout: fixed;
  color: var(--text, #f1f4f5);
  background: var(--panel, #25292d);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
}
.mss-metrics th, .mss-metrics td {
  padding: 10px clamp(10px, 1.5vw, 20px);
  border: 0;
  border-bottom: 1px solid var(--line, #4c565e);
  text-align: start;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.mss-metrics thead th { color: var(--text, #f1f4f5); background: var(--panel-raised, #2d3237); font-weight: 650; }
.mss-metrics thead th:first-child { width: 30%; }
.mss-metrics thead th > * { display: block; }
.mss-metrics thead a { color: inherit; text-underline-offset: 3px; }
.mss-metrics thead a:hover { color: var(--accent, #ff9e5c); }
.mss-metrics thead span, .mss-metrics thead small { color: var(--muted, #bfccd3); font-size: .82rem; font-weight: 450; }
.mss-metrics thead small { margin-top: 3px; font-family: var(--mono, monospace); }
.mss-metrics .mss-group th {
  padding-block: 8px;
  color: var(--muted, #bfccd3);
  background: var(--bg, #1b1f24);
  font-size: .84rem;
  font-weight: 650;
  letter-spacing: .025em;
}
.mss-metrics th[scope="row"] { background: var(--panel, #25292d); font-weight: 500; }
.mss-metrics th[scope="row"] small, .mss-metric-note {
  display: block;
  color: var(--muted, #bfccd3);
  font-size: .82rem;
  font-weight: 400;
  line-height: 1.4;
}
.mss-metrics td { font-weight: 570; }
.mss-metrics td p { margin: 0 0 .4em; }
.mss-metrics tbody:last-child tr:last-child > * { border-bottom: 0; }
.mss-gap { color: var(--muted, #bfccd3); font-size: .9rem; font-weight: 450; }
.mss-source-links { line-height: 1.7; }
.mss-source-links a { color: var(--text, #f1f4f5); text-underline-offset: 3px; }
.mss-source-links a:hover { color: var(--accent, #ff9e5c); }
.mss-load-error { color: #ffb38e; }
.mss-cold-unit { display: none; }
.mss-cold-retention { display: block; color: var(--muted, #bfccd3); font-size: .8rem; }
#catalog-table td:has(.mss-cold-output)::after { content: none; }

@media (max-width: 720px) {
  .mss-cold-unit { display: inline; color: var(--muted, #bfccd3); font-size: .75rem; }
  .mss-tray-inner { gap: 8px; }
  .mss-tray-chips { display: none; }
  #compare-tool { margin-top: 22px; }
  .mss-metrics { font-size: .94rem; }
  .mss-metrics[data-count="2"] { min-width: 395px; }
  .mss-metrics[data-count="3"] { min-width: 570px; }
  .mss-metrics th, .mss-metrics td { padding: 9px 10px; }
  .mss-metrics thead th:first-child { width: clamp(104px, 29vw, 165px); }
  .mss-metrics tr:not(.mss-group) > th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    box-shadow: 1px 0 var(--line, #4c565e);
  }
}
@media (max-width: 520px) {
  #compare-pickers { grid-template-columns: 1fr; gap: 8px; }
  .mss-slot { padding: 12px 14px; }
  .mss-slot-filled { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; }
  .mss-slot-filled > :not(button) { grid-column: 1; }
  .mss-slot-filled > button { grid-column: 2; grid-row: 1 / 4; margin: 0; min-height: 44px; align-self: center; }
  .mss-compare-action { padding-inline: 10px; font-size: .88rem; }
}
@media print {
  #selection-tray, #compare-options, #compare-pickers { display: none !important; }
  body.mss-has-tray { padding-bottom: 0; }
  #compare-tool {
    margin: 14pt 0 0;
    --bg: #f0f0f0;
    --panel: white;
    --panel-raised: #ededed;
    --line: #bababa;
    --text: #111;
    --muted: #444;
    --accent: #222;
  }
  #compare-table { overflow: visible; border-color: #888; }
  .mss-metrics[data-count] { min-width: 0; font-size: 9pt; }
  .mss-metrics thead { display: table-header-group; }
  .mss-metrics tr { break-inside: avoid; }
  .mss-metrics th, .mss-metrics td { padding: 4pt 6pt; }
  .mss-metrics tr:not(.mss-group) > th:first-child { position: static; box-shadow: none; }
  .mss-metrics th[scope="row"] small, .mss-metric-note, .mss-metrics thead small { font-size: 8pt; }
}

/* Editorial comparisons share the same measurements as the interactive tool. */
.quote-links { margin: 32px 0 4px; border-top: 1px solid var(--line); padding-top: 20px; }
.quote-links h2 { font-size: 21px; }
.quote-links ul { display: flex; flex-wrap: wrap; gap: 8px 25px; list-style: none; padding: 0; margin: 12px 0 0; }
.quote-links a, .matchup-library a, .matchup-main a:not(.button) { text-underline-offset: .18em; }
.matchup-library ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; padding: 0; margin: 16px 0 0; list-style: none; }
.matchup-library li { border-top: 1px solid var(--line); padding: 19px 0; }
.matchup-library h3 { font-size: 20px; }
.matchup-library p, .matchup-notes p { margin-top: .55rem; max-width: 70ch; color: var(--muted); }
.matchup-main { padding-block: clamp(24px, 4vw, 52px) 60px; }
.matchup-crumb { font-size: .9rem; margin-bottom: 18px; }
.matchup-main header h1 { font-size: clamp(32px, 4.4vw, 58px); max-width: 26ch; }
.matchup-main .lead { max-width: 75ch; margin: 12px 0 18px; }
.matchup-table { width: 100%; table-layout: fixed; margin-top: 30px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.matchup-table caption { text-align: left; font-size: 22px; font-weight: 650; padding-bottom: 12px; }
.matchup-table th, .matchup-table td { border-bottom: 1px solid var(--line); padding: 10px 14px; text-align: left; overflow-wrap: anywhere; vertical-align: top; }
.matchup-table th { font-weight: 610; }
.matchup-table thead { background: var(--panel); }
.matchup-table th span, .matchup-table small { display: block; color: var(--muted); font: 450 .82rem/1.45 var(--sans); }
.matchup-table th span:first-of-type { margin-top: 6px; }
.matchup-table code { font-family: var(--mono); }
.matchup-note { margin-top: 10px; color: var(--muted); font-size: .92rem; }
.matchup-notes { display: grid; grid-template-columns: 1.7fr 1fr; column-gap: clamp(32px, 6vw, 90px); margin-top: 16px; }
.matchup-notes h2 { margin-top: 26px; font-size: clamp(20px, 2.2vw, 27px); }
.matchup-notes ul { padding-left: 1.15rem; margin: 8px 0; }
.matchup-notes li { margin: 6px 0; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .matchup-library ul, .matchup-notes { grid-template-columns: 1fr; }
  .matchup-table th, .matchup-table td { padding: 9px 6px; font-size: .86rem; }
  .matchup-table th span, .matchup-table small { font-size: .75rem; }
}
