/* Splitting experts between CPU and GPU: loaded only on its Learn page, after style.css. */
.hed-routing { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hed-routing .label { margin: 0 4px 0 0; }
.chip.hed-field { font-size: 12px; color: var(--soft); transition: border-color .3s, color .3s; }
.chip.hed-field.lit { border-color: var(--fg); color: var(--fg); }
.hed-sep { flex: 1 1 8px; }
.chip.hed-impl { font-size: 12px; color: var(--quiet); transition: border-color .3s, color .3s, box-shadow .3s; }
.chip.hed-impl.ok { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 3px var(--glow-red); }
.hed-eq { font: 600 13px var(--mono); color: var(--quiet); }

.hed-routes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; min-height: 46px; }
.hed-routes .label { margin: 0; }
.hed-tok { display: inline-flex; align-items: center; gap: 6px; }
.hed-t { font: 11px var(--mono); color: var(--quiet); }
.chip.hed-route { display: inline-grid; gap: 1px; padding: 3px 8px; font-size: 12px; opacity: 0; transform: translateY(-6px); transition: opacity .35s, transform .35s, border-color .3s, color .3s, background .3s; }
.chip.hed-route.in { opacity: 1; transform: none; }
.hed-rt b { font-weight: 600; }
.hed-src { min-height: 13px; font: 10px/13px var(--mono); color: var(--quiet); }
.chip.hed-route.hit { border-color: var(--red); }
.chip.hed-route.hit b { color: var(--red); }
.chip.hed-route.miss { border-style: dashed; border-color: var(--purple); }
.chip.hed-route.miss b { color: var(--purple); }
.chip.hed-route.cpu .hed-src { color: var(--fg); }
.chip.hed-route.gpu .hed-src { color: var(--soft); }
.chip.hed-route.done { border-style: solid; border-color: var(--red); background: var(--glow-red); }

.hed-lanes { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: stretch; }
.hed-box { display: grid; align-content: start; gap: 4px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); }
.hed-box .label { margin: 0; }
.hed-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 29px; }
.hed-k { width: 58px; font: 10.5px var(--mono); color: var(--quiet); }
.chip.hed-res { transition: border-color .3s, color .3s, box-shadow .3s; }
.chip.hed-res.pin { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 3px var(--glow-red); }
.chip.hed-slot { min-width: 3.3em; border-style: dashed; color: var(--quiet); transition: border-color .3s, color .3s; }
.chip.hed-slot.filled { border-style: solid; border-color: var(--purple); color: var(--purple); }
.hed-work { display: inline-flex; gap: 6px; min-height: 26px; }
.chip.hed-job { border-color: var(--soft); transition: border-color .3s, color .3s, background .3s; }
.chip.hed-job.done { border-color: var(--red); color: var(--red); background: var(--glow-red); }
.hed-note { font: 10.5px var(--mono); color: var(--quiet); }
.hed-link { align-self: center; padding: 2px 10px; border: 1px dashed var(--border-strong); border-radius: 999px; font: 11px var(--mono); color: var(--quiet); transition: color .2s, border-color .2s; }
.hed-link.busy { color: var(--purple); border-color: var(--purple); }
.hed-ghost { position: absolute; z-index: 2; transform: translate(0, -50%); border-color: var(--purple); color: var(--purple); background: var(--surface); pointer-events: none; transition: transform .75s cubic-bezier(.3, .7, .2, 1); }

.hed-chart { display: grid; gap: 4px; }
.hed-chead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.hed-chead .label { margin: 0 0 2px; }
.hed-legend { display: inline-flex; align-items: center; gap: 5px; font: 10.5px var(--mono); color: var(--quiet); }
.hed-sw { display: inline-block; width: 12px; height: 7px; border-radius: 2px; }
.hed-sw.up, .hed-sw.gpu { margin-left: 8px; }
.hed-row { display: grid; grid-template-columns: 82px minmax(0, 1fr) 66px; gap: 10px; align-items: center; height: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: 8px; opacity: .3; transition: opacity .3s, border-color .3s, background .3s; }
.hed-row.on { opacity: 1; }
.hed-row.best { border-color: var(--red); background: var(--glow-red); }
.hed-set { font: 11.5px var(--mono); color: var(--fg); white-space: nowrap; }
.hed-set:empty::before { content: '–'; color: var(--quiet); }
.hed-bars { display: grid; gap: 3px; }
.hed-track { display: flex; height: 7px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.hed-fill { display: block; height: 100%; width: 0; transition: width .6s cubic-bezier(.3, .7, .2, 1); }
.hed-fill.cpu, .hed-sw.cpu { background: var(--soft); }
.hed-fill.up, .hed-sw.up { background: var(--purple); }
.hed-fill.gpu, .hed-sw.gpu { background: var(--quiet); }
.hed-est { font: 12px var(--mono); color: var(--soft); text-align: right; font-variant-numeric: tabular-nums; }
.hed-row.best .hed-est { color: var(--red); font-weight: 600; }

@media (max-width: 600px) {
  .hed-routes { min-height: 112px; align-content: flex-start; gap: 8px 12px; }
  .hed-routes .label { flex-basis: 100%; }
  .chip.hed-route { padding: 3px 6px; font-size: 11.5px; }
  .hed-lanes { gap: 6px; }
  .hed-box { padding: 8px; }
  .hed-k { width: 100%; }
  .hed-line { gap: 4px; min-height: 0; }
  .hed-box .chip { padding: 2px 6px; font-size: 12px; }
  .hed-link { padding: 2px 5px; font-size: 10px; }
  .hed-row { grid-template-columns: 66px minmax(0, 1fr) 54px; gap: 6px; padding: 0 6px; }
  .hed-set { font-size: 10.5px; }
  .hed-est { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .chip.hed-route, .hed-fill, .hed-ghost, .hed-row, .chip.hed-res, .chip.hed-slot, .chip.hed-job { transition: none; }
}
