/* ========================================================================
   Pairs Page — Scrollable two-piece connection catalog
   ======================================================================== */

.pairs-hero {
  text-align: center;
  padding: 2rem 1.5rem 1.5rem;
  background: #0d0d0d;
  border-bottom: 1px solid #1a1a1a;
}

.pairs-hero h1 { font-size: 1.6rem; color: #fff; margin: 0 0 0.5rem; }
.pairs-hero .subtitle { font-size: 0.9rem; color: #888; max-width: 700px; margin: 0 auto; line-height: 1.5; }

/* Container: vertical scroll through all pairs */
.pairs-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Each pair: full-width card with left heat map, right description */
.pair-section {
  display: flex;
  gap: 2rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid #1a1a1a;
}

.pair-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* Left side: connection diagram + heat map */
.pair-visual {
  flex: 0 0 520px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Connection diagram: shape A — junction — shape B */
.pair-connection-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 1rem;
  background: #111;
  border: 1px solid #222;
  border-radius: 6px;
}

.pair-shape-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.75rem 1rem;
  background: #1a1a1a;
  border-radius: 4px;
  min-width: 120px;
}

.pair-shape-icon {
  font-size: 1.8rem;
  color: #555;
}

.pair-shape-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: #e0e0e0;
  text-align: center;
}

.pair-shape-signal {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
}

.pair-junction {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0.75rem;
}

.pair-junction-line {
  width: 60px;
  height: 2px;
  background: #3a7bd5;
  position: relative;
}

.pair-junction-line::before,
.pair-junction-line::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a7bd5;
  top: -3px;
}
.pair-junction-line::before { left: -4px; }
.pair-junction-line::after { right: -4px; }

.pair-junction-type {
  font-size: 0.6rem;
  color: #666;
  margin-top: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Geometric schematic notation */
.pair-schematic-wrap {
  background: #0a0a0a;
  border: 1px solid #222;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.pair-schematic-wrap img,
.pair-schematic-wrap svg,
.pair-schematic-wrap canvas {
  width: 100%;
  display: block;
}

.pair-schematic-canvas {
  height: 220px;
  display: block;
}

.pair-schematic-label {
  position: absolute;
  bottom: 0.5rem;
  left: 0.75rem;
  font-size: 0.65rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pair-schematic-legend {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 0.6rem;
  color: #444;
  text-align: right;
  line-height: 1.4;
}

.pair-schematic-legend .legend-outline { color: #3a7bd5; }
.pair-schematic-legend .legend-internal { color: #ffbb6b; }

/* Right side: description and real-world comparison */
.pair-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pair-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pair-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.pair-result-signal {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
}

.pair-description {
  font-size: 0.9rem;
  color: #bbb;
  line-height: 1.6;
}

/* What happens at the junction */
.pair-mechanism {
  background: #111;
  border: 1px solid #222;
  border-radius: 6px;
  padding: 1rem;
}

.pair-mechanism h3 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #3a7bd5;
  margin: 0 0 0.5rem;
}

.pair-mechanism p {
  font-size: 0.85rem;
  color: #aaa;
  line-height: 1.5;
  margin: 0;
}

/* Real-world analog */
.pair-analog {
  background: #0d1a0d;
  border: 1px solid #1a3a1a;
  border-radius: 6px;
  padding: 1rem;
}

.pair-analog h3 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6bbb6b;
  margin: 0 0 0.5rem;
}

.pair-analog-name {
  font-size: 1rem;
  font-weight: 700;
  color: #8bdb8b;
  margin-bottom: 0.25rem;
}

.pair-analog p {
  font-size: 0.8rem;
  color: #7aaa7a;
  line-height: 1.5;
  margin: 0;
}

/* Measured properties comparison */
.pair-properties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.pair-prop {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0.5rem;
  background: #0a150a;
  border-radius: 3px;
  font-size: 0.75rem;
}

.pair-prop-label { color: #5a8a5a; }
.pair-prop-value { color: #8bdb8b; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Responsive */
@media (max-width: 900px) {
  .pair-section { flex-direction: column; }
  .pair-visual { flex: none; width: 100%; }
}
