/* ================= Time Machine (timeMachine.js) =================
   A full-screen overlay in the spirit of macOS Time Machine: the run's weeks
   as a stack of windows receding into a blurred sky, a timeline down the
   right edge, Cancel / Restore below the front window. */

.tm-lock { overflow: hidden; }

.tm {
  /* Geometry of the front window; everything else is placed from it. */
  --tl: 190px;                                         /* timeline width */
  --navw: 200px;                                      /* the up/down + date column */
  --ww: min(1280px, calc(100vw - var(--tl) - var(--navw) - 110px));
  --wh: min(800px, calc(100vh - 31vh - 5vh));
  --wtop: 31vh;
  --wleft: max(28px, calc((100vw - var(--tl) - var(--navw) - 26px - var(--ww)) / 2));
  --ease: cubic-bezier(.2, .78, .2, 1);

  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  opacity: 0;
  transition: opacity .45s ease;
  outline: none;
  background: #6e86a1;
}
.tm--open { opacity: 1; }
.tm--closing { opacity: 0; transition-duration: .38s; }

/* ---- the sky: a soft, out-of-focus mountain dusk ---- */
.tm__sky {
  position: absolute;
  inset: -6%;
  background:
    radial-gradient(70% 45% at 78% 82%, rgba(255, 158, 74, .95) 0%, rgba(232, 112, 38, .75) 28%, rgba(200, 90, 30, 0) 62%),
    radial-gradient(55% 40% at 12% 88%, rgba(40, 22, 16, .85) 0%, rgba(60, 30, 18, .55) 40%, rgba(60, 30, 18, 0) 72%),
    radial-gradient(90% 55% at 50% 0%, #56769a 0%, rgba(110, 138, 168, .9) 38%, rgba(140, 160, 180, 0) 75%),
    linear-gradient(180deg, #627f9f 0%, #8ea3b8 32%, #b3a597 50%, #c98a52 66%, #b65a22 82%, #4e2412 100%);
  transform: scale(1.12);
  filter: saturate(1.05);
  transition: transform 1.6s var(--ease);
}
.tm--open .tm__sky { transform: scale(1); }
.tm__sky-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(40% 30% at 60% 70%, rgba(255, 196, 120, .35), rgba(255, 196, 120, 0) 70%);
  animation: tm-drift 26s ease-in-out infinite alternate;
}
.tm__sky-ridge {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(38% 22% at 30% 74%, rgba(70, 40, 28, .55), rgba(70, 40, 28, 0) 70%),
    radial-gradient(45% 18% at 70% 66%, rgba(120, 70, 40, .35), rgba(120, 70, 40, 0) 70%);
  animation: tm-drift 34s ease-in-out infinite alternate-reverse;
}
.tm__sky-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 45%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .32) 100%);
}
/* Travelling past "now" the dusk deepens into night: the future is not lit yet. */
.tm__sky-future {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 40% at 78% 88%, rgba(255, 120, 60, .35), rgba(255, 120, 60, 0) 70%),
    radial-gradient(80% 70% at 30% 10%, rgba(88, 70, 160, .9), rgba(40, 36, 96, 0) 70%),
    linear-gradient(180deg, #121a3a 0%, #262a5c 40%, #4a3570 70%, #8a4a55 100%);
  opacity: calc(var(--future, 0) * .92);
  transition: opacity 1.1s ease;
}
.tm__sky-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff, transparent),
    radial-gradient(1px 1px at 27% 42%, rgba(255, 255, 255, .8), transparent),
    radial-gradient(1.4px 1.4px at 46% 12%, #fff, transparent),
    radial-gradient(1px 1px at 63% 33%, rgba(255, 255, 255, .7), transparent),
    radial-gradient(1.3px 1.3px at 81% 21%, #fff, transparent),
    radial-gradient(1px 1px at 91% 48%, rgba(255, 255, 255, .7), transparent),
    radial-gradient(1px 1px at 7% 61%, rgba(255, 255, 255, .6), transparent),
    radial-gradient(1.2px 1.2px at 36% 70%, rgba(255, 255, 255, .7), transparent);
  background-size: 380px 300px;
  opacity: calc(var(--future, 0) * 1.1 - .1);
  transition: opacity 1.1s ease;
  animation: tm-twinkle 6s ease-in-out infinite alternate;
}
@keyframes tm-twinkle { from { filter: brightness(.8); } to { filter: brightness(1.25); } }
@keyframes tm-drift {
  from { transform: translate3d(-2%, 1%, 0) scale(1); }
  to { transform: translate3d(3%, -2%, 0) scale(1.06); }
}

/* ---- the stack ---- */
.tm__stage {
  position: absolute;
  inset: 0;
  perspective: 1500px;
  perspective-origin: calc(var(--wleft) + var(--ww) / 2) 4vh;
}

.tm__win {
  position: absolute;
  left: var(--wleft);
  top: var(--wtop);
  width: var(--ww);
  height: var(--wh);
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  background: #ececec;
  color: #1d1d1f;
  font-size: 12.5px;
  line-height: 1.35;
  box-shadow: 0 34px 90px rgba(20, 12, 8, .38), 0 10px 26px rgba(20, 12, 8, .22), 0 0 0 .5px rgba(0, 0, 0, .28);
  transform-origin: 50% 0;
  transition: transform .72s var(--ease), opacity .6s ease;
  will-change: transform, opacity;
  cursor: pointer;
  backface-visibility: hidden;
}
.tm__win--front { cursor: default; }
.tm__win--instant { transition: none !important; }
.tm__win--past { pointer-events: none; }
/* Back windows wear the haze of distance. */
.tm__win::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(214, 222, 232, var(--fog, 0));
  pointer-events: none;
  transition: background .6s ease;
  z-index: 20;
}
.tm__win--front::after { background: rgba(214, 222, 232, 0); }
.tm__win:not(.tm__win--front):hover::after { background: rgba(255, 255, 255, calc(var(--fog, 0) * .6)); }
.tm__win--solo { transform: none; cursor: default; }

/* ---- window chrome ---- */
.tm__titlebar {
  position: relative;
  z-index: 8;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 84px;
  background: linear-gradient(#ececec, #e2e2e2);
  border-bottom: 1px solid #d4d4d4;
  color: #4b4b4b;
  font-size: 13px;
}
.tm__lights { position: absolute; inset-inline-start: 10px; top: 7px; display: flex; gap: 8px; }
.tm__lights i { width: 12px; height: 12px; border-radius: 50%; background: #d0d0d0; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .18); }
.tm__lights i:first-child { background: #ff5f57; box-shadow: inset 0 0 0 .5px #e0443e; }
.tm__win--front .tm__lights i:nth-child(2) { background: #febc2e; box-shadow: inset 0 0 0 .5px #dea123; }
.tm__win--front .tm__lights i:nth-child(3) { background: #28c840; box-shadow: inset 0 0 0 .5px #1aab29; }
.tm__titletext { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm__titletext > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.tm__titleicon {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid #3b8cf0;
  background:
    linear-gradient(#3b8cf0, #3b8cf0) 50% 20% / 1.5px 4px no-repeat,
    linear-gradient(#3b8cf0, #3b8cf0) 72% 50% / 3px 1.5px no-repeat,
    #e9f2fe;
}
.tm__titledate { position: absolute; inset-inline-end: 12px; color: #8a8a8a; font-size: 11.5px; }

.tm__toolbar {
  position: relative;
  z-index: 7;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 10px;
  background: linear-gradient(#e2e2e2, #d9d9d9);
  border-bottom: 1px solid #c4c4c4;
}
.tm__seg { display: inline-flex; border: 1px solid #c3c3c3; border-radius: 5px; overflow: hidden; background: #fff; box-shadow: 0 .5px 0 rgba(0, 0, 0, .06); }
.tm__seg button {
  appearance: none;
  border: 0;
  border-inline-start: 1px solid #d3d3d3;
  background: #fbfbfb;
  color: #3a3a3a;
  font: inherit;
  font-size: 12px;
  height: 22px;
  padding: 0 11px;
  cursor: pointer;
}
.tm__seg button:first-child { border-inline-start: 0; }
.tm__seg button:hover:not(:disabled) { background: #f0f0f0; }
.tm__seg button.on { background: #6c6c6c; color: #fff; }
.tm__seg button:disabled { color: #bdbdbd; cursor: default; }
.tm__seg--nav button { width: 28px; padding: 0; font-size: 17px; line-height: 20px; }
.tm__daypill { color: #6b6b6b; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.tm__search {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: min(250px, 30%);
  height: 22px;
  padding: 0 10px;
  border-radius: 5px;
  background: #fff;
  border: 1px solid #cfcfcf;
  color: #8b8b8b;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
}
.tm__searchicon {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border: 1.5px solid #8b8b8b;
  border-radius: 50%;
  position: relative;
}
.tm__searchicon::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 1.5px;
  background: #8b8b8b;
  inset-inline-end: -4px;
  bottom: -2px;
  transform: rotate(45deg);
}

.tm__content { flex: 1 1 auto; display: flex; min-height: 0; background: #fff; position: relative; }
.tm__skeleton {
  flex: 1;
  background:
    linear-gradient(90deg, #ebebeb 0 190px, #fff 190px) 0 0 / 100% 100% no-repeat;
}
.tm__statusbar {
  flex: 0 0 auto;
  height: 22px;
  line-height: 22px;
  text-align: center;
  font-size: 11px;
  color: #6f6f6f;
  background: #e8e8e8;
  border-top: 1px solid #d0d0d0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 12px;
}

/* ---- sidebar ---- */
.tm__side {
  flex: 0 0 190px;
  overflow: auto;
  padding: 6px 0 10px;
  background: #ececec;
  border-inline-end: 1px solid #d5d5d5;
}
.tm__side h4 { margin: 10px 12px 3px; font-size: 11px; font-weight: 600; color: #8a8a8a; }
.tm__sideitem { display: flex; align-items: center; gap: 7px; padding: 3px 12px 3px 16px; font-size: 12.5px; color: #262626; }
.tm__sidelabel { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm__sidemeta { flex: 0 0 auto; color: #8d8d8d; font-size: 11px; font-variant-numeric: tabular-nums; }
.tm__dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #c7c7c7; display: inline-block; }
.tm__sideitem--ok .tm__dot, .tm__dot--ok { background: #34c759; }
.tm__sideitem--late .tm__dot, .tm__dot--late { background: #ff3b30; }
.tm__sideitem--active .tm__dot, .tm__dot--active { background: #0a84ff; }
.tm__sideitem--warn .tm__dot, .tm__dot--warn { background: #ff9f0a; }
.tm__sideitem--idle { color: #7a7a7a; }

/* ---- main pane ---- */
.tm__main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.tm__preview {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  gap: 14px;
  height: 172px;
  padding: 10px 16px 10px 12px;
  background: linear-gradient(#636363, #565656);
  color: #fff;
  border-bottom: 1px solid #3e3e3e;
}
.tm__curve { flex: 1 1 auto; min-width: 0; height: 100%; }
.tm__grid { stroke: rgba(255, 255, 255, .08); stroke-width: 1; }
.tm__bac { stroke: rgba(255, 255, 255, .35); stroke-width: 1; stroke-dasharray: 2 3; }
.tm__bactext { fill: rgba(255, 255, 255, .55); font-size: 9px; }
.tm__pv { fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: 1.5; stroke-dasharray: 4 3; }
.tm__ev { fill: none; stroke: #4cd964; stroke-width: 2.2; stroke-linejoin: round; }
.tm__evfill { fill: rgba(76, 217, 100, .16); stroke: none; }
.tm__ac { fill: none; stroke: #ffa63d; stroke-width: 2.2; stroke-linejoin: round; }
.tm__evdot { fill: #4cd964; stroke: #fff; stroke-width: 1; }
.tm__acdot { fill: #ffa63d; stroke: #fff; stroke-width: 1; }
.tm__atline { stroke: #fff; stroke-width: 1; opacity: .75; }
.tm__nowmark { stroke: #ff453a; stroke-width: 1.5; }
.tm__hatch { fill: rgba(160, 170, 255, .22); }
.tm__lg-now { fill: #ff453a; }
.tm__legend text { fill: rgba(255, 255, 255, .78); font-size: 9px; }
.tm__lg-pv { fill: rgba(255, 255, 255, .6); }
.tm__lg-ev { fill: #4cd964; }
.tm__lg-ac { fill: #ffa63d; }

.tm__stats { flex: 0 0 auto; display: grid; grid-template-columns: repeat(2, minmax(70px, auto)); gap: 6px 18px; align-content: center; }
.tm__stat { display: flex; flex-direction: column; }
.tm__stat--big { grid-column: 1 / -1; }
.tm__statvalue { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tm__stat--big .tm__statvalue { font-size: 30px; font-weight: 300; letter-spacing: -.02em; }
.tm__statlabel { font-size: 10.5px; color: rgba(255, 255, 255, .62); text-transform: uppercase; letter-spacing: .05em; }
.tm__stat--ok .tm__statvalue { color: #7ee08f; }
.tm__stat--warn .tm__statvalue { color: #ffd060; }
.tm__stat--bad .tm__statvalue { color: #ff8a80; }

.tm__list { flex: 1 1 auto; min-height: 0; overflow: auto; }
.tm__table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tm__table th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: start;
  font-weight: 400;
  font-size: 11.5px;
  color: #4a4a4a;
  background: #f6f6f6;
  border-bottom: 1px solid #dcdcdc;
  padding: 3px 8px;
  white-space: nowrap;
}
.tm__table th + th { border-inline-start: 1px solid #e3e3e3; }
.tm__table td { padding: 2px 8px; height: 21px; white-space: nowrap; }
.tm__table tbody tr:nth-child(even):not(.tm__grouprow) { background: #f4f6f9; }
.tm__grouprow td {
  padding: 6px 8px 2px;
  font-weight: 600;
  font-size: 11.5px;
  color: #3c3c3c;
  background: #fff;
  border-top: 1px solid #ededed;
}
.tm__grouprow td > * { vertical-align: middle; }
.tm__grouprow .tm__dot { margin-inline-end: 7px; }
.tm__groupmeta { margin-inline-start: 8px; font-weight: 400; color: #8b8b8b; }
.tm__name { max-width: 0; width: 55%; overflow: hidden; text-overflow: ellipsis; }
.tm__name > * { vertical-align: middle; }
.tm__muted { color: #7f7f7f; font-variant-numeric: tabular-nums; }
.tm__num { font-variant-numeric: tabular-nums; text-align: end; }
.tm__fileicon {
  display: inline-block;
  width: 11px;
  height: 13px;
  margin-inline-end: 7px;
  border-radius: 1.5px;
  background: linear-gradient(135deg, #fff 0 72%, #cfd6df 72%);
  box-shadow: inset 0 0 0 1px #b7bec8;
}
.tm__fileicon--done { background: linear-gradient(135deg, #e3f7e7 0 72%, #9fd8aa 72%); box-shadow: inset 0 0 0 1px #6cc07c; }
.tm__fileicon--wip { background: linear-gradient(135deg, #e5f0fe 0 72%, #9cc4f7 72%); box-shadow: inset 0 0 0 1px #5d9ef0; }
/* Changed since the previous week, in Finder's selection colours. */
.tm__table tbody tr.tm__row--delivered { background: #0b63d6 !important; color: #fff; }
.tm__table tbody tr.tm__row--delivered .tm__muted { color: rgba(255, 255, 255, .8); }
.tm__table tbody tr.tm__row--delivered .tm__pill { background: rgba(255, 255, 255, .22); color: #fff; }
.tm__table tbody tr.tm__row--started { background: #dce9fc !important; }

.tm__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 7px;
  height: 16px;
  border-radius: 8px;
  font-size: 11px;
  background: #eceef1;
  color: #5c6370;
}
.tm__pill--green { background: #e3f6e7; color: #1e7b34; }
.tm__pill--amber { background: #fff1d6; color: #9a5b00; }
.tm__pill--red { background: #ffe4e1; color: #c0261b; }
.tm__pill--blue { background: #e3eefd; color: #1559b8; }
.tm__pillbar { width: 34px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, currentColor var(--p, 0%), rgba(21, 89, 184, .18) var(--p, 0%)); }

.tm__figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid #e3e3e3; }
.tm__figure { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; border-inline-start: 1px solid #ededed; }
.tm__figure:first-child { border-inline-start: 0; }
.tm__figlabel { font-size: 10.5px; color: #8a8a8a; text-transform: uppercase; letter-spacing: .05em; }
.tm__figvalue { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tm__fignote { font-size: 11px; color: #8a8a8a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tm__weeksum { margin: 0; padding: 8px 14px; font-size: 11.5px; color: #6b6b6b; background: #f6f6f6; border-bottom: 1px solid #e3e3e3; }
.tm__empty { margin: 10px 14px; color: #8a8a8a; font-size: 12px; }
.tm__events { list-style: none; margin: 0; padding: 4px 0; }
.tm__event { display: grid; grid-template-columns: 18px 54px 1fr; gap: 6px; align-items: baseline; padding: 4px 14px; border-bottom: 1px solid #f1f1f1; }
.tm__eventicon { text-align: center; font-size: 10px; }
.tm__eventday { color: #8a8a8a; font-size: 11px; font-variant-numeric: tabular-nums; }
.tm__eventmsg { color: #2a2a2a; }
.tm__event--ok .tm__eventicon { color: #28a745; }
.tm__event--gold .tm__eventicon { color: #c99400; }
.tm__event--violet .tm__eventicon { color: #8e5bd6; }
.tm__event--blue .tm__eventicon { color: #0a6fe0; }
.tm__event--amber .tm__eventicon { color: #e08600; }
.tm__event--red { background: #fff6f5; }
.tm__event--red .tm__eventicon, .tm__event--red .tm__eventmsg { color: #c0261b; }
.tm__event--grey .tm__eventicon { color: #9a9a9a; }

/* ---- loading / message windows ---- */
.tm__loading, .tm__message {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fff;
  color: #555;
  text-align: center;
  padding: 24px;
}
.tm__loading { flex-direction: row; }
.tm__spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #d6d6d6;
  border-top-color: #0a84ff;
  animation: tm-spin .8s linear infinite;
}
@keyframes tm-spin { to { transform: rotate(360deg); } }
.tm__message h3 { margin: 0; font-size: 16px; color: #222; }
.tm__message p { margin: 0; max-width: 46ch; }
.tm__message-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid #3b8cf0;
  background:
    linear-gradient(#3b8cf0, #3b8cf0) 50% 22% / 3px 13px no-repeat,
    linear-gradient(#3b8cf0, #3b8cf0) 74% 50% / 11px 3px no-repeat,
    #e9f2fe;
}

/* ---- up / down, and the date ---- */
.tm__nav {
  position: absolute;
  left: calc(var(--wleft) + var(--ww) + 26px);
  top: calc(var(--wtop) + var(--wh) * .42 - 58px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  z-index: 300;
  transition: opacity .5s ease .25s, transform .7s var(--ease) .15s;
}
.tm:not(.tm--open) .tm__nav { opacity: 0; transform: translateX(20px); }
.tm__arrow {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .45);
  background: rgba(255, 236, 222, .32);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 2px 10px rgba(60, 30, 10, .18);
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.tm__arrow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  border-inline-start: 2px solid #fff;
  border-top: 2px solid #fff;
  transform: translate(-50%, -25%) rotate(45deg);
}
.tm__arrow--down::before { transform: translate(-50%, -75%) rotate(225deg); }
.tm__arrow:hover:not(:disabled) { background: rgba(255, 236, 222, .5); }
.tm__arrow:active:not(:disabled) { transform: scale(.94); }
.tm__arrow:disabled { opacity: .35; cursor: default; }
.tm__arrow:focus-visible, .tm__exit:focus-visible, .tm__nowbtn:focus-visible, .tm__tick:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tm__when { display: flex; flex-direction: column; gap: 2px; min-width: 180px; text-shadow: 0 1px 6px rgba(40, 20, 10, .45); }
.tm__when strong { font-size: 15px; font-weight: 500; }
.tm__when small { font-size: 12px; opacity: .82; }

/* ---- the timeline ---- */
.tm__timeline {
  position: absolute;
  top: 5vh;
  bottom: 4vh;
  right: 0;
  width: var(--tl);
  z-index: 300;
  transition: opacity .5s ease .2s, transform .8s var(--ease) .1s;
}
.tm:not(.tm--open) .tm__timeline { opacity: 0; transform: translateX(40px); }
.tm__ticks { list-style: none; margin: 0; padding: 0; height: 100%; display: flex; flex-direction: column; touch-action: none; user-select: none; }
.tm__ticks--scrub, .tm__ticks--scrub .tm__tick { cursor: grabbing; }
.tm__tickrow { position: relative; flex: 1 1 0; min-height: 2px; --mag: 0; }
.tm__tick {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 2px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
}
.tm__tickbar {
  display: block;
  height: calc(var(--h, 2px) + var(--mag) * 2px);
  width: calc(var(--w) + var(--mag) * 46px);
  background: rgba(255, 255, 255, calc(.42 + var(--mag) * .5));
  border-radius: 1px 0 0 1px;
  transition: width .14s ease-out, height .14s ease-out, background .2s;
}
.tm__tickrow--month .tm__tickbar { background: rgba(255, 255, 255, calc(.7 + var(--mag) * .3)); }
.tm__tickrow--on .tm__tickbar { background: #fff; box-shadow: 0 0 10px rgba(255, 255, 255, .7); height: calc(var(--h, 2px) + 2px + var(--mag) * 2px); }
.tm__tickrow--now .tm__tickbar { background: #ff3b30; height: 14px; width: calc(66px + var(--mag) * 20px); box-shadow: none; }
.tm__tickrow--now.tm__tickrow--on .tm__tickbar { box-shadow: 0 0 14px rgba(255, 70, 50, .8); }
.tm__ticklabel, .tm__ticktip {
  position: absolute;
  top: 50%;
  right: calc(var(--w) + 12px + var(--mag) * 46px);
  transform: translateY(-50%);
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(40, 20, 10, .5);
  transition: right .14s ease-out, opacity .15s;
}
.tm__ticklabel { color: rgba(255, 255, 255, .78); }
.tm__ticklabel:not(:empty)::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 1px;
  margin-inline-start: 6px;
  vertical-align: middle;
  background: rgba(255, 255, 255, .6);
}
.tm__tickrow--now .tm__ticklabel {
  right: calc(66px + 10px + var(--mag) * 20px);
  padding: 1px 8px;
  border-radius: 9px;
  background: #ff3b30;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  text-shadow: none;
  box-shadow: 0 1px 6px rgba(120, 20, 10, .35);
}
.tm__tickrow--now .tm__ticklabel::after { display: none; }
.tm__ticktip { opacity: 0; font-weight: 600; color: #fff; font-size: 12px; }
.tm__tickrow:hover .tm__ticktip { opacity: 1; }
.tm__tickrow:hover .tm__ticklabel { opacity: 0; }
.tm__tickrow--now:hover .tm__ticktip { display: none; }
.tm__tickrow--now:hover .tm__ticklabel { opacity: 1; }
.tm__tickrow--on .tm__ticklabel { color: #fff; font-weight: 600; }

.tm__driftnote {
  display: none;
  position: absolute;
  top: 2.2vh;
  left: calc(var(--wleft) + var(--ww) / 2);
  transform: translateX(-50%);
  max-width: min(640px, 80vw);
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 12px;
  text-align: center;
  background: rgba(60, 35, 10, .38);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  z-index: 300;
}
.tm--drift .tm__driftnote { display: block; }
.tm__hint {
  position: absolute;
  left: 22px;
  bottom: 16px;
  font-size: 11.5px;
  opacity: .72;
  text-shadow: 0 1px 4px rgba(40, 20, 10, .5);
  z-index: 300;
}


/* ---- projected (after "now") ---- */
.tm__win--projected .tm__titlebar { background: linear-gradient(#e6e8f4, #d9dcef); }
.tm__win--projected .tm__toolbar { background: linear-gradient(#d9dcef, #cfd3ea); border-bottom-color: #b9bedb; }
.tm__win--projected .tm__preview { background: linear-gradient(#4b4f6e, #3e425e); }
.tm__win--projected .tm__statusbar { background: #e3e5f2; color: #555b84; }
.tm__win--now { box-shadow: 0 34px 90px rgba(20, 12, 8, .38), 0 10px 26px rgba(20, 12, 8, .22), 0 0 0 1.5px rgba(255, 69, 58, .75); }
.tm__badge {
  display: inline-block;
  margin-inline-end: 8px;
  padding: 0 7px;
  border-radius: 8px;
  background: #5e5ce6;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 15px;
  vertical-align: 1px;
}
.tm__event--planned .tm__eventmsg { color: #3f4470; }
.tm__event--planned .tm__eventday::before { content: "≈ "; color: #8d90b8; }

/* ---- leave, jump, back to now ---- */
.tm__exit {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 300;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 14px 0 10px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, .38);
  background: rgba(255, 236, 222, .22);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  color: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(40, 20, 10, .4);
  transition: background .15s, opacity .4s ease .2s;
}
.tm:not(.tm--open) .tm__exit { opacity: 0; }
.tm__exit:hover { background: rgba(255, 236, 222, .4); }
.tm__exitx { position: relative; width: 12px; height: 12px; }
.tm__exitx::before, .tm__exitx::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1.6px;
  background: #fff;
  border-radius: 1px;
  transform: translate(-50%, -50%) rotate(45deg);
}
.tm__exitx::after { transform: translate(-50%, -50%) rotate(-45deg); }
.tm__whenrel { display: inline-block; }
.tm__whenrel--future { color: #d4d2ff; }
.tm__jump {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  opacity: .92;
  text-shadow: 0 1px 4px rgba(40, 20, 10, .45);
}
.tm__datepick {
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff;
  font: inherit;
  font-size: 12px;
  color-scheme: dark;
}
.tm__nowbtn {
  height: 24px;
  padding: 0 11px;
  border-radius: 12px;
  border: 1px solid rgba(255, 90, 80, .7);
  background: rgba(255, 59, 48, .78);
  color: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.tm__nowbtn:hover { background: #ff3b30; }
.tm__flash {
  position: absolute;
  bottom: 54px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  padding: 8px 16px;
  border-radius: 10px;
  background: rgba(30, 20, 20, .72);
  color: #fff;
  font-size: 12.5px;
}

/* Future ticks: the weeks that have not been flown yet. */
.tm__tickrow--future .tm__tickbar { background: rgba(196, 194, 255, calc(.38 + var(--mag) * .5)); }
.tm__tickrow--future.tm__tickrow--month .tm__tickbar { background: rgba(214, 212, 255, calc(.62 + var(--mag) * .3)); }
.tm__tickrow--future .tm__ticklabel { color: rgba(222, 220, 255, .8); }
.tm__tickrow--future.tm__tickrow--on .tm__tickbar { background: #e2e0ff; box-shadow: 0 0 10px rgba(200, 196, 255, .85); }
.tm__tickrow--day .tm__tickbar { background: rgba(255, 255, 255, .9); width: calc(var(--w) * .6 + var(--mag) * 46px); }

/* ---- entry points in the run view ---- */
.sim__track { cursor: pointer; }
.sim__tmbtn { display: inline-flex; align-items: center; gap: 7px; }
.sim__tmicon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  position: relative;
}
.sim__tmicon::before, .sim__tmicon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: currentColor;
  border-radius: 1px;
}
.sim__tmicon::before { width: 1.5px; height: 4.5px; transform: translate(-50%, -100%); }
.sim__tmicon::after { width: 3.5px; height: 1.5px; transform: translate(0, -50%); }

/* ---- small screens and reduced motion ---- */
@media (max-width: 980px) {
  .tm { --tl: 84px; --navw: 0px; --ww: calc(100vw - var(--tl) - 32px); --wleft: 16px; --wtop: 17vh; --wh: calc(100vh - 17vh - 78px); }
  .tm__side { display: none; }
  .tm__ticklabel { display: none; }
  .tm__nav {
    left: var(--wleft);
    top: calc(var(--wtop) + var(--wh) + 16px);
    width: var(--ww);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }
  .tm__arrow { width: 32px; height: 32px; }
  .tm__when { min-width: 0; flex: 1 1 auto; }
  .tm__when small:last-child { display: none; }
  .tm__stats, .tm__search, .tm__daypill, .tm__hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tm, .tm__win, .tm__sky, .tm__nav, .tm__timeline, .tm__sky-future, .tm__sky-stars { transition-duration: .01ms !important; transition-delay: 0s !important; }
  .tm__sky-glow, .tm__sky-ridge, .tm__sky-stars { animation: none; }
}
