/* ════════════════════════════════════════════════════════════════
   Spatial Partitioning from Scratch · Tutorial-specific styles
   Builds on tutorial.css design tokens.
   ════════════════════════════════════════════════════════════════ */

/* ── History timeline (same shape as graph-tutorial.css / sort-tutorial.css;
      duplicated so this tutorial does not need to load those stylesheets) ─ */
.sort-timeline {
  margin: 1.75rem 0 2.25rem;
  border-left: 1px solid var(--tut-border);
  padding-left: 1.25rem;
}

.sort-timeline-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.25rem;
  padding: 0.55rem 0;
  align-items: baseline;
}

.sort-timeline-year {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--tut-accent);
  font-weight: 600;
  letter-spacing: 0.04em;
  position: relative;
}

.sort-timeline-year::before {
  content: '';
  position: absolute;
  left: -1.95rem;
  top: 0.4em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tut-accent);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
}

.sort-timeline-body {
  font-size: 0.97rem;
  line-height: 1.65;
  color: var(--tut-soft);
}

.sort-timeline-body strong { color: var(--tut-text); font-weight: 600; }

/* ── Comparison / pick table ────────────────────────────────────── */
.rep-table {
  overflow-x: auto;
  margin: 1.5rem 0;
}

.rep-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.rep-table th,
.rep-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--tut-border-soft);
  text-align: left;
  vertical-align: top;
  color: var(--tut-soft);
  line-height: 1.55;
}

.rep-table thead th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tut-muted);
  font-weight: 700;
  background: rgba(167, 139, 250, 0.04);
  border-bottom-color: var(--tut-border);
}

.rep-table tbody tr:hover { background: rgba(167, 139, 250, 0.03); }

.rep-table strong { color: var(--tut-text); font-weight: 600; }

/* ── Code block child ───────────────────────────────────────────── */
pre.code code {
  font-family: inherit;
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  white-space: pre;
  display: block;
}

/* ── Card visual on the home index for this tutorial ─────────────── */
.tut-card-visual.spatial-bg,
.game-card-visual.spatial-bg {
  background:
    radial-gradient(circle at 25% 35%, rgba(52, 211, 153, 0.24), transparent 45%),
    radial-gradient(circle at 70% 65%, rgba(167, 139, 250, 0.26), transparent 45%),
    linear-gradient(135deg, #0a1a16 0%, #0d0a1a 50%, #0a0f1f 100%);
}

/* ── Side-by-side widget panels ──────────────────────────────────── */
.sp-dual-canvas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 720px) {
  .sp-dual-canvas { grid-template-columns: 1fr; }
}
