/* Interactive simulator timeline: figure#sim-timeline in
   blog/posts/2026-11-29-sim-to-real-gap.html. Built by timeline.js.
   Light theme only; colors come from site.css variables. */

.tl {
  margin: 1.8em 0 2em;
  font-family: var(--font-sans);
}

/* Lane colors. Teal and rust (the two lanes that merge) pass the CVD checks
   as a pair; olive only sits next to rust, and every lane also has its own
   row and a text label, so color is never the only cue. */
.tl-k-cpu,
.tl-k-drake,
.tl-k-superdex { --lane: var(--accent-cool); }
.tl-k-nvidia,
.tl-k-branch { --lane: var(--accent); }
/* Black: GPU-first engines that also support CPUs (Newton, Genesis, MuJoCo from MJX on). */
.tl-k-merge,
.tl-k-genesis,
.tl-k-both { --lane: var(--text); }

/* ── Legend and hint ─────────────────────────────── */

.tl .tl-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 18px;
  margin: 0 0 12px;
}

.post-body .tl-legend,
.tl-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.5;
}

.post-body .tl-legend li,
.tl-legend li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.tl-key {
  display: inline-block;
  flex: none;
  width: 16px;
  height: 0;
  border-top: 2px solid var(--lane, var(--muted));
  border-radius: 1px;
}

.tl .tl-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

/* ── Chart ───────────────────────────────────────── */

.tl-wrap { position: relative; }

.tl-svg {
  display: block;
  overflow: visible;
  font-family: var(--font-sans);
  -webkit-tap-highlight-color: transparent;
}

.tl-band { fill: var(--surface); }

.tl-gridline {
  stroke: var(--border);
  stroke-width: 1;
  opacity: 0.6;
}

.tl-axis {
  stroke: color-mix(in srgb, var(--muted) 45%, var(--bg));
  stroke-width: 1;
}

.tl-break { stroke-width: 1.2; }
.tl-break-gap { fill: var(--bg); }

.tl-tick {
  fill: var(--muted);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.tl-note {
  fill: var(--muted);
  font-size: 10.5px;
  font-style: italic;
}

.tl-era {
  fill: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
}

.tl-era-bar {
  stroke: color-mix(in srgb, var(--muted) 40%, var(--bg));
  stroke-width: 2;
  stroke-linecap: round;
}

.tl-lane {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.tl-track,
.tl-link {
  fill: none;
  stroke: var(--lane);
  stroke-width: 2;
  stroke-linecap: round;
}

.tl-track-merge { stroke-width: 2.5; }

.tl-dot {
  fill: var(--lane);
  stroke: var(--bg);
  stroke-width: 2;
}

/* Task suites and frameworks (Gym, ManiSkill, Orbit, Isaac Lab): smaller,
   hollow and grey, so they read as "built on a simulator", not simulators. */
.tl-dot-suite {
  fill: var(--bg);
  stroke: var(--muted);
  stroke-width: 1.5;
}

.tl-legend .tl-k-suite .tl-key {
  width: 8px;
  height: 8px;
  box-sizing: border-box;
  margin: 0 4px;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  background: var(--bg);
}

.tl-label {
  fill: var(--text);
  font-size: 12px;
  font-weight: 500;
}

.tl-tall .tl-label { font-size: 13px; }

.tl-leader {
  fill: none;
  stroke: color-mix(in srgb, var(--muted) 35%, var(--bg));
  stroke-width: 1;
}

/* ── Events ──────────────────────────────────────── */

.tl-ev {
  cursor: pointer;
  outline: none;
}

.tl-hit { fill: transparent; }

.tl-ring {
  fill: none;
  stroke: var(--text);
  stroke-width: 1.5;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.tl-ev:hover .tl-ring,
.tl-ev:focus-visible .tl-ring,
.tl-ev.is-active .tl-ring { opacity: 1; }

.tl-ev.is-active .tl-leader {
  stroke: var(--muted);
}

/* ── Card ────────────────────────────────────────── */

.tl-card {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  box-sizing: border-box;
  width: 268px;
  max-width: 100%;
  padding: 10px 12px 11px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  line-height: 1.45;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.tl-card.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
}

.tl .tl-card p { margin: 0; }

.tl .tl-card-lane {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  line-height: 1.4;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tl .tl-card-name {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.tl .tl-card-date {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}

.tl .tl-card-why { margin-top: 6px; }

/* The lane key lines up with the first line of the lane name when it wraps. */
.tl .tl-card-lane .tl-key { margin-top: 0.62em; }

/* ── Caption ─────────────────────────────────────── */

.tl .tl-caption {
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  line-height: 1.55;
}

/* ── Preferences ─────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .tl-ring,
  .tl-card { transition: none; }
  .tl-card { transform: none; }
}

@media (forced-colors: active) {
  .tl-track,
  .tl-link,
  .tl-era-bar,
  .tl-axis,
  .tl-leader { stroke: CanvasText; }
  .tl-dot { fill: CanvasText; stroke: Canvas; }
  .tl-dot-suite { fill: Canvas; stroke: CanvasText; }
  .tl-legend .tl-k-suite .tl-key { border-color: CanvasText; }
  .tl-label,
  .tl-lane,
  .tl-era,
  .tl-tick,
  .tl-note { fill: CanvasText; }
  .tl-band { fill: Canvas; }
  .tl-ring { stroke: Highlight; }
  .tl-key { border-top-color: CanvasText; }
}

@media print {
  .tl-hint,
  .tl-card { display: none; }
}

/* Collapsible text version of the timeline, placed after the figure in the post. */
.tl-text { margin: 0 0 1.25em; }
