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

/* ── History timeline (same shape as sort-tutorial.css; duplicated here
      so this tutorial does not need to load the sort stylesheet) ───── */
.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; }

/* ── Representation / pick table used in §3 and §7 ───────────────── */
.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 blocks in graph-tutorial use the plain text version. Mirror the
   sort tutorial's pre.code styling that's defined in tutorial.css, but
   make sure the <code> child still preserves whitespace. */
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.graph-bg,
.game-card-visual.graph-bg {
  background:
    radial-gradient(circle at 30% 35%, rgba(96, 165, 250, 0.26), transparent 45%),
    radial-gradient(circle at 75% 70%, rgba(167, 139, 250, 0.28), transparent 45%),
    linear-gradient(135deg, #0a141f 0%, #0d0a1a 60%, #1a0e26 100%);
}
