/* ============================================================
   XTCoach HQ — Product emulations
   Stylized, in-motion recreations of the product. Not literal
   screenshots: same visual family (golden hour, one green),
   simplified chrome, animated with pure CSS on a shared loop.

   Every .emu is one "clip". All elements in a clip animate on
   the same duration (--loop) so the loop stays in sync.

   Vocabulary (reused across clips, and later by the hero):
   - .pop      element that pops in at a moment in the timeline
   - .swap     two stacked spans; the second replaces the first
   - .ghost    row waiting to be activated (carried forward etc.)
   - .digits   stacked numbers that tick as the clip progresses
   - .emu-tap  the finger indicator on phone clips
   - .emu-cursor  the pointer on desktop clips
   ============================================================ */

/* ---------- Shared clip shell ---------- */
.emu {
  /* One knob for every clip's pace — keyframes are all %-based */
  --loop: 7.5s;
  position: relative;
  background: var(--mist);
  border-radius: var(--r-card);
  padding: 14px;
  overflow: hidden;
}

/* Clips are paused until scrolled into view (JS toggles .playing).
   !important: every clip sets the `animation` shorthand on more
   specific selectors, which resets play-state back to running —
   without it this gate loses the cascade and clips run from load. */
.emu *,
.emu *::before,
.emu *::after { animation-play-state: paused !important; }
.emu.playing *,
.emu.playing *::before,
.emu.playing *::after { animation-play-state: running !important; }

/* ---------- Stylized phone (cropped, light HQ theme) ---------- */
.emu-phone {
  width: min(320px, 82%);
  margin: 28px auto -80px;
  background: linear-gradient(160deg, #4c4f55 0%, #26282c 30%, #3a3d43 70%, #1d1f22 100%);
  border-radius: 44px;
  padding: 4px;
  box-shadow: inset 0 0 2px rgba(255, 255, 255, 0.55);
}

.emu-phone-screen {
  background: var(--paper);
  border: 5px solid #000;
  border-radius: 40px;
  padding: 20px 14px 40px;
  min-height: 480px;
}

/* ---------- Stylized desktop window ---------- */
.emu-window {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  overflow: hidden;
  margin: 6px 2px;
}

.emu-winbar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--hairline);
}

.emu-winbar .wd {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mist);
  border: 1px solid var(--hairline);
}

.emu-winbar .win-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emu-win-body {
  position: relative;
  padding: 18px 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.emu-win-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.emu-win-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.emu-win-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 3px;
}

.emu-btn {
  flex: none;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--ink);
  padding: 8px 13px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}

.emu-btn.b-early { animation: emu-btnp-early var(--loop) infinite; }
.emu-btn.b-late  { animation: emu-btnp-late var(--loop) infinite; }

@keyframes emu-btnp-early { 0%, 10.9% { transform: scale(1); } 11.7% { transform: scale(0.93); } 13%, 100% { transform: scale(1); } }
@keyframes emu-btnp-late  { 0%, 50.9% { transform: scale(1); } 51.7% { transform: scale(0.93); } 53%, 100% { transform: scale(1); } }

/* ---------- Pointer cursor (desktop clips) ---------- */
.emu-cursor {
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 20px;
  z-index: 6;
  opacity: 0;
  pointer-events: none;
  transform-origin: 3px 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l16 9.5-7.2 1.2L9 20z' fill='%230e100a' stroke='%23ffffff' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat center / contain;
}

.emu-cursor.early { animation: emu-cursor-early var(--loop) infinite; }
.emu-cursor.late  { animation: emu-cursor-late var(--loop) infinite; }

@keyframes emu-cursor-early {
  0%, 2% { opacity: 0; transform: translate(-150px, 230px); }
  5% { opacity: 1; }
  10% { transform: translate(-72px, 24px) scale(1); }
  11.7% { transform: translate(-72px, 24px) scale(0.8); }
  13% { transform: translate(-72px, 24px) scale(1); }
  18%, 100% { opacity: 0; transform: translate(-72px, 24px); }
}

@keyframes emu-cursor-late {
  0%, 40% { opacity: 0; transform: translate(-160px, 210px); }
  44% { opacity: 1; }
  50% { transform: translate(-64px, 24px) scale(1); }
  51.7% { transform: translate(-64px, 24px) scale(0.8); }
  53% { transform: translate(-64px, 24px) scale(1); }
  58%, 100% { opacity: 0; transform: translate(-64px, 24px); }
}

/* ---------- Shared atoms ---------- */
.emu-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 4px 14px;
}

.emu-title {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.15;
}

.emu-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 4px;
}

.emu-counter {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 4px;
  background: var(--brand-100);
  border-radius: var(--r-pill);
  padding: 5px 11px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--brand-800);
}

.emu-counter .digits {
  position: relative;
  width: 2ch;
  height: 1.35em;
  font-weight: 700;
}

.emu-counter .digits span {
  position: absolute;
  inset: 0;
  text-align: right;
  opacity: 0;
}

.emu-rows {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.emu-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 13px;
  overflow: hidden;
}

.emu-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brand-100);
  opacity: 0;
}

.emu-avatar {
  position: relative;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--mist);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emu-name {
  position: relative;
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emu-meta {
  position: relative;
  flex: none;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Kit type + size — the two things that matter at uniform handout */
.emu-kit {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.emu-kit b {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text);
  background: var(--mist);
  border: 1px solid var(--hairline);
  border-radius: 7px;
  padding: 2px 7px;
}

.emu-check {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--hairline);
  background: #fff;
}

.emu-check::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: 50%;
  background-color: var(--brand-600);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(0);
  opacity: 0;
}

.emu-pill {
  position: relative;
  flex: none;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: var(--mist);
  border-radius: var(--r-pill);
  padding: 4px 9px;
}

.emu-flag {
  position: relative;
  flex: none;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink-2);
  border-radius: var(--r-pill);
  padding: 4px 9px;
  transform: scale(0);
  opacity: 0;
}

.emu-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-soft);
  background: var(--mist);
  border-radius: var(--r-pill);
  padding: 5px 10px;
  white-space: nowrap;
}

.emu-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-800);
  background: var(--brand-100);
  border-radius: var(--r-pill);
  padding: 6px 12px;
}

.emu-badge::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand-600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 7px no-repeat;
}

/* Pop base — hidden until its moment */
.pop { opacity: 0; transform: scale(0.6); }

/* Swap base — first span shows, second replaces it */
.swap { position: relative; display: inline-flex; }
.swap > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.swap > span:last-child {
  position: absolute;
  inset: 0;
  justify-content: center;
  opacity: 0;
}

/* Toast — the payoff line that rises over the clip's edge */
.emu-toast {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  border-radius: 14px;
  padding: 11px 13px;
  transform: translateY(16px);
  opacity: 0;
  z-index: 3;
  animation: emu-toast-in var(--loop) infinite;
}

.emu-toast.t-late { animation-name: emu-toast-late; }

.emu-toast .emu-toast-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
}

.emu-toast p {
  font-size: 11.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
}

.emu-toast p strong { color: #fff; }

@keyframes emu-toast-in {
  0%, 60% { transform: translateY(16px); opacity: 0; }
  64%, 92% { transform: translateY(0); opacity: 1; }
  96%, 100% { transform: translateY(16px); opacity: 0; }
}

@keyframes emu-toast-late {
  0%, 70% { transform: translateY(16px); opacity: 0; }
  74%, 92% { transform: translateY(0); opacity: 1; }
  96%, 100% { transform: translateY(16px); opacity: 0; }
}

/* ============================================================
   Generic timeline keyframes
   emu-pNN pops an element in at NN% of the loop (out at 96%).
   emu-swA/B-NN crossfades a .swap at NN%.
   emu-gact-NN wakes a .ghost row at NN%.
   ============================================================ */

@keyframes emu-p14 { 0%, 14% { opacity: 0; transform: scale(0.6); } 15.4% { opacity: 1; transform: scale(1.08); } 16.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p20 { 0%, 20% { opacity: 0; transform: scale(0.6); } 21.4% { opacity: 1; transform: scale(1.08); } 22.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p24 { 0%, 24% { opacity: 0; transform: scale(0.6); } 25.4% { opacity: 1; transform: scale(1.08); } 26.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p27 { 0%, 27% { opacity: 0; transform: scale(0.6); } 28.4% { opacity: 1; transform: scale(1.08); } 29.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p29 { 0%, 29% { opacity: 0; transform: scale(0.6); } 30.4% { opacity: 1; transform: scale(1.08); } 31.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p34 { 0%, 34% { opacity: 0; transform: scale(0.6); } 35.4% { opacity: 1; transform: scale(1.08); } 36.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p38 { 0%, 38% { opacity: 0; transform: scale(0.6); } 39.4% { opacity: 1; transform: scale(1.08); } 40.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p42 { 0%, 42% { opacity: 0; transform: scale(0.6); } 43.4% { opacity: 1; transform: scale(1.08); } 44.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p47 { 0%, 47% { opacity: 0; transform: scale(0.6); } 48.4% { opacity: 1; transform: scale(1.08); } 49.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p48 { 0%, 48% { opacity: 0; transform: scale(0.6); } 49.4% { opacity: 1; transform: scale(1.08); } 50.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p50 { 0%, 50% { opacity: 0; transform: scale(0.6); } 51.4% { opacity: 1; transform: scale(1.08); } 52.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p52 { 0%, 52% { opacity: 0; transform: scale(0.6); } 53.4% { opacity: 1; transform: scale(1.08); } 54.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p56 { 0%, 56% { opacity: 0; transform: scale(0.6); } 57.4% { opacity: 1; transform: scale(1.08); } 58.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p58 { 0%, 58% { opacity: 0; transform: scale(0.6); } 59.4% { opacity: 1; transform: scale(1.08); } 60.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p61 { 0%, 61% { opacity: 0; transform: scale(0.6); } 62.4% { opacity: 1; transform: scale(1.08); } 63.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p62 { 0%, 62% { opacity: 0; transform: scale(0.6); } 63.4% { opacity: 1; transform: scale(1.08); } 64.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p64 { 0%, 64% { opacity: 0; transform: scale(0.6); } 65.4% { opacity: 1; transform: scale(1.08); } 66.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p67 { 0%, 67% { opacity: 0; transform: scale(0.6); } 68.4% { opacity: 1; transform: scale(1.08); } 69.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p68 { 0%, 68% { opacity: 0; transform: scale(0.6); } 69.4% { opacity: 1; transform: scale(1.08); } 70.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p70 { 0%, 70% { opacity: 0; transform: scale(0.6); } 71.4% { opacity: 1; transform: scale(1.08); } 72.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p73 { 0%, 73% { opacity: 0; transform: scale(0.6); } 74.4% { opacity: 1; transform: scale(1.08); } 75.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p76 { 0%, 76% { opacity: 0; transform: scale(0.6); } 77.4% { opacity: 1; transform: scale(1.08); } 78.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }
@keyframes emu-p82 { 0%, 82% { opacity: 0; transform: scale(0.6); } 83.4% { opacity: 1; transform: scale(1.08); } 84.4%, 92% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(0.6); } }

@keyframes emu-swA-10 { 0%, 10% { opacity: 1; } 11%, 94% { opacity: 0; } 97%, 100% { opacity: 1; } }
@keyframes emu-swB-10 { 0%, 10% { opacity: 0; } 11%, 92% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes emu-swA-20 { 0%, 20% { opacity: 1; } 21%, 94% { opacity: 0; } 97%, 100% { opacity: 1; } }
@keyframes emu-swB-20 { 0%, 20% { opacity: 0; } 21%, 92% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes emu-swA-29 { 0%, 29% { opacity: 1; } 30%, 94% { opacity: 0; } 97%, 100% { opacity: 1; } }
@keyframes emu-swB-29 { 0%, 29% { opacity: 0; } 30%, 92% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes emu-swA-30 { 0%, 30% { opacity: 1; } 31%, 94% { opacity: 0; } 97%, 100% { opacity: 1; } }
@keyframes emu-swB-30 { 0%, 30% { opacity: 0; } 31%, 92% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes emu-swA-38 { 0%, 38% { opacity: 1; } 39%, 94% { opacity: 0; } 97%, 100% { opacity: 1; } }
@keyframes emu-swB-38 { 0%, 38% { opacity: 0; } 39%, 92% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes emu-swA-44 { 0%, 44% { opacity: 1; } 45%, 94% { opacity: 0; } 97%, 100% { opacity: 1; } }
@keyframes emu-swB-44 { 0%, 44% { opacity: 0; } 45%, 92% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes emu-swA-47 { 0%, 47% { opacity: 1; } 48%, 94% { opacity: 0; } 97%, 100% { opacity: 1; } }
@keyframes emu-swB-47 { 0%, 47% { opacity: 0; } 48%, 92% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes emu-swA-62 { 0%, 62% { opacity: 1; } 63%, 94% { opacity: 0; } 97%, 100% { opacity: 1; } }
@keyframes emu-swB-62 { 0%, 62% { opacity: 0; } 63%, 92% { opacity: 1; } 96%, 100% { opacity: 0; } }

@keyframes emu-gact-20 { 0%, 20% { opacity: 0.45; background: var(--mist); } 21.5%, 92% { opacity: 1; background: #fff; } 96%, 100% { opacity: 0.45; background: var(--mist); } }
@keyframes emu-gact-29 { 0%, 29% { opacity: 0.45; background: var(--mist); } 30.5%, 92% { opacity: 1; background: #fff; } 96%, 100% { opacity: 0.45; background: var(--mist); } }
@keyframes emu-gact-38 { 0%, 38% { opacity: 0.45; background: var(--mist); } 39.5%, 92% { opacity: 1; background: #fff; } 96%, 100% { opacity: 0.45; background: var(--mist); } }
@keyframes emu-gact-47 { 0%, 47% { opacity: 0.45; background: var(--mist); } 48.5%, 92% { opacity: 1; background: #fff; } 96%, 100% { opacity: 0.45; background: var(--mist); } }

/* ============================================================
   Clip: attendance check-in (Tuesday, phone)
   ============================================================ */

.emu-checkin .digits span:nth-child(1) { animation: emu-d1 var(--loop) infinite; }
.emu-checkin .digits span:nth-child(2) { animation: emu-d2 var(--loop) infinite; }
.emu-checkin .digits span:nth-child(3) { animation: emu-d3 var(--loop) infinite; }
.emu-checkin .digits span:nth-child(4) { animation: emu-d4 var(--loop) infinite; }
.emu-checkin .digits span:nth-child(5) { animation: emu-d5 var(--loop) infinite; }

@keyframes emu-d1 { 0%, 7.9% { opacity: 1; } 8%, 93.9% { opacity: 0; } 94%, 100% { opacity: 1; } }
@keyframes emu-d2 { 0%, 7.9% { opacity: 0; } 8%, 15.9% { opacity: 1; } 16%, 100% { opacity: 0; } }
@keyframes emu-d3 { 0%, 15.9% { opacity: 0; } 16%, 23.9% { opacity: 1; } 24%, 100% { opacity: 0; } }
@keyframes emu-d4 { 0%, 23.9% { opacity: 0; } 24%, 39.9% { opacity: 1; } 40%, 100% { opacity: 0; } }
@keyframes emu-d5 { 0%, 39.9% { opacity: 0; } 40%, 93.9% { opacity: 1; } 94%, 100% { opacity: 0; } }

.emu-checkin .emu-row.r1 .emu-check::after { animation: emu-pop-1 var(--loop) infinite; }
.emu-checkin .emu-row.r1::before            { animation: emu-tint-1 var(--loop) infinite; }
.emu-checkin .emu-row.r2 .emu-check::after { animation: emu-pop-2 var(--loop) infinite; }
.emu-checkin .emu-row.r2::before            { animation: emu-tint-2 var(--loop) infinite; }
.emu-checkin .emu-row.r3 .emu-check::after { animation: emu-pop-3 var(--loop) infinite; }
.emu-checkin .emu-row.r3::before            { animation: emu-tint-3 var(--loop) infinite; }
.emu-checkin .emu-row.r5 .emu-check::after { animation: emu-pop-5 var(--loop) infinite; }
.emu-checkin .emu-row.r5::before            { animation: emu-tint-5 var(--loop) infinite; }

@keyframes emu-pop-1 { 0%, 7.9% { transform: scale(0); opacity: 0; } 9.2% { transform: scale(1.18); opacity: 1; } 10.2%, 93% { transform: scale(1); opacity: 1; } 96%, 100% { transform: scale(0); opacity: 0; } }
@keyframes emu-tint-1 { 0%, 7.9% { opacity: 0; } 9.5%, 93% { opacity: 0.55; } 96%, 100% { opacity: 0; } }
@keyframes emu-pop-2 { 0%, 15.9% { transform: scale(0); opacity: 0; } 17.2% { transform: scale(1.18); opacity: 1; } 18.2%, 93% { transform: scale(1); opacity: 1; } 96%, 100% { transform: scale(0); opacity: 0; } }
@keyframes emu-tint-2 { 0%, 15.9% { opacity: 0; } 17.5%, 93% { opacity: 0.55; } 96%, 100% { opacity: 0; } }
@keyframes emu-pop-3 { 0%, 23.9% { transform: scale(0); opacity: 0; } 25.2% { transform: scale(1.18); opacity: 1; } 26.2%, 93% { transform: scale(1); opacity: 1; } 96%, 100% { transform: scale(0); opacity: 0; } }
@keyframes emu-tint-3 { 0%, 23.9% { opacity: 0; } 25.5%, 93% { opacity: 0.55; } 96%, 100% { opacity: 0; } }
@keyframes emu-pop-5 { 0%, 39.9% { transform: scale(0); opacity: 0; } 41.2% { transform: scale(1.18); opacity: 1; } 42.2%, 93% { transform: scale(1); opacity: 1; } 96%, 100% { transform: scale(0); opacity: 0; } }
@keyframes emu-tint-5 { 0%, 39.9% { opacity: 0; } 41.5%, 93% { opacity: 0.55; } 96%, 100% { opacity: 0; } }

.emu-checkin .emu-row.r4 .emu-pill { animation: emu-auto-pulse var(--loop) infinite; }

@keyframes emu-auto-pulse { 0%, 31% { transform: scale(1); } 33% { transform: scale(1.12); } 35%, 100% { transform: scale(1); } }

.emu-checkin .emu-flag { animation: emu-flag-pop var(--loop) infinite; }

@keyframes emu-flag-pop { 0%, 51.9% { transform: scale(0); opacity: 0; } 53.4% { transform: scale(1.15); opacity: 1; } 54.4%, 93% { transform: scale(1); opacity: 1; } 96%, 100% { transform: scale(0); opacity: 0; } }

/* Tap indicator (shared look, per-clip path) */
.emu-tap {
  position: absolute;
  right: 12px;
  top: 21px;
  width: 34px;
  height: 34px;
  margin-top: -17px;
  border-radius: 50%;
  background: rgba(14, 16, 10, 0.16);
  border: 1.5px solid rgba(14, 16, 10, 0.35);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
}

.emu-checkin .emu-tap { animation: emu-tap-path var(--loop) infinite; }

/* Row centers: 21 / 71 / 121 / 221 / 271 (42px rows + 8px gap) */
@keyframes emu-tap-path {
  0%, 3% { top: 21px; opacity: 0; transform: scale(1); }
  6% { opacity: 1; }
  7.9% { top: 21px; transform: scale(1); }
  8.6% { transform: scale(0.72); }
  9.3% { transform: scale(1); }
  12% { top: 21px; }
  15% { top: 71px; }
  16.6% { transform: scale(0.72); }
  17.3% { transform: scale(1); }
  20% { top: 71px; }
  23% { top: 121px; }
  24.6% { transform: scale(0.72); }
  25.3% { transform: scale(1); }
  28% { top: 121px; }
  36% { top: 221px; }
  40.6% { transform: scale(0.72); }
  41.3% { transform: scale(1); }
  44% { top: 221px; }
  48% { top: 271px; }
  52.6% { transform: scale(0.72); }
  53.3% { transform: scale(1); }
  58% { top: 271px; opacity: 1; }
  62%, 100% { top: 271px; opacity: 0; }
}

/* ============================================================
   Clip: roster carry-forward (Preseason, desktop)
   Click "Carry forward" → ghost rows wake, class years advance,
   history chips attach.
   ============================================================ */

.emu-roster .emu-rrow {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: 13px;
  background: #fff;
}

/* Two setup phases share the stage: roster first, then meets */
.emu-roster .emu-stage { position: relative; height: 252px; }

.emu-roster .emu-phase {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.emu-roster .ph1 { animation: emu-ros-ph1 var(--loop) infinite; }
.emu-roster .ph2 { opacity: 0; animation: emu-ros-ph2 var(--loop) infinite; }

@keyframes emu-ros-ph1 { 0%, 44% { opacity: 1; } 48%, 100% { opacity: 0; } }
@keyframes emu-ros-ph2 { 0%, 48% { opacity: 0; } 52%, 93% { opacity: 1; } 96%, 100% { opacity: 0; } }

/* Athletes are added one by one after the season is created */
.emu-roster .ra1 { animation: emu-p14 var(--loop) infinite; }
.emu-roster .ra2 { animation: emu-p20 var(--loop) infinite; }
.emu-roster .ra3 { animation: emu-p24 var(--loop) infinite; }
.emu-roster .ra4 { animation: emu-p27 var(--loop) infinite; }

/* Then the meets land the same way */
.emu-roster .mr1 { animation: emu-p56 var(--loop) infinite; }
.emu-roster .mr2 { animation: emu-p62 var(--loop) infinite; }
.emu-roster .mr3 { animation: emu-p68 var(--loop) infinite; }

.emu-date {
  flex: none;
  width: 52px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: var(--mist);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  padding: 3px 0;
}

/* The season label flips once "New season" is clicked */
.emu-win-sub.swap { display: flex; }
.emu-win-sub.swap > span:last-child { justify-content: flex-start; }
.emu-roster .emu-win-sub.swap > span:first-child { animation: emu-swA-14 var(--loop) infinite; }
.emu-roster .emu-win-sub.swap > span:last-child  { animation: emu-swB-14 var(--loop) infinite; }

@keyframes emu-swA-14 { 0%, 14% { opacity: 1; } 15%, 94% { opacity: 0; } 97%, 100% { opacity: 1; } }
@keyframes emu-swB-14 { 0%, 14% { opacity: 0; } 15%, 92% { opacity: 1; } 96%, 100% { opacity: 0; } }

.emu-year {
  flex: none;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  background: var(--mist);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  padding: 3px 8px;
}

.emu-hist {
  flex: none;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  color: var(--brand-800);
  background: var(--brand-100);
  border-radius: var(--r-pill);
  padding: 4px 8px;
}

/* ============================================================
   Clip: uniform checkout (First practice, phone)
   Taps flip kit status to OUT, a return checks back IN, stock
   count tracks, one athlete still has last year's kit.
   ============================================================ */

.emu-uniforms .digits span:nth-child(1) { animation: emu-ud1 var(--loop) infinite; }
.emu-uniforms .digits span:nth-child(2) { animation: emu-ud2 var(--loop) infinite; }
.emu-uniforms .digits span:nth-child(3) { animation: emu-ud3 var(--loop) infinite; }
.emu-uniforms .digits span:nth-child(4) { animation: emu-ud4 var(--loop) infinite; }
.emu-uniforms .digits span:nth-child(5) { animation: emu-ud5 var(--loop) infinite; }

@keyframes emu-ud1 { 0%, 9.9% { opacity: 1; } 10%, 93.9% { opacity: 0; } 94%, 100% { opacity: 1; } }
@keyframes emu-ud2 { 0%, 9.9% { opacity: 0; } 10%, 19.9% { opacity: 1; } 20%, 100% { opacity: 0; } }
@keyframes emu-ud3 { 0%, 19.9% { opacity: 0; } 20%, 29.9% { opacity: 1; } 30%, 100% { opacity: 0; } }
@keyframes emu-ud4 { 0%, 29.9% { opacity: 0; } 30%, 43.9% { opacity: 1; } 44%, 100% { opacity: 0; } }
@keyframes emu-ud5 { 0%, 43.9% { opacity: 0; } 44%, 93.9% { opacity: 1; } 94%, 100% { opacity: 0; } }

.emu-status {
  position: relative;
  flex: none;
  width: 48px;
  height: 21px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.emu-status span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  background: var(--mist);
  color: var(--text-faint);
}

.emu-status span:last-child { opacity: 0; background: var(--ink-2); color: var(--paper); }
.emu-status span.in { background: var(--brand-600); color: #fff; }

.emu-uniforms .u1 .emu-status span:first-child { animation: emu-swA-10 var(--loop) infinite; }
.emu-uniforms .u1 .emu-status span:last-child  { animation: emu-swB-10 var(--loop) infinite; }
.emu-uniforms .u2 .emu-status span:first-child { animation: emu-swA-20 var(--loop) infinite; }
.emu-uniforms .u2 .emu-status span:last-child  { animation: emu-swB-20 var(--loop) infinite; }
.emu-uniforms .u3 .emu-status span:first-child { animation: emu-swA-30 var(--loop) infinite; }
.emu-uniforms .u3 .emu-status span:last-child  { animation: emu-swB-30 var(--loop) infinite; }
.emu-uniforms .u4 .emu-status span:first-child { animation: emu-swA-44 var(--loop) infinite; }
.emu-uniforms .u4 .emu-status span:last-child  { animation: emu-swB-44 var(--loop) infinite; }

/* Return row tints green when the kit comes back */
.emu-uniforms .u4::before { animation: emu-tint-u4 var(--loop) infinite; }

@keyframes emu-tint-u4 { 0%, 43.9% { opacity: 0; } 45.5%, 93% { opacity: 0.55; } 96%, 100% { opacity: 0; } }

.emu-uniforms .emu-flag { animation: emu-p58 var(--loop) infinite; }

.emu-uniforms .emu-tap { animation: emu-tap-uni var(--loop) infinite; }

/* Row centers: 21 / 71 / 121 / 171 / 221 */
@keyframes emu-tap-uni {
  0%, 3% { top: 21px; opacity: 0; transform: scale(1); }
  6% { opacity: 1; }
  9.9% { top: 21px; transform: scale(1); }
  10.6% { transform: scale(0.72); }
  11.3% { transform: scale(1); }
  14% { top: 21px; }
  18% { top: 71px; }
  20.6% { transform: scale(0.72); }
  21.3% { transform: scale(1); }
  24% { top: 71px; }
  28% { top: 121px; }
  30.6% { transform: scale(0.72); }
  31.3% { transform: scale(1); }
  34% { top: 121px; }
  40% { top: 171px; }
  44.6% { transform: scale(0.72); }
  45.3% { transform: scale(1); }
  48% { top: 171px; }
  52% { top: 221px; }
  56.6% { transform: scale(0.72); }
  57.3% { transform: scale(1); }
  60% { top: 221px; opacity: 1; }
  64%, 100% { top: 221px; opacity: 0; }
}

/* ============================================================
   Clip: week planning (Sunday night, desktop)
   One workout types in, every group's paces fan out, the week
   grid fills, saved to the library.
   ============================================================ */

/* Day chips step through the week: Mon → Wed → Fri → Sat(meet).
   Each active day crossfades in that day's workouts per group. */
.emu-daychips {
  display: flex;
  gap: 6px;
}

.emu-daychips .dc {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  background: var(--mist);
  border-radius: var(--r-pill);
  padding: 6px 0;
}

.emu-daychips .dc1 { animation: emu-pl-c1 var(--loop) infinite; }
.emu-daychips .dc2 { animation: emu-pl-c2 var(--loop) infinite; }
.emu-daychips .dc3 { animation: emu-pl-c3 var(--loop) infinite; }
.emu-daychips .dc4 { animation: emu-pl-c4 var(--loop) infinite; }

@keyframes emu-pl-c1 { 0%, 22% { background: var(--ink); color: var(--paper); } 24%, 100% { background: var(--mist); color: var(--text-faint); } }
@keyframes emu-pl-c2 { 0%, 22% { background: var(--mist); color: var(--text-faint); } 24%, 46% { background: var(--ink); color: var(--paper); } 48%, 100% { background: var(--mist); color: var(--text-faint); } }
@keyframes emu-pl-c3 { 0%, 46% { background: var(--mist); color: var(--text-faint); } 48%, 70% { background: var(--ink); color: var(--paper); } 72%, 100% { background: var(--mist); color: var(--text-faint); } }
@keyframes emu-pl-c4 { 0%, 70% { background: var(--mist); color: var(--text-faint); } 72%, 94% { background: var(--ink); color: var(--paper); } 96%, 100% { background: var(--mist); color: var(--text-faint); } }

/* Stacked day panels, one visible at a time */
.emu-days {
  position: relative;
  height: 152px;
}

.emu-dayp {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
}

.emu-plan .dp1 { animation: emu-pl-p1 var(--loop) infinite; }
.emu-plan .dp2 { animation: emu-pl-p2 var(--loop) infinite; }
.emu-plan .dp3 { animation: emu-pl-p3 var(--loop) infinite; }
.emu-plan .dp4 { animation: emu-pl-p4 var(--loop) infinite; }

@keyframes emu-pl-p1 { 0%, 21% { opacity: 1; } 24%, 100% { opacity: 0; } }
@keyframes emu-pl-p2 { 0%, 24% { opacity: 0; } 27%, 45% { opacity: 1; } 48%, 100% { opacity: 0; } }
@keyframes emu-pl-p3 { 0%, 48% { opacity: 0; } 51%, 69% { opacity: 1; } 72%, 100% { opacity: 0; } }
@keyframes emu-pl-p4 { 0%, 72% { opacity: 0; } 75%, 93% { opacity: 1; } 96%, 100% { opacity: 0; } }

/* One group's workout for the day */
.emu-grow {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 13px;
}

.emu-glabel {
  flex: none;
  width: 58px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: var(--mist);
  border-radius: var(--r-pill);
  padding: 4px 0;
}

.emu-glabel.gl-dist { background: var(--brand-100); color: var(--brand-800); }
.emu-glabel.gl-mid  { background: var(--brand-300); color: var(--brand-900); }
.emu-glabel.gl-spr  { background: var(--ink-2); color: var(--paper); }
.emu-glabel.gl-thr  { background: var(--brand-500); color: #fff; }
.emu-glabel.gl-meet { background: var(--ink); color: var(--lime); }

.emu-gtext {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emu-gchip {
  flex: none;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--brand-800);
  background: var(--brand-100);
  border-radius: var(--r-pill);
  padding: 4px 8px;
}

.emu-grow.g-meet { background: var(--paper); border-color: var(--ink-2); }

/* Library badge lands after the Wednesday workout is written */
.emu-plan .emu-badge.bp { opacity: 0; transform: scale(0.6); animation: emu-p38 var(--loop) infinite; }

/* ============================================================
   Clip: meet entries (Wednesday, desktop)
   Load a template → events build and fill ranked by season
   best; an injured athlete auto-swaps to the alternate.
   ============================================================ */

.emu-progress {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.emu-progress .bar {
  flex: 1;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--mist);
  overflow: hidden;
}

.emu-progress .bar i {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--brand-500);
  width: 0;
  animation: emu-prog var(--loop) infinite;
}

@keyframes emu-prog {
  0%, 14% { width: 0; }
  30%, 92% { width: 100%; }
  96%, 100% { width: 0; }
}

.emu-progress .emu-progress-label {
  flex: none;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.emu-erow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.emu-erow .ev {
  flex: none;
  width: 52px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.emu-entries .e1 { animation: emu-p20 var(--loop) infinite; }
.emu-entries .e2 { animation: emu-p24 var(--loop) infinite; }
.emu-entries .e3 { animation: emu-p29 var(--loop) infinite; }

.emu-chipswap { padding: 0; background: none; }
.emu-chipswap > span {
  border-radius: var(--r-pill);
  padding: 5px 10px;
  background: var(--mist);
}
.emu-chipswap > span.inj { background: var(--ink-2); color: var(--paper); }
.emu-chipswap > span:last-child { background: var(--brand-100); color: var(--brand-800); }

.emu-entries .emu-chipswap > span:first-child { animation: emu-swA-62 var(--loop) infinite; }
.emu-entries .emu-chipswap > span:last-child  { animation: emu-swB-62 var(--loop) infinite; }

/* ============================================================
   Clip: results ripple (Saturday, desktop)
   Type one relay result, watch everything downstream update.
   ============================================================ */

/* Every event gets the same wrapper: a paper card with a mono
   event header and result lines inside */
.emu-event {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 13px;
  padding: 12px 14px;
}

.emu-event .emu-evhead { margin: 0; }

.emu-eline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.emu-eline .emu-name { flex: 1; }

.emu-field {
  display: inline-flex;
  align-items: center;
  min-width: 8.5ch;
  height: 30px;
  padding: 0 10px;
  border: 1.5px solid var(--brand-500);
  border-radius: 9px;
  background: #fff;
}

.emu-field span {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  width: 0;
  animation: emu-type-res var(--loop) infinite;
}

@keyframes emu-type-res {
  0% { width: 0; }
  8% { width: 0; animation-timing-function: steps(7, end); }
  24%, 92% { width: 7.5ch; }
  96%, 100% { width: 0; }
}

.emu-place {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-800);
  background: var(--brand-100);
  border-radius: var(--r-pill);
  padding: 5px 10px;
}

.emu-results .emu-place { animation: emu-p27 var(--loop) infinite; }

/* School record on the relay; PR on the miler */
.emu-results .fsr { color: var(--lime); animation: emu-p29 var(--loop) infinite; }
.emu-results .fpr { background: var(--brand-600); color: #fff; animation: emu-p64 var(--loop) infinite; }

.emu-evhead {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 4px 2px -4px;
}

.emu-results .ev2 { animation: emu-p38 var(--loop) infinite; }
.emu-results .m1 { animation: emu-p42 var(--loop) infinite; }
.emu-results .m2 { animation: emu-p47 var(--loop) infinite; }
.emu-results .m3 { animation: emu-p68 var(--loop) infinite; }

.emu-time {
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

/* Trend vs last performance — chartline up (faster) or down (slower) */
.emu-trend {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.emu-trend::before {
  content: "";
  width: 14px;
  height: 14px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.emu-trend.up { color: var(--brand-700); }
.emu-trend.up::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236fa024' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 16 9 10 13 13 21 5'/%3E%3Cpolyline points='15 5 21 5 21 11'/%3E%3C/svg%3E");
}

.emu-trend.down { color: var(--text-faint); }
.emu-trend.down::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a9e8e' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 8 9 14 13 11 21 19'/%3E%3Cpolyline points='15 19 21 19 21 13'/%3E%3C/svg%3E");
}

/* Elena's time types in after her row lands */
.emu-field.f2 { height: 26px; min-width: 8ch; padding: 0 8px; }
.emu-field.f2 span { font-size: 11px; animation-name: emu-type-res2; }

@keyframes emu-type-res2 {
  0% { width: 0; }
  50% { width: 0; animation-timing-function: steps(7, end); }
  62%, 92% { width: 7.5ch; }
  96%, 100% { width: 0; }
}

/* ============================================================
   Clip: senior night (Banquet week, desktop)
   A senior's season assembles itself, then the sheets print.
   ============================================================ */

/* Team accolades land first — 2×2 stat tiles */
.emu-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.emu-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 13px;
  padding: 10px 13px;
}

.emu-stat b {
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}

.emu-stat span {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.emu-banquet .t1 { animation: emu-p14 var(--loop) infinite; }
.emu-banquet .t2 { animation: emu-p20 var(--loop) infinite; }
.emu-banquet .t3 { animation: emu-p24 var(--loop) infinite; }
.emu-banquet .t4 { animation: emu-p27 var(--loop) infinite; }

/* Then a couple of notes per athlete */
.emu-banquet .emu-rrow {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 13px;
}

.emu-banquet .n1 { animation: emu-p34 var(--loop) infinite; }
.emu-banquet .n2 { animation: emu-p42 var(--loop) infinite; }

.emu-sheets { display: flex; gap: 10px; }

.emu-sheets i {
  display: block;
  width: 44px;
  height: 56px;
  border-radius: 6px;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0 10px,
      var(--hairline) 10px 12px
    ) content-box,
    #fff;
  border: 1px solid var(--hairline);
  padding: 9px 8px;
  opacity: 0;
  transform: scale(0.6);
}

.emu-banquet .s1 { animation: emu-p56 var(--loop) infinite; }
.emu-banquet .s2 { animation: emu-p62 var(--loop) infinite; }
.emu-banquet .s3 { animation: emu-p68 var(--loop) infinite; }

/* ============================================================
   Clip: program depth (Year over year, desktop)
   Seniors graduate out of the bars, a thin event gets flagged,
   the coach changes — the data doesn't.
   ============================================================ */

.emu-coach {
  flex: none;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: var(--mist);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  padding: 6px 11px;
}

.emu-depth .emu-coach.swap > span:first-child { animation: emu-swA-62 var(--loop) infinite; }
.emu-depth .emu-coach.swap > span:last-child  { animation: emu-swB-62 var(--loop) infinite; }

.emu-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 12px;
  padding: 6px 4px 0;
}

.emu-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  max-width: 88px;
}

.emu-bar .segs {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 3px;
  height: 118px;
}

.emu-bar .segs i { display: block; border-radius: 6px; }
.emu-bar .s-sr { background: var(--brand-700); }
.emu-bar .s-jr { background: var(--brand-500); }
.emu-bar .s-so { background: var(--brand-300); }
.emu-bar .s-fr { background: var(--brand-100); }

.emu-bar .bar-label {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Seniors graduate: SR segments collapse, one column per beat */
.emu-depth .bar1 .s-sr { height: 26px; animation: emu-g1 var(--loop) infinite; }
.emu-depth .bar2 .s-sr { height: 34px; animation: emu-g2 var(--loop) infinite; }
.emu-depth .bar3 .s-sr { height: 18px; animation: emu-g3 var(--loop) infinite; }
.emu-depth .bar4 .s-sr { height: 22px; animation: emu-g4 var(--loop) infinite; }

.emu-depth .bar1 .s-jr { height: 20px; }
.emu-depth .bar1 .s-so { height: 16px; }
.emu-depth .bar1 .s-fr { height: 14px; }
.emu-depth .bar2 .s-jr { height: 10px; }
.emu-depth .bar2 .s-so { height: 8px; }
.emu-depth .bar2 .s-fr { height: 10px; }
.emu-depth .bar3 .s-jr { height: 26px; }
.emu-depth .bar3 .s-so { height: 20px; }
.emu-depth .bar3 .s-fr { height: 16px; }
.emu-depth .bar4 .s-jr { height: 14px; }
.emu-depth .bar4 .s-so { height: 18px; }
.emu-depth .bar4 .s-fr { height: 12px; }

@keyframes emu-g1 { 0%, 30% { height: 26px; opacity: 1; } 33%, 92% { height: 0; opacity: 0; } 96%, 100% { height: 26px; opacity: 1; } }
@keyframes emu-g2 { 0%, 34% { height: 34px; opacity: 1; } 37%, 92% { height: 0; opacity: 0; } 96%, 100% { height: 34px; opacity: 1; } }
@keyframes emu-g3 { 0%, 38% { height: 18px; opacity: 1; } 41%, 92% { height: 0; opacity: 0; } 96%, 100% { height: 18px; opacity: 1; } }
@keyframes emu-g4 { 0%, 42% { height: 22px; opacity: 1; } 45%, 92% { height: 0; opacity: 0; } 96%, 100% { height: 22px; opacity: 1; } }

.emu-depth .emu-flag { align-self: center; margin-top: 2px; animation: emu-p52 var(--loop) infinite; }

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
  .emu-phone { width: min(320px, 94%); }
  .emu-title { font-size: 15px; white-space: nowrap; }
  .emu-sub { font-size: 9px; letter-spacing: 0.05em; white-space: nowrap; }
  .emu-pill,
  .emu-flag { font-size: 8px; letter-spacing: 0.04em; padding: 4px 7px; }
  .emu-win-body { padding: 14px 12px 20px; }
  .emu-chip { font-size: 9px; padding: 4px 8px; }
  .emu-hist { display: none; }
  .emu-erow .ev { width: 44px; }
}

/* ============================================================
   Ecosystem board — the product-section hero clip
   Three tiers of the coach's world, no captions — the motion
   carries the story:
     LEFT — the loose stack (Final Surge, TrainingPeaks,
       spreadsheets, PDFs, docs & notes). Each piece dissolves
       and an HQ INSIGHT card takes over its exact slot: the
       clutter is literally replaced by intelligence.
     CENTER — the brain: brand-green radiating XT core with two
       counter-rotating orbits of XTCoach components (Roster,
       Training, Attendance, Meets; Records, Uniforms, Schedule,
       Notes, Results) that light as the program comes online.
     RIGHT — Dragonfly, Athletic.net, MileSplit: quiet cards
       tagged "Source of truth". No sync or integration claims.
   One 8s loop (percent timeline):
     11–56%  orbs light one by one
     16–46%  the stack dissolves; insights replace each piece
     92–97%  reset
   ============================================================ */
.emu.emu-eco {
  --loop: 8s;
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(280px, 400px) minmax(190px, 260px);
  justify-content: center;
  column-gap: clamp(20px, 4vw, 64px);
  align-items: center;
  margin-top: 56px;
  padding: clamp(18px, 3vw, 36px);
  border-radius: var(--r-photo);
  min-height: 500px;
}

.eco-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---- The stack that becomes intelligence ---- */
.eco-slot { position: relative; }

.eco-chip {
  position: relative;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 9px 11px 10px;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  align-items: center;
}

.eco-chip .eco-chip-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.eco-chip em {
  grid-column: 2;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Muted, off-brand identities for the outside stack */
.eco-dot { width: 9px; height: 9px; border-radius: 3px; }
.eco-dot.d-fs  { background: #b0764a; }
.eco-dot.d-tp  { background: #4a8ab0; }
.eco-dot.d-sh  { background: #a09a5f; }
.eco-dot.d-pdf { background: #b05252; }
.eco-dot.d-doc { background: #6b7fae; }

.eco-chip.ec1 { animation: eco-gone-16 var(--loop) infinite; }
.eco-chip.ec2 { animation: eco-gone-24 var(--loop) infinite; }
.eco-chip.ec3 { animation: eco-gone-32 var(--loop) infinite; }
.eco-chip.ec4 { animation: eco-gone-40 var(--loop) infinite; }
.eco-chip.ec5 { animation: eco-gone-46 var(--loop) infinite; }

@keyframes eco-gone-16 { 0%, 16% { opacity: 1; transform: none; animation-timing-function: cubic-bezier(0.5, -0.2, 0.8, 0.6); } 21%, 92% { opacity: 0; transform: translate(-90px, 48px) rotate(-9deg); } 97%, 100% { opacity: 1; transform: none; } }
@keyframes eco-gone-24 { 0%, 24% { opacity: 1; transform: none; animation-timing-function: cubic-bezier(0.5, -0.2, 0.8, 0.6); } 29%, 92% { opacity: 0; transform: translate(-90px, 48px) rotate(-9deg); } 97%, 100% { opacity: 1; transform: none; } }
@keyframes eco-gone-32 { 0%, 32% { opacity: 1; transform: none; animation-timing-function: cubic-bezier(0.5, -0.2, 0.8, 0.6); } 37%, 92% { opacity: 0; transform: translate(-90px, 48px) rotate(-9deg); } 97%, 100% { opacity: 1; transform: none; } }
@keyframes eco-gone-40 { 0%, 40% { opacity: 1; transform: none; animation-timing-function: cubic-bezier(0.5, -0.2, 0.8, 0.6); } 45%, 92% { opacity: 0; transform: translate(-90px, 48px) rotate(-9deg); } 97%, 100% { opacity: 1; transform: none; } }
@keyframes eco-gone-46 { 0%, 46% { opacity: 1; transform: none; animation-timing-function: cubic-bezier(0.5, -0.2, 0.8, 0.6); } 51%, 92% { opacity: 0; transform: translate(-90px, 48px) rotate(-9deg); } 97%, 100% { opacity: 1; transform: none; } }

/* The insight that takes each slot over once its clutter is gone */
.eco-insight {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  border-radius: 12px;
  padding: 8px 11px;
  opacity: 0;
  transform: translateX(54px) scale(0.92);
}

.eco-insight p {
  font-size: 10.5px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.82);
}

.eco-insight p strong { color: #fff; }

.eco-ins-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
}

.eco-insight.in1 { animation: eco-ins-21 var(--loop) infinite; }
.eco-insight.in2 { animation: eco-ins-29 var(--loop) infinite; }
.eco-insight.in3 { animation: eco-ins-37 var(--loop) infinite; }
.eco-insight.in4 { animation: eco-ins-45 var(--loop) infinite; }
.eco-insight.in5 { animation: eco-ins-51 var(--loop) infinite; }

@keyframes eco-ins-21 { 0%, 21% { opacity: 0; transform: translateX(54px) scale(0.92); } 24.5%, 92% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: translateX(54px) scale(0.92); } }
@keyframes eco-ins-29 { 0%, 29% { opacity: 0; transform: translateX(54px) scale(0.92); } 32.5%, 92% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: translateX(54px) scale(0.92); } }
@keyframes eco-ins-37 { 0%, 37% { opacity: 0; transform: translateX(54px) scale(0.92); } 40.5%, 92% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: translateX(54px) scale(0.92); } }
@keyframes eco-ins-45 { 0%, 45% { opacity: 0; transform: translateX(54px) scale(0.92); } 48.5%, 92% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: translateX(54px) scale(0.92); } }
@keyframes eco-ins-51 { 0%, 51% { opacity: 0; transform: translateX(54px) scale(0.92); } 54.5%, 92% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: translateX(54px) scale(0.92); } }

/* ---- The brain: radiating green core + orbiting components ---- */
.eco-center { position: relative; }

.eco-brain {
  position: relative;
  width: min(390px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
}

/* A soft energy halo breathing behind the intelligence */
.eco-brain::before {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(126, 181, 44, 0.22) 0%, transparent 62%);
  filter: blur(26px);
  animation: eco-halo calc(var(--loop) / 2) ease-in-out infinite;
  pointer-events: none;
}

@keyframes eco-halo {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.eco-ring {
  position: absolute;
  border: 1.5px dashed #c9c6b4;
  border-radius: 50%;
}

.eco-ring.ring-out { inset: 5%; }
.eco-ring.ring-in { inset: 24%; }

/* Orbit = spinning layer; each orb is held at an angle, parked on
   the ring's edge, counter-spun, then un-rotated so its label
   stays upright while it travels */
.eco-orbit { position: absolute; }
.eco-orbit.orbit-in { inset: 24%; animation: eco-spin-rev calc(var(--loop) * 3.5) linear infinite; }
.eco-orbit.orbit-out { inset: 5%; animation: eco-spin calc(var(--loop) * 3.5) linear infinite; }

/* Each orb's park angle rides in on --a (set inline); the unrot
   layer cancels it so labels stay upright while traveling */
.eco-hold { position: absolute; inset: 0; display: block; transform: rotate(var(--a, 0deg)); }

.eco-pos {
  position: absolute;
  top: 0;
  left: 50%;
  display: block;
  transform: translate(-50%, -50%);
}

.eco-counter { display: block; }
.eco-orbit.orbit-in .eco-counter { animation: eco-spin calc(var(--loop) * 3.5) linear infinite; }
.eco-orbit.orbit-out .eco-counter { animation: eco-spin-rev calc(var(--loop) * 3.5) linear infinite; }

.eco-unrot { display: block; transform: rotate(calc(var(--a, 0deg) * -1)); }

@keyframes eco-spin { to { transform: rotate(360deg); } }
@keyframes eco-spin-rev { to { transform: rotate(-360deg); } }

/* The orbs: ghosts until their information arrives */
.eco-orb {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  padding: 8px 14px;
  white-space: nowrap;
}

.eco-orb.ob-roster     { animation: eco-lit-11 var(--loop) infinite; }
.eco-orb.ob-training   { animation: eco-lit-17 var(--loop) infinite; }
.eco-orb.ob-records    { animation: eco-lit-33 var(--loop) infinite; }
.eco-orb.ob-uniforms   { animation: eco-lit-35 var(--loop) infinite; }
.eco-orb.ob-schedule   { animation: eco-lit-41 var(--loop) infinite; }
.eco-orb.ob-notes      { animation: eco-lit-47 var(--loop) infinite; }
.eco-orb.ob-attendance { animation: eco-lit-49 var(--loop) infinite; }
.eco-orb.ob-meets      { animation: eco-lit-52 var(--loop) infinite; }
.eco-orb.ob-results    { animation: eco-lit-56 var(--loop) infinite; }

@keyframes eco-lit-11 {
  0%, 11% { background: #fff; color: var(--text-faint); border-color: var(--hairline); transform: scale(1); }
  12.4% { transform: scale(1.14); background: var(--ink); color: var(--paper); border-color: var(--ink); }
  13.4%, 92% { transform: scale(1); background: var(--ink); color: var(--paper); border-color: var(--ink); }
  97%, 100% { background: #fff; color: var(--text-faint); border-color: var(--hairline); transform: scale(1); }
}
@keyframes eco-lit-17 {
  0%, 17% { background: #fff; color: var(--text-faint); border-color: var(--hairline); transform: scale(1); }
  18.4% { transform: scale(1.14); background: var(--ink); color: var(--paper); border-color: var(--ink); }
  19.4%, 24.5% { transform: scale(1); background: var(--ink); color: var(--paper); border-color: var(--ink); }
  25.5% { transform: scale(1.14); background: var(--ink); color: var(--paper); border-color: var(--ink); }
  26.5%, 92% { transform: scale(1); background: var(--ink); color: var(--paper); border-color: var(--ink); }
  97%, 100% { background: #fff; color: var(--text-faint); border-color: var(--hairline); transform: scale(1); }
}
@keyframes eco-lit-33 {
  0%, 33% { background: #fff; color: var(--text-faint); border-color: var(--hairline); transform: scale(1); }
  34.4% { transform: scale(1.14); background: var(--ink); color: var(--paper); border-color: var(--ink); }
  35.4%, 92% { transform: scale(1); background: var(--ink); color: var(--paper); border-color: var(--ink); }
  97%, 100% { background: #fff; color: var(--text-faint); border-color: var(--hairline); transform: scale(1); }
}
@keyframes eco-lit-35 {
  0%, 35% { background: #fff; color: var(--text-faint); border-color: var(--hairline); transform: scale(1); }
  36.4% { transform: scale(1.14); background: var(--ink); color: var(--paper); border-color: var(--ink); }
  37.4%, 92% { transform: scale(1); background: var(--ink); color: var(--paper); border-color: var(--ink); }
  97%, 100% { background: #fff; color: var(--text-faint); border-color: var(--hairline); transform: scale(1); }
}
@keyframes eco-lit-41 {
  0%, 41% { background: #fff; color: var(--text-faint); border-color: var(--hairline); transform: scale(1); }
  42.4% { transform: scale(1.14); background: var(--ink); color: var(--paper); border-color: var(--ink); }
  43.4%, 92% { transform: scale(1); background: var(--ink); color: var(--paper); border-color: var(--ink); }
  97%, 100% { background: #fff; color: var(--text-faint); border-color: var(--hairline); transform: scale(1); }
}
@keyframes eco-lit-47 {
  0%, 47% { background: #fff; color: var(--text-faint); border-color: var(--hairline); transform: scale(1); }
  48.4% { transform: scale(1.14); background: var(--ink); color: var(--paper); border-color: var(--ink); }
  49.4%, 92% { transform: scale(1); background: var(--ink); color: var(--paper); border-color: var(--ink); }
  97%, 100% { background: #fff; color: var(--text-faint); border-color: var(--hairline); transform: scale(1); }
}
@keyframes eco-lit-49 {
  0%, 49% { background: #fff; color: var(--text-faint); border-color: var(--hairline); transform: scale(1); }
  50.4% { transform: scale(1.14); background: var(--ink); color: var(--paper); border-color: var(--ink); }
  51.4%, 92% { transform: scale(1); background: var(--ink); color: var(--paper); border-color: var(--ink); }
  97%, 100% { background: #fff; color: var(--text-faint); border-color: var(--hairline); transform: scale(1); }
}
@keyframes eco-lit-52 {
  0%, 52% { background: #fff; color: var(--text-faint); border-color: var(--hairline); transform: scale(1); }
  53.4% { transform: scale(1.14); background: var(--ink); color: var(--paper); border-color: var(--ink); }
  54.4%, 92% { transform: scale(1); background: var(--ink); color: var(--paper); border-color: var(--ink); }
  97%, 100% { background: #fff; color: var(--text-faint); border-color: var(--hairline); transform: scale(1); }
}
@keyframes eco-lit-56 {
  0%, 56% { background: #fff; color: var(--text-faint); border-color: var(--hairline); transform: scale(1); }
  57.4% { transform: scale(1.14); background: var(--ink); color: var(--paper); border-color: var(--ink); }
  58.4%, 92% { transform: scale(1); background: var(--ink); color: var(--paper); border-color: var(--ink); }
  97%, 100% { background: #fff; color: var(--text-faint); border-color: var(--hairline); transform: scale(1); }
}

/* The core: brand green, quietly breathing */
.eco-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 118px;
  height: 118px;
  margin: -59px 0 0 -59px;
  border-radius: 50%;
  background: var(--brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: eco-breathe calc(var(--loop) / 2) ease-in-out infinite;
}

.eco-core img { width: 56px; height: auto; }

@keyframes eco-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* ---- The sources of truth (no sync claims — they simply stay) ---- */
.eco-hub {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 13px 14px 14px;
  display: flex;
  flex-direction: column;
}

.eco-hub strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.eco-hub em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 3px;
}

.eco-hub-tag {
  align-self: flex-start;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: var(--mist);
  border-radius: var(--r-pill);
  padding: 5px 10px;
}

/* ---- Small screens: the board stacks ---- */
@media (max-width: 880px) {
  .emu.emu-eco {
    grid-template-columns: 1fr;
    row-gap: 26px;
    min-height: 0;
    padding: 20px 16px 24px;
  }
  .eco-chip { min-width: 0; }
  .eco-chip .eco-chip-name { white-space: normal; font-size: 12px; }
  .eco-chip em { white-space: normal; }
  .eco-col.eco-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .eco-col.eco-right .eco-hub:last-child { grid-column: 1 / -1; }

  .eco-brain { width: min(300px, 88vw); }
  .eco-core { width: 92px; height: 92px; margin: -46px 0 0 -46px; }
  .eco-core img { width: 44px; }
  .eco-orb { font-size: 9px; padding: 6px 11px; }
}

/* ============================================================
   The day, assembled — the product-section hero clip
   A dark, glowing HQ canvas (warm ink + lime aura). The top row
   is one-time setup: team → roster → schedule → uniforms, built
   card-then-line-then-card. The bottom row is the recurring
   week — attendance → training → meet day → results — closed
   into a ring of marching dotted lines that circles forever.
   Once the ring closes, the HQ intelligence wakes at center and
   cycles three insights before the loop restarts. 13s loop.
   ============================================================ */
.emu.emu-day {
  --loop: 13s;
  margin-top: 56px;
  padding: 0;
  border-radius: var(--r-photo);
  background:
    radial-gradient(120% 140% at 72% -20%, #20261440 0%, transparent 60%),
    radial-gradient(130% 120% at 8% 115%, #1c211340 0%, transparent 55%),
    linear-gradient(165deg, #171a12 0%, #0e100a 70%);
}

/* Fine dot grid, like a working canvas */
.emu-day::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1.3px);
  background-size: 26px 26px;
  pointer-events: none;
}

/* Drifting lime aura — the energy under the surface */
.day-aura {
  position: absolute;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(52px);
  pointer-events: none;
}

.day-aura.a1 {
  left: -8%;
  top: -22%;
  background: radial-gradient(circle, rgba(166, 247, 91, 0.14) 0%, transparent 65%);
  animation: day-drift-1 calc(var(--loop) * 1.5) ease-in-out infinite alternate;
}

.day-aura.a2 {
  right: -10%;
  bottom: -28%;
  background: radial-gradient(circle, rgba(126, 181, 44, 0.16) 0%, transparent 65%);
  animation: day-drift-2 calc(var(--loop) * 1.8) ease-in-out infinite alternate;
}

@keyframes day-drift-1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(14%, 10%) scale(1.15); } }
@keyframes day-drift-2 { from { transform: translate(0, 0) scale(1.1); } to { transform: translate(-12%, -8%) scale(1); } }

/* ---- Top bar ---- */
.day-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.day-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-live {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime);
}

.day-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px rgba(166, 247, 91, 0.8);
  animation: day-blink calc(var(--loop) / 6) ease-in-out infinite;
}

@keyframes day-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ---- The canvas ---- */
.day-canvas {
  position: relative;
  height: 460px;
}

.day-card {
  position: absolute;
  width: 18.5%;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 13px 15px 14px;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
}

.day-card em {
  display: block;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(166, 247, 91, 0.75);
  margin-bottom: 4px;
}

.day-card strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1.25;
}

.day-card span {
  display: block;
  font-size: 10.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.52);
  margin-top: 3px;
}

/* Top row: one-time setup. Bottom row: the recurring week. */
.day-card.k1 { left: 2.5%;  top: 10%; }
.day-card.k2 { left: 28.5%; top: 10%; }
.day-card.k3 { left: 54.5%; top: 10%; }
.day-card.k4 { left: 79%;   top: 10%; }
.day-card.k5 { left: 79%;   top: 62%; }
.day-card.k6 { left: 54.5%; top: 62%; }
.day-card.k7 { left: 28.5%; top: 62%; }
.day-card.k8 { left: 2.5%;  top: 62%; }

.day-card.k1 { animation: day-pop-2  var(--loop) infinite; }
.day-card.k2 { animation: day-pop-8  var(--loop) infinite; }
.day-card.k3 { animation: day-pop-14 var(--loop) infinite; }
.day-card.k4 { animation: day-pop-20 var(--loop) infinite; }
.day-card.k5 { animation: day-pop-26 var(--loop) infinite, day-relight-55 var(--loop) infinite; }
.day-card.k6 { animation: day-pop-32 var(--loop) infinite; }
.day-card.k7 { animation: day-pop-38 var(--loop) infinite; }
.day-card.k8 { animation: day-pop-44 var(--loop) infinite, day-flare-44 var(--loop) infinite; }

@keyframes day-pop-2 { 0%, 2% { opacity: 0; transform: translateY(12px) scale(0.96); } 4%, 93% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: translateY(12px) scale(0.96); } }
@keyframes day-pop-8 { 0%, 8% { opacity: 0; transform: translateY(12px) scale(0.96); } 10%, 93% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: translateY(12px) scale(0.96); } }
@keyframes day-pop-14 { 0%, 14% { opacity: 0; transform: translateY(12px) scale(0.96); } 16%, 93% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: translateY(12px) scale(0.96); } }
@keyframes day-pop-20 { 0%, 20% { opacity: 0; transform: translateY(12px) scale(0.96); } 22%, 93% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: translateY(12px) scale(0.96); } }
@keyframes day-pop-26 { 0%, 26% { opacity: 0; transform: translateY(12px) scale(0.96); } 28%, 93% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: translateY(12px) scale(0.96); } }
@keyframes day-pop-32 { 0%, 32% { opacity: 0; transform: translateY(12px) scale(0.96); } 34%, 93% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: translateY(12px) scale(0.96); } }
@keyframes day-pop-38 { 0%, 38% { opacity: 0; transform: translateY(12px) scale(0.96); } 40%, 93% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: translateY(12px) scale(0.96); } }
@keyframes day-pop-44 { 0%, 44% { opacity: 0; transform: translateY(12px) scale(0.96); } 46%, 93% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: translateY(12px) scale(0.96); } }

/* The payoff card glows lime */
.day-card.pr {
  background: rgba(166, 247, 91, 0.07);
  border-color: rgba(166, 247, 91, 0.4);
}

.day-card.pr em { color: var(--lime); }

@keyframes day-flare-44 {
  0%, 44% { box-shadow: 0 0 0 rgba(166, 247, 91, 0); }
  47% { box-shadow: 0 0 42px rgba(166, 247, 91, 0.35); }
  54%, 93% { box-shadow: 0 0 18px rgba(166, 247, 91, 0.16); }
  97%, 100% { box-shadow: 0 0 0 rgba(166, 247, 91, 0); }
}

/* The week comes back around: attendance relights, it repeats */
@keyframes day-relight-55 {
  0%, 57% { box-shadow: 0 0 0 rgba(166, 247, 91, 0); border-color: rgba(255, 255, 255, 0.1); }
  59% { box-shadow: 0 0 34px rgba(166, 247, 91, 0.3); border-color: rgba(166, 247, 91, 0.5); }
  65%, 100% { box-shadow: 0 0 0 rgba(166, 247, 91, 0); border-color: rgba(255, 255, 255, 0.1); }
}

/* ---- The course ---- */
.day-seg {
  position: absolute;
  height: 2px;
  animation-timing-function: linear !important;
  background: linear-gradient(90deg, rgba(166, 247, 91, 0.4), rgba(166, 247, 91, 0.22));
  border-radius: 2px;
  transform: scaleX(0);
}

/* Bottom-ring segments: marching dashes — the week keeps circling */
.day-seg.s5, .day-seg.s6, .day-seg.s7 {
  background: none;
  background-image: repeating-linear-gradient(90deg, rgba(166, 247, 91, 0.5) 0 5px, transparent 5px 12px);
}
.day-seg.ru1, .day-seg.rd2 {
  background: none;
  background-image: repeating-linear-gradient(180deg, rgba(166, 247, 91, 0.5) 0 5px, transparent 5px 12px);
}
.day-seg.rh1, .day-seg.rh2 {
  background: none;
  background-image: repeating-linear-gradient(90deg, rgba(166, 247, 91, 0.45) 0 5px, transparent 5px 12px);
}

@keyframes day-march-l { to { background-position: -12px 0; } }
@keyframes day-march-r { to { background-position: 12px 0; } }
@keyframes day-march-d { to { background-position: 0 12px; } }
@keyframes day-march-u { to { background-position: 0 -12px; } }

.day-seg b {
  position: absolute;
  animation-timing-function: linear !important;
  top: -3.5px;
  left: -2%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 14px rgba(166, 247, 91, 0.9), 0 0 4px rgba(166, 247, 91, 1);
  opacity: 0;
}

/* Setup row: card lands, then its line draws to the next */
.day-seg.s1 { left: 21%;   top: 20%; width: 7.5%; transform-origin: left center;  animation: day-draw-4  var(--loop) infinite; }
.day-seg.s2 { left: 47%;   top: 20%; width: 7.5%; transform-origin: left center;  animation: day-draw-10 var(--loop) infinite; }
.day-seg.s3 { left: 73%;   top: 20%; width: 6%;   transform-origin: left center;  animation: day-draw-16 var(--loop) infinite; }
/* Down into the week */
.day-seg.s4 { left: 88.2%; top: 31%; width: 2px;  height: 31%; transform-origin: center top; animation: day-drawv-22 var(--loop) infinite; }
/* The week itself */
.day-seg.s5 { left: 73%;   top: 72%; width: 6%;   transform-origin: right center; animation: day-draw-28 var(--loop) infinite, day-march-l 0.6s linear infinite; }
.day-seg.s6 { left: 47%;   top: 72%; width: 7.5%; transform-origin: right center; animation: day-draw-34 var(--loop) infinite, day-march-l 0.6s linear infinite; }
.day-seg.s7 { left: 21%;   top: 72%; width: 7.5%; transform-origin: right center; animation: day-draw-40 var(--loop) infinite, day-march-l 0.6s linear infinite; }
/* The return route runs THROUGH the intelligence: up from the last
   result, over to HQ at center, out the far side to attendance */
.day-seg.ru1 { left: 11.75%; top: 45%; width: 2px; height: 17%;  transform-origin: center bottom; animation: day-drawv-46 var(--loop) infinite, day-march-u 0.6s linear infinite; }
.day-seg.rh1 { left: 11.75%; top: 45%; width: 23.25%;            transform-origin: left center;   animation: day-draw-48  var(--loop) infinite, day-march-r 0.6s linear infinite; }
.day-seg.rh2 { left: 65%;    top: 45%; width: 23.2%;             transform-origin: left center;   animation: day-draw-52  var(--loop) infinite, day-march-r 0.6s linear infinite; }
.day-seg.rd2 { left: 88.2%;  top: 45%; width: 2px; height: 17%;  transform-origin: center top;    animation: day-drawv-55 var(--loop) infinite, day-march-d 0.6s linear infinite; }

.day-seg.s1 b { animation: day-run-4  var(--loop) infinite; }
.day-seg.s2 b { animation: day-run-10 var(--loop) infinite; }
.day-seg.s3 b { animation: day-run-16 var(--loop) infinite; }
.day-seg.s4 b { animation: day-runvd-22 var(--loop) infinite; }
.day-seg.s5 b { animation: day-runb-28 var(--loop) infinite; }
.day-seg.s6 b { animation: day-runb-34 var(--loop) infinite; }
.day-seg.s7 b { animation: day-runb-40 var(--loop) infinite; }
.day-seg.ru1 b { animation: day-runvb-46 var(--loop) infinite; }
.day-seg.rh1 b { animation: day-run-48 var(--loop) infinite; }
.day-seg.rh2 b { animation: day-run-52 var(--loop) infinite; }
.day-seg.rd2 b { animation: day-runvd-55 var(--loop) infinite; }

@keyframes day-draw-4 { 0%, 4% { transform: scaleX(0); } 7%, 93% { transform: scaleX(1); } 97%, 100% { transform: scaleX(0); } }
@keyframes day-draw-10 { 0%, 10% { transform: scaleX(0); } 13%, 93% { transform: scaleX(1); } 97%, 100% { transform: scaleX(0); } }
@keyframes day-draw-16 { 0%, 16% { transform: scaleX(0); } 19%, 93% { transform: scaleX(1); } 97%, 100% { transform: scaleX(0); } }
@keyframes day-drawv-22 { 0%, 22% { transform: scaleY(0); } 25%, 93% { transform: scaleY(1); } 97%, 100% { transform: scaleY(0); } }
@keyframes day-draw-28 { 0%, 28% { transform: scaleX(0); } 31%, 93% { transform: scaleX(1); } 97%, 100% { transform: scaleX(0); } }
@keyframes day-draw-34 { 0%, 34% { transform: scaleX(0); } 37%, 93% { transform: scaleX(1); } 97%, 100% { transform: scaleX(0); } }
@keyframes day-draw-40 { 0%, 40% { transform: scaleX(0); } 43%, 93% { transform: scaleX(1); } 97%, 100% { transform: scaleX(0); } }
@keyframes day-drawv-46 { 0%, 46% { transform: scaleY(0); } 48%, 93% { transform: scaleY(1); } 97%, 100% { transform: scaleY(0); } }
@keyframes day-draw-48 { 0%, 48% { transform: scaleX(0); } 51%, 93% { transform: scaleX(1); } 97%, 100% { transform: scaleX(0); } }
@keyframes day-draw-52 { 0%, 52% { transform: scaleX(0); } 55%, 93% { transform: scaleX(1); } 97%, 100% { transform: scaleX(0); } }
@keyframes day-drawv-55 { 0%, 55% { transform: scaleY(0); } 57%, 93% { transform: scaleY(1); } 97%, 100% { transform: scaleY(0); } }

@keyframes day-run-4 { 0%, 4% { left: -2%; opacity: 0; } 4.5% { opacity: 1; } 6.5% { opacity: 1; } 7%, 100% { left: 94%; opacity: 0; } }
@keyframes day-run-10 { 0%, 10% { left: -2%; opacity: 0; } 10.5% { opacity: 1; } 12.5% { opacity: 1; } 13%, 100% { left: 94%; opacity: 0; } }
@keyframes day-run-16 { 0%, 16% { left: -2%; opacity: 0; } 16.5% { opacity: 1; } 18.5% { opacity: 1; } 19%, 100% { left: 94%; opacity: 0; } }
@keyframes day-runvd-22 { 0%, 22% { top: -2%; left: -3.5px; opacity: 0; } 22.4% { opacity: 1; } 24.6% { opacity: 1; } 25%, 100% { top: 96%; left: -3.5px; opacity: 0; } }
@keyframes day-runb-28 { 0%, 28% { left: 94%; opacity: 0; } 28.5% { opacity: 1; } 30.5% { opacity: 1; } 31%, 100% { left: -2%; opacity: 0; } }
@keyframes day-runb-34 { 0%, 34% { left: 94%; opacity: 0; } 34.5% { opacity: 1; } 36.5% { opacity: 1; } 37%, 100% { left: -2%; opacity: 0; } }
@keyframes day-runb-40 { 0%, 40% { left: 94%; opacity: 0; } 40.5% { opacity: 1; } 42.5% { opacity: 1; } 43%, 100% { left: -2%; opacity: 0; } }
@keyframes day-runvb-46 { 0%, 46% { top: 96%; left: -3.5px; opacity: 0; } 46.4% { opacity: 1; } 47.6% { opacity: 1; } 48%, 100% { top: -2%; left: -3.5px; opacity: 0; } }
@keyframes day-run-48 { 0%, 48% { left: -2%; opacity: 0; } 48.4% { opacity: 1; } 50.6% { opacity: 1; } 51%, 100% { left: 94%; opacity: 0; } }
@keyframes day-run-52 { 0%, 52% { left: -2%; opacity: 0; } 52.4% { opacity: 1; } 54.6% { opacity: 1; } 55%, 100% { left: 94%; opacity: 0; } }
@keyframes day-runvd-55 { 0%, 55% { top: -2%; left: -3.5px; opacity: 0; } 55.4% { opacity: 1; } 56.6% { opacity: 1; } 57%, 100% { top: 96%; left: -3.5px; opacity: 0; } }

/* ---- The finale: the ring circles, the intelligence cycles ---- */
.day-insight {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, 8px) scale(0.9);
  width: 30%;
  background: rgba(166, 247, 91, 0.09);
  border: 1px solid rgba(166, 247, 91, 0.45);
  border-radius: 14px;
  padding: 13px 16px 14px;
  opacity: 0;
}

.day-insight em {
  display: block;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 4px;
}

.day-insight strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1.35;
}

.day-insight.i1 { animation: day-insA var(--loop) infinite, day-ins-breathe 2.4s ease-in-out infinite; }
.day-insight.i2 { animation: day-insB var(--loop) infinite, day-ins-breathe 2.4s ease-in-out infinite; }
.day-insight.i3 { animation: day-insC var(--loop) infinite, day-ins-breathe 2.4s ease-in-out infinite; }

@keyframes day-insA {
  0%, 50% { opacity: 0; transform: translate(-50%, 8px) scale(0.9); }
  52%, 67.5% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  69.5%, 100% { opacity: 0; transform: translate(-50%, 8px) scale(0.9); }
}
@keyframes day-insB {
  0%, 70% { opacity: 0; transform: translate(-50%, 8px) scale(0.9); }
  72%, 80.5% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  82.5%, 100% { opacity: 0; transform: translate(-50%, 8px) scale(0.9); }
}
@keyframes day-insC {
  0%, 83% { opacity: 0; transform: translate(-50%, 8px) scale(0.9); }
  85%, 93% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  97%, 100% { opacity: 0; transform: translate(-50%, 8px) scale(0.9); }
}

@keyframes day-ins-breathe {
  0%, 100% { box-shadow: 0 0 30px rgba(166, 247, 91, 0.18); }
  50% { box-shadow: 0 0 52px rgba(166, 247, 91, 0.32); }
}

/* ---- Small screens: the day flows as a single column ---- */
@media (max-width: 880px) {
  .emu.emu-day { margin-top: 40px; }
  .day-canvas {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 14px 20px;
  }
  .day-card { position: static; width: 100%; }
  .day-seg { display: none; }
  .day-insight { position: static; width: 100%; transform: none; }
  .day-insight.i1 { order: 9;  margin-top: 6px; }
  .day-insight.i2 { order: 10; }
  .day-insight.i3 { order: 11; }
  /* on mobile the insights accumulate instead of swapping in place */
  @keyframes day-insA {
    0%, 57% { opacity: 0; transform: translateY(8px) scale(0.96); }
    59%, 93% { opacity: 1; transform: none; }
    97%, 100% { opacity: 0; transform: translateY(8px) scale(0.96); }
  }
  @keyframes day-insB {
    0%, 70% { opacity: 0; transform: translateY(8px) scale(0.96); }
    72%, 93% { opacity: 1; transform: none; }
    97%, 100% { opacity: 0; transform: translateY(8px) scale(0.96); }
  }
  @keyframes day-insC {
    0%, 83% { opacity: 0; transform: translateY(8px) scale(0.96); }
    85%, 93% { opacity: 1; transform: none; }
    97%, 100% { opacity: 0; transform: translateY(8px) scale(0.96); }
  }
}

/* ---------- Reduced motion: hold each clip's finished frame ---------- */
@media (prefers-reduced-motion: reduce) {
  .emu *,
  .emu *::before,
  .emu *::after { animation: none !important; }

  .emu .pop { opacity: 1 !important; transform: none !important; }
  .emu .swap > span:first-child { opacity: 0; }
  .emu .swap > span:last-child { opacity: 1; }
  .emu .digits span { opacity: 0; }
  .emu .digits span:last-child { opacity: 1; }
  .emu-tap,
  .emu-cursor { display: none; }
  .emu-toast { transform: none; opacity: 1; }

  .emu-checkin .emu-check::after { transform: scale(1); opacity: 1; }
  .emu-checkin .emu-row::before { opacity: 0.55; }
  .emu-checkin .emu-flag,
  .emu-uniforms .emu-flag,
  .emu-results .emu-flag,
  .emu-depth .emu-flag { transform: scale(1); opacity: 1; }

  .emu-roster .emu-rrow { opacity: 1; background: #fff; }
  .emu-roster .emu-hist { opacity: 1; transform: none; }
  .emu-roster .ph1 { opacity: 0; }
  .emu-roster .ph2 { opacity: 1; }

  .emu-uniforms .emu-status span:first-child { opacity: 0; }
  .emu-uniforms .emu-status span:last-child { opacity: 1; }
  .emu-uniforms .u4::before { opacity: 0.55; }

  .emu-field span { width: 7.5ch; }
  .emu-plan .dp2 { opacity: 1; }
  .emu-plan .dc2 { background: var(--ink); color: var(--paper); }
  .emu-plan .emu-badge.bp,
  .emu-results .emu-place { opacity: 1; transform: none; }
  .emu-progress .bar i { width: 100%; }
  .emu-sheets i { opacity: 1; transform: none; }
  .emu-depth .s-sr { height: 0 !important; opacity: 0; }

  /* Ecosystem board: hold the settled frame — clutter replaced
     by insights, orbs lit and parked, core steady */
  .emu-eco .eco-chip { opacity: 0; }
  .emu-eco .eco-insight { opacity: 1; transform: none; }
  .emu-eco .eco-orb { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .emu-eco .eco-brain::before { animation: none; }

  /* Day canvas: hold the assembled day — cards up, course drawn */
  .emu-day .day-card { opacity: 1; transform: none; }
  .emu-day .day-seg { transform: none; }
  .emu-day .day-seg b { display: none; }
  .emu-day .day-insight.i1 { opacity: 1; transform: translate(-50%, 0) scale(1); }
  .emu-day .day-insight.i2,
  .emu-day .day-insight.i3 { opacity: 0; }
  .emu-day .day-aura { animation: none; }
}
