/* GR00T 2 blog: pretraining-data animation (#datamix). Colors and type come from the gr00t2.css tokens. */
.datamix {
  position: relative; aspect-ratio: 16 / 9; margin-top: 1.75rem; overflow: hidden;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.datamix[style*="height"] { aspect-ratio: auto; }          /* the script sets the height once it has measured */
@media (max-width: 600px) { .datamix { aspect-ratio: 3 / 4; } }
.datamix .dm-c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; transition: opacity .35s ease; }
.datamix .dm-c.dm-drag { cursor: grabbing; }
.datamix .dm-v { position: absolute; left: 0; bottom: 0; width: 2px; height: 2px; overflow: hidden; opacity: .01; pointer-events: none; }
.datamix .dm-v video { width: 2px; height: 2px; }

/* labels under the three clips / spheres (positioned by the script) */
.dm-label { position: absolute; left: 0; top: 0; opacity: 0; text-align: center; pointer-events: none; will-change: transform, opacity; }
.dm-t { font-size: 15px; font-weight: 500; line-height: 1.3; color: var(--head); }
.dm-x { display: grid; margin-top: 3px; }
.dm-x > div { grid-area: 1 / 1; transition: opacity .3s ease, transform .3s ease; }
.dm-s2 .dm-h { transition: opacity .5s ease .28s, transform .5s cubic-bezier(.2, .7, .2, 1) .28s; }
.dm-i { color: var(--text-2); font-size: 14px; line-height: 1.4; }
.dm-h { opacity: 0; transform: translateY(5px); }
.dm-s2 .dm-i { opacity: 0; transform: translateY(-5px); }
.dm-s2 .dm-h { opacity: 1; transform: none; }
.dm-s2 .dm-label[data-k="1"] .dm-i { transition-delay: .32s; }
.dm-s2 .dm-label[data-k="1"] .dm-h { transition-delay: .6s; }
.dm-s2 .dm-label[data-k="2"] .dm-i { transition-delay: .64s; }
.dm-s2 .dm-label[data-k="2"] .dm-h { transition-delay: .92s; }
.dm-h b { display: block; font-weight: 300; font-size: 28px; line-height: 1.1; letter-spacing: -.02em; color: #222; font-variant-numeric: tabular-nums; }
.dm-h b small, .dm-row > b small { font-size: .5em; font-weight: 400; letter-spacing: 0; color: var(--text-2); margin-left: 3px; }
.dm-n { display: block; margin-top: 3px; color: var(--text-2); font-size: 13px; line-height: 1.4; }

/* end state: legend beside (wide) or under (narrow) the merged sphere */
.dm-legend { position: absolute; left: 0; top: 0; opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.dm-end .dm-legend { opacity: 1; transform: none; pointer-events: auto; }
.dm-lt { font-size: 19px; font-weight: 500; line-height: 1.3; color: var(--head); margin-bottom: 12px; }
.dm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 14px;
  padding: 10px 2px; border-top: 1px solid var(--rule); cursor: default; transition: opacity .3s ease; }
.dm-row:last-child { border-bottom: 1px solid var(--rule); }
.dm-dt { font-size: 15px; line-height: 1.35; color: var(--text); }
.dm-row > b { font-weight: 300; font-size: 26px; line-height: 1.1; letter-spacing: -.02em; color: #222; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dm-sub { grid-column: 1 / -1; margin-top: 4px; color: var(--text-2); font-size: 13px; line-height: 1.45; }
.dm-hl .dm-row:not(.on) { opacity: .4; }
.dm-tight .dm-row { grid-template-columns: minmax(0, 1fr); padding: 8px 2px; }
.dm-tight .dm-row > b { font-size: 23px; margin-top: 2px; }
.dm-tight .dm-lt { font-size: 17px; }

.dm-replay { all: unset; position: absolute; left: 2px; bottom: 2px; padding: 6px 8px; border-radius: 6px; cursor: pointer;
  color: var(--text-2); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: 0; visibility: hidden;
  transition: opacity .4s, visibility .4s, color .2s; }
.dm-done .dm-replay { opacity: 1; visibility: visible; }
.dm-replay:hover { color: var(--green-ink); }
.dm-replay:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 1px; }
.dm-fade .dm-c, .dm-fade .dm-label, .dm-fade .dm-legend { opacity: 0 !important; transition: opacity .35s ease; }
.static .dm-replay { display: none; }

/* no WebGL: the legend alone carries the numbers */
.dm-nogl { aspect-ratio: auto; }
.dm-nogl .dm-c, .dm-nogl .dm-label { display: none; }
.dm-nogl .dm-legend { position: static; width: auto !important; max-width: 520px; margin: 1.25rem auto 0; opacity: 1; transform: none; }
.dm-fb { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.dm-nogl .dm-replay { display: none; }

.dm-narrow .dm-replay { left: auto; bottom: auto; right: 2px; top: 2px; }
.dm-narrow .dm-t { font-size: 13.5px; }
.dm-narrow .dm-i { font-size: 12.5px; }
.dm-narrow .dm-h b { font-size: 21px; }
.dm-narrow .dm-n { font-size: 12px; }
.dm-narrow .dm-lt { font-size: 17px; margin-bottom: 8px; text-align: center; }
.dm-narrow .dm-row { padding: 8px 2px; }
.dm-narrow .dm-dt { font-size: 14px; }
.dm-narrow .dm-row > b { font-size: 21px; }
.dm-narrow .dm-sub { font-size: 12px; }
