.data-motion {
  --dm-ink: #172144;
  --dm-muted: #46506b;
  --dm-line: #d7dce6;
  margin: 0;
  color: var(--dm-ink);
  font-size: 14px;
  overflow-wrap: anywhere;
  container: data-motion / inline-size;
}
.data-motion * { box-sizing: border-box; }
.data-motion p { margin: 0; line-height: 1.95; }
.data-motion .dm-intro { font-size: 15px; margin-bottom: 12px; }
.data-motion .dm-evidence { color: var(--dm-muted); font-size: 12px; margin-bottom: 18px; }
.dm-composition { display: grid; gap: 22px; }
.dm-stage { min-width: 0; padding: 20px 16px; background: #f3f5fa; border-radius: 14px; }
.data-motion .dm-unit { font-size: 12px; font-weight: 700; margin-bottom: 14px; }
.dm-difference { display: flex; flex-direction: column; margin-bottom: 24px; gap: 2px; }
.dm-difference > strong { font-size: clamp(32px, 4.4vw, 52px); font-weight: 800; line-height: 1.45; font-variant-numeric: tabular-nums; }
.dm-difference > strong > span { font-size: .5em; font-weight: 700; }
.dm-difference > span { color: var(--dm-muted); font-size: 12px; }
.dm-records { display: grid; gap: 10px; }
.data-motion .dm-record { display: block; width: 100%; min-width: 0; min-height: 48px; padding: 11px 10px; border: 1px solid #6b7490; border-radius: 7px; background: white; color: var(--dm-ink); text-align: start; font: inherit; cursor: pointer; }
.dm-record-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; line-height: 1.65; }
.dm-record-heading > span { min-width: 0; }
.dm-record-heading strong { flex-shrink: 0; font-size: 16px; font-weight: 750; font-variant-numeric: tabular-nums; }
.dm-record-heading small { display: block; font-size: 12px; color: var(--dm-muted); }
.dm-track { direction: ltr; display: block; height: 25px; margin-top: 10px; border-inline-start: 1px solid #6b7490; background: #e5e9f1; border-radius: 0 4px 4px 0; }
.dm-track i { display: block; height: 100%; min-width: 1px; background: #1c0998; transform-origin: left center; border-radius: 0 4px 4px 0; }
.dm-record:nth-child(2) .dm-track i { background: #172144; }
.data-motion .dm-record[aria-pressed=true] { border-color: #172144; box-shadow: inset 0 -3px #ccff00; }
.data-motion .dm-record:hover { background: #f7f8fc; border-color: #1c0998; }
.data-motion .dm-record:active { background: #edf0f7; }
.dm-detail { min-width: 0; min-height: 155px; padding: 0 3px; }
.dm-detail-label { font-size: 12px; color: var(--dm-muted); }
.data-motion .dm-detail h3 { font-size: 18px; line-height: 1.7; color: var(--dm-ink); margin: 6px 0 12px; }
.dm-selected-value { display: block; font-size: clamp(23px, 3.1vw, 34px); font-weight: 800; line-height: 1.5; font-variant-numeric: tabular-nums; margin-bottom: 12px; }
.data-motion .dm-detail p { font-size: 13px; color: var(--dm-muted); }
.dm-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 20px; border-top: 1px solid var(--dm-line); margin-top: 18px; padding-top: 18px; }
.data-motion .dm-controls button { flex-shrink: 0; min-height: 44px; padding: 10px 18px; border: 1px solid #172144; border-radius: 8px; background: white; color: #000; font: inherit; font-weight: 700; cursor: pointer; }
.data-motion .dm-controls button:hover { background: #e9edfa; }
.data-motion .dm-controls button:active { transform: translateY(1px); background: #dce2f5; }
.data-motion .dm-controls button:disabled { border-color: #6b7490; background: #e8ebf1; color: #46506b; cursor: not-allowed; transform: none; }
.data-motion .dm-controls .dm-replay { display: inline-grid; place-items: center; width: 44px; min-width: 44px; height: 44px; padding: 0; border-radius: 50%; }
.dm-replay svg { display: block; }
.dm-replay svg[hidden] { display: none; }
.dm--objects .dm-composition { grid-template-columns: minmax(0, 1fr); }
.dm-object-scene { min-width: 0; margin: 14px 0 20px; }
.data-motion .dm-object-key { display: flex; align-items: center; gap: 9px; color: #172144; font-size: 13px; font-weight: 700; }
.dm-object-key > span { width: 10px; height: 10px; background: #1c0998; transform: rotate(30deg) skewY(-12deg); border: 1px solid #172144; }
.dm-object-plot { display: block; width: 100%; height: auto; overflow: visible; }
.dm-object-tray { fill: #f0f2f8; stroke: #b3bdd0; stroke-width: 1; }
.dm-object-connection { fill: none; stroke: #687591; stroke-width: 1.3; stroke-dasharray: 3 5; }
.dm-object-shadow { fill: #172144; opacity: .12; }
.dm-object-front { fill: #2b217c; }
.dm-object-side { fill: #1c0998; }
.dm-object-top { fill: #5948c5; stroke: #25177d; stroke-width: .35; }
.dm-object--retained .dm-object-top { fill: #ccff00; stroke: #172144; stroke-width: .8; }
.dm-object--retained .dm-object-front { fill: #879931; }
.dm-object--retained .dm-object-side { fill: #a8bc25; }
.dm-object-pool-labels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; text-align: center; font-size: 13px; font-weight: 650; color: #172144; margin: 7px 0 20px; }
.dm-object-pool-labels[hidden] { display: none; }
.dm-object-stacked-labels { font: 600 20px Vazirmatn, sans-serif; fill: #172144; text-anchor: middle; }
.data-motion .dm-object-phase { color: #172144; font-size: 13px; font-weight: 650; min-height: 3.8em; margin: 0; }
.dm-object-numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; gap: 12px; padding: 15px 0; border-top: 1px solid #c3cbda; border-bottom: 1px solid #c3cbda; }
.dm-object-numbers > div { min-width: 0; }
.dm-object-numbers dt { color: #46506b; font-size: 12px; }
.dm-object-numbers dd { margin: 4px 0 0; font-size: clamp(22px, 4.8cqi, 36px); color: #172144; font-weight: 800; font-variant-numeric: tabular-nums; }
.dm-object-numbers small { display: block; font-size: 12px; font-weight: 500; }
.data-motion .dm-object-note { color: #46506b; font-size: 12px; margin-top: 14px; }
.dm--objects .dm-records { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dm--objects .dm-track { display: none; }
.dm--objects .dm-record-heading { flex-wrap: wrap; gap: 4px 12px; }
.dm--objects .dm-record-heading > span { flex: 1 1 130px; }
.dm--objects .dm-detail { min-height: 0; border-inline-start: 3px solid #1c0998; padding-inline-start: 16px; }
.dm--objects .dm-selected-value { font-size: 24px; margin-bottom: 4px; }
@container data-motion (max-width: 380px) {
  .dm--objects .dm-records { grid-template-columns: minmax(0, 1fr); }
  .dm-object-numbers { gap: 7px; }
  .dm-object-numbers dt { font-size: 11px; }
  .dm-object-pool-labels { font-size: 12px; gap: 7px; }
}
.dm-auto { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--dm-muted); font-size: 12px; cursor: pointer; }
.dm-auto input { width: 18px; height: 18px; accent-color: #1c0998; cursor: pointer; }
.dm-auto:has(input:disabled), .dm-auto input:disabled { cursor: not-allowed; }
.dm-controls label { display: grid; flex: 1 1 170px; gap: 4px; color: var(--dm-muted); font-size: 12px; cursor: pointer; }
.dm-controls input { width: 100%; min-height: 44px; margin: 0; direction: ltr; accent-color: #1c0998; cursor: pointer; }
.data-motion :is(button, a, input):focus-visible { outline: 3px solid #1c0998; outline-offset: 4px; }
.data-motion .dm-playback-note { font-size: 11px; color: var(--dm-muted); margin-top: 8px; }
.data-motion .dm-state { min-height: 3.9em; padding: 8px 0; color: var(--dm-muted); font-size: 12px; }
.dm-footnote { padding-top: 16px; border-top: 1px solid var(--dm-line); }
.data-motion .dm-footnote p { font-size: 12px; color: var(--dm-muted); }
.dm-source-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; }
.data-motion .dm-source-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; cursor: pointer; }
.dm-log-key { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.dm-log-key strong { font-size: 38px; font-weight: 800; line-height: 1.2; }
.dm-log-key span { font-size: 12px; color: var(--dm-muted); }
.dm-axis { position: relative; height: 32px; margin: 0 10px; color: var(--dm-muted); font-size: 11px; }
.dm-axis span { position: absolute; left: var(--at); width: max-content; white-space: nowrap; overflow-wrap: normal; transform: translateX(-50%); }
.dm-axis span:first-child { transform: none; }
.dm-axis span:last-child { transform: translateX(-100%); }
.dm-axis span::after { content: ''; display: block; height: 9px; width: 1px; margin: 4px auto 0; background: #6b7490; }
.dm--magnitude .dm-track { height: 9px; border-radius: 0; }
.dm--magnitude .dm-track i { border-radius: 0; background: #1c0998; }
.dm--magnitude .dm-record { padding: 8px 10px; }
.dm--magnitude .dm-record-heading strong { font-size: 13px; }
.dm--magnitude .dm-records { gap: 7px; }
.dm-route { display: block; width: 100%; height: auto; overflow: visible; }
html[dir=rtl] .dm-route { transform: scaleX(-1); }
.dm-route-rail { fill: none; stroke: #919bb3; stroke-width: 2; stroke-dasharray: 4 6; }
.dm-route-travel { fill: none; stroke: #1c0998; stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 0; }
.dm-route [data-dm-node] circle { fill: #fff; stroke: #6b7490; stroke-width: 2; }
.dm-route [data-dm-node] rect { fill: #172144; }
.dm-route [data-dm-node].is-current circle { fill: #ccff00; stroke: #172144; stroke-width: 3; }
.dm-route [data-dm-parcel] rect { fill: #fff; stroke: #172144; stroke-width: 2; }
.dm-route [data-dm-parcel] path { fill: none; stroke: #1c0998; stroke-width: 3; stroke-linecap: round; }
.dm-route [data-dm-parcel] circle { fill: #1c0998; }
.dm--handoff .dm-records { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dm--handoff .dm-record { text-align: center; }
.dm--handoff .dm-record-heading { justify-content: center; }
.dm-detail dl { margin: 0; }
.dm-detail dl > div + div { margin-top: 14px; }
.dm-detail dt { color: var(--dm-muted); font-size: 12px; }
.dm-detail dd { margin: 4px 0 0; font-size: 14px; line-height: 1.9; font-weight: 650; }
.data-motion .dm-check { border-inline-start: 3px solid #1c0998; margin-top: 20px; padding-inline-start: 12px; }
.dm-check strong, .dm-check span { display: block; }
.dm-check strong { color: var(--dm-ink); margin-bottom: 6px; }
@container data-motion (min-width: 620px) {
  .dm-composition { grid-template-columns: minmax(0, 1.5fr) minmax(160px, 1fr); align-items: start; }
  .dm-detail { border-inline-start: 1px solid var(--dm-line); padding-inline-start: 18px; position: sticky; top: 120px; }
  .dm-stage { padding: 24px 20px; }
  .dm--handoff .dm-composition { grid-template-columns: 1fr; }
  .dm--handoff .dm-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; border: 0; padding: 0; min-height: 205px; position: static; }
  .dm--handoff .dm-detail-label, .dm--handoff .dm-detail h3 { grid-column: 1 / -1; }
  .dm--handoff .dm-check { margin-top: 0; }
  .dm--handoff .dm-records { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .data-motion *, .data-motion *::before, .data-motion *::after { animation: none !important; transition: none !important; }
}
