/* Swimming Match Engine (SME) page — /technologies/swim-match-engine/
   A simple pipeline: paragraph + screenshot box, big arrow, next step, repeat. */

.pipe { max-width: 880px; margin: 0 auto; }

.pipe-title {
  color: var(--color-navy);
  margin: 0 0 var(--space-4);
}
.pipe-step__heading {
  color: var(--color-navy);
  margin: 0 0 var(--space-3);
}
.pipe-step__text {
  font-size: var(--fs-lede);
  line-height: 1.75;
  color: var(--color-ink);
  margin-bottom: var(--space-3);
}
.pipe-stat {
  font-family: var(--font-display);
  font-size: 1.2em;
  font-weight: 700;
  line-height: 1;
  color: var(--color-navy);
}
.pipe-step__intro { margin-bottom: var(--space-6); }
.pipe-step__text + figure { margin-top: var(--space-4); }

/* Big arrow between steps */
.pipe-arrow {
  display: flex;
  justify-content: center;
  margin: var(--space-5) 0;
  color: var(--color-red);
}
.pipe-arrow svg { width: 72px; height: 96px; }
@media (max-width: 639px) {
  .pipe-arrow svg { width: 52px; height: 72px; }
}

/* ── Screenshot box ────────────────────────────────────────────
   Each <img> points at a fixed file in /assets/technologies/swim-match-engine/.
   Until that file exists, onerror swaps in a labelled placeholder, so
   dropping the screenshot into the folder is all it takes to fill a slot. */
.shot { margin: 0; }
.shot__window {
  background: var(--color-cream-soft);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card-lg);
  overflow: hidden;
}
.shot__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--color-navy);
}
.shot__bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}
.shot__screen img { display: block; width: 100%; height: auto; }
.shot__placeholder { display: none; }
.shot__screen.is-empty {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(10, 34, 71, 0.03) 14px 28px),
    var(--color-cream);
}
.shot__screen.is-empty .shot__placeholder {
  display: block;
  padding: 8px 14px;
  border: 1px dashed rgba(10, 34, 71, 0.25);
  border-radius: var(--radius-btn);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--color-muted);
}

/* ── Example database table ────────────────────────────────── */
.db-scroll { overflow-x: auto; }
.db {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.db th {
  padding: 12px 14px;
  background: var(--color-cream);
  border-bottom: 1px solid var(--color-rule);
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  white-space: nowrap;
}
.db td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--color-rule);
  color: var(--color-ink);
  white-space: nowrap;
}
.db .num { text-align: right; }
.db tbody tr:nth-child(5) td,
.db tbody tr:nth-child(7) td { border-bottom: 2px solid rgba(10, 34, 71, 0.18); }
.db tr.is-top td:nth-child(5) { font-weight: 700; color: var(--color-red); }
.db tbody tr:last-child td { border-bottom: none; }
.db tfoot td {
  border-top: 2px solid rgba(10, 34, 71, 0.18);
  border-bottom: none;
  background: var(--color-cream);
  color: var(--color-muted);
  font-weight: 700;
}
.db-foot {
  padding: 10px 14px;
  background: var(--color-cream);
  border-top: 1px solid var(--color-rule);
  font-size: 12px;
  color: var(--color-muted);
}

.db-label {
  padding: 12px 14px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-navy);
  border-top: 1px solid var(--color-rule);
}
.shot__bar + .db-label { border-top: none; }
.db .is-key { font-weight: 700; color: var(--color-navy); }
.db tr.is-dim td { color: var(--color-muted); }
.db--fit tbody tr:nth-child(5) td,
.db--fit tbody tr:nth-child(7) td { border-bottom: 1px solid var(--color-rule); }
.db-pill {
  display: inline-block;
  padding: 0 6px;
  border-radius: var(--radius-chip);
  font-size: 0.78em;         /* clearly smaller than the table text */
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.db-pill--fit { background: rgba(74, 139, 223, 0.14); color: var(--color-green-soft); }
.db-pill--no  { background: rgba(14, 33, 56, 0.06); color: var(--color-muted); }

.db--rank { min-width: 760px; }
.db--rank tbody tr:nth-child(5) td,
.db--rank tbody tr:nth-child(7) td { border-bottom: 1px solid var(--color-rule); }
.db--rank tbody tr:first-child td { background: rgba(74, 139, 223, 0.07); }
.db--rank th { white-space: normal; vertical-align: bottom; }
.db--rank th.num, .db--rank td.num { padding-left: 10px; padding-right: 10px; }

/* ── Phones: shrink the example tables so they fit without sideways scroll ── */
@media (max-width: 639px) {
  .shot__bar { padding: 8px 12px; }
  .db, .db--rank { min-width: 0; font-size: 11px; }
  .db th { padding: 8px 6px; font-size: 9px; letter-spacing: 0.03em; white-space: normal; vertical-align: bottom; }
  .db td { padding: 8px 6px; white-space: normal; line-height: 1.3; }
  .db--rank { font-size: 10.5px; }
  .db--rank th, .db--rank td, .db--rank th.num, .db--rank td.num { padding-left: 4px; padding-right: 4px; }
  .db--rank th { font-size: 8.5px; }
  /* drop the least important column in each table */
  .db--data th:nth-child(2), .db--data td:nth-child(2),
  .db--data th:nth-child(3), .db--data td:nth-child(3),
  .db--fit  th:nth-child(2), .db--fit  td:nth-child(2),
  .db--rank th:nth-child(2), .db--rank td:nth-child(2) { display: none; }
  .db-label { padding: 10px 8px 8px; font-size: 11px; }
  .db-foot { padding: 8px; font-size: 10.5px; }
  .db-pill { padding: 0 5px; }
  .db--fit td:last-child, .db--fit th:last-child { padding-right: 8px; }
}

/* Visually hidden, still read by screen readers and search engines */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
