/* The chopping scene on the Today card (Adi, 2026-11-10: "more fun to start the day, some personality").
   A strip listing your next three tasks lands on a cutting board, a cleaver chops it into one piece per task,
   and each piece goes onto the Later plate (left) or the Today plate (right), like the review itself.
   Each piece lands on its plate right after its chop and stays there: round after round the plates pile up
   (a tall Later pile, a few for Today). Then it holds, clears and starts again. app.js adds the pile chips.
   "Start chopping" gives one big chop before the review opens.
   Pure CSS: app.js writes the markup, the titles and each piece's plate (--dx). Reduced motion: still picture. */

body.orbit-v27 .chop-start.has-scene { position: relative; container-type: inline-size; overflow: hidden; }
body.orbit-v27 .chop-start-quip { margin: -2px 0 0 !important; font-size: 15px !important; font-style: italic; color: var(--o-muted) !important; }

.chop-scene {
  --cs-t: 4.8s;
  --cs-wood: #dcaa6e; --cs-wood-2: #cf9a5b; --cs-wood-edge: #b07a41;
  --cs-paper: #fffdf8; --cs-ink: #2b2f36;
  --cs-steel: #eef1f5; --cs-steel-2: #b8c1cb;
  position: relative; width: 360px; height: 140px; flex: none; justify-self: center;
  margin: -6px 0 6px; user-select: none; -webkit-user-select: none;
}
.chop-scene > span { position: absolute; display: block; }

/* Cutting board, seen from above, with a hanging hole */
.cs-board {
  left: 74px; top: 58px; width: 212px; height: 66px; border-radius: 16px;
  background:
    repeating-linear-gradient(176deg, transparent 0 9px, rgba(120, 70, 30, .10) 9px 10px, transparent 10px 17px),
    linear-gradient(180deg, var(--cs-wood), var(--cs-wood-2));
  box-shadow: inset 0 -7px 0 var(--cs-wood-edge), inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 20px rgba(0, 0, 0, .22);
}
.cs-hole { position: absolute; right: 12px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: rgba(70, 40, 15, .55); box-shadow: inset 0 2px 2px rgba(0, 0, 0, .35); }

/* Two plates: Later on the left, Today on the right */
.cs-plate {
  top: 92px; width: 66px; height: 26px; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 45%, #fbfcfd 0 52%, #e3e8ee 56%, #f4f6f9 64%, #d3dae2 100%);
  box-shadow: 0 6px 12px rgba(0, 0, 0, .22);
}
.cs-plate.is-later { left: 0; }
.cs-plate.is-today { right: 0; }
.cs-plate b {
  position: absolute; left: 0; right: 0; top: 32px; display: flex; align-items: center; justify-content: center; gap: 4px;
  color: var(--o-muted, #8a8f98); font: 700 9.5px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase;
}
.cs-plate.is-today b { color: var(--o-ink-2, #c9ccd1); }
.cs-plate.is-today b::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--o-accent, #3b9eff); }

/* The strip: one paper piece per task */
.cs-strip { left: 84px; top: 72px; width: 192px; height: 38px; z-index: 1; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .22)); }
.cs-piece { position: absolute; top: 0; width: 64px; height: 38px; }
.cs-piece:nth-child(1) { left: 0; }
.cs-piece:nth-child(2) { left: 64px; }
.cs-piece:nth-child(3) { left: 128px; }
.cs-piece.cs-empty { visibility: hidden; }
.cs-chunk { position: absolute; inset: 0; overflow: hidden; background: var(--cs-paper); box-shadow: inset -1px 0 0 rgba(0, 0, 0, .06); }
.cs-piece:nth-child(1) .cs-chunk { border-radius: 6px 0 0 6px; }
.cs-piece:nth-child(3) .cs-chunk { border-radius: 0 6px 6px 0; box-shadow: none; }
.cs-ink {
  position: absolute; inset: 0; box-sizing: border-box; display: flex; align-items: flex-start; padding: 6px 6px 0;
  color: var(--cs-ink); font: 600 9.5px/1.22 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.cs-title { flex: 1; min-width: 0; max-height: 2.44em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }

/* The cleaver: blade with a hole, dark handle. Its resting pose hovers over the right of the board. */
.cs-knife { left: 0; top: 49px; width: 90px; height: 42px; z-index: 3; transform-origin: 50px 8px; transform: translate(92px, -34px) rotate(-14deg); }
.cs-blade {
  position: absolute; left: 0; top: 0; width: 50px; height: 42px; border-radius: 4px 5px 2px 8px;
  background: radial-gradient(circle at 11px 11px, rgba(40, 45, 55, .55) 0 4px, transparent 4.7px), linear-gradient(160deg, var(--cs-steel), var(--cs-steel-2));
  box-shadow: inset 0 -3px 0 #f9fbfd, inset -1px 0 0 rgba(0, 0, 0, .08), 0 3px 6px rgba(0, 0, 0, .25);
}
.cs-handle {
  position: absolute; left: 46px; top: 3px; width: 40px; height: 12px; border-radius: 3px 6px 6px 3px;
  background: radial-gradient(circle at 13px 6px, #c9b39b 0 1.4px, transparent 1.8px), radial-gradient(circle at 27px 6px, #c9b39b 0 1.4px, transparent 1.8px), linear-gradient(180deg, #4a3427, #2c1f17);
}
/* Little crumbs that flick out at each chop */
.cs-spark { left: 0; top: 80px; width: 44px; height: 12px; z-index: 2; opacity: 0; }
.cs-spark::before, .cs-spark::after { content: ""; position: absolute; top: 2px; width: 8px; height: 2px; border-radius: 2px; background: var(--o-muted, #8a8f98); }
.cs-spark::before { left: -6px; transform: rotate(-28deg); }
.cs-spark::after { right: -6px; transform: rotate(28deg); }

/* ---- The loop: chop at 18% and the right piece flies to its plate; chop at 38% and the other two follow ---- */
.chop-scene.is-playing .cs-strip,
.chop-scene.is-playing .cs-knife,
.chop-scene.is-playing .cs-board,
.chop-scene.is-playing .cs-spark,
.chop-scene.is-playing .cs-piece,
.chop-scene.is-playing .cs-chunk { animation-duration: var(--cs-t); animation-iteration-count: var(--cs-n, 3); animation-fill-mode: both; animation-timing-function: linear; }
.chop-scene.is-playing .cs-strip { animation-name: cs-strip; }
.chop-scene.is-playing .cs-knife { animation-name: cs-knife; }
.chop-scene.is-playing .cs-board { animation-name: cs-board; }
.chop-scene.is-playing .cs-spark { animation-name: cs-spark; }
.chop-scene.is-playing .cs-piece:nth-child(1) { animation-name: cs-x0; }
.chop-scene.is-playing .cs-piece:nth-child(2) { animation-name: cs-x1; }
.chop-scene.is-playing .cs-piece:nth-child(3) { animation-name: cs-x2; }
.chop-scene.is-playing .cs-piece:nth-child(1) .cs-chunk { animation-name: cs-y0; }
.chop-scene.is-playing .cs-piece:nth-child(2) .cs-chunk { animation-name: cs-y1; }
.chop-scene.is-playing .cs-piece:nth-child(3) .cs-chunk { animation-name: cs-y2; }

/* The list slaps down onto the board */
@keyframes cs-strip {
  0% { transform: translate(-30px, -14px) rotate(-3deg); opacity: 0; animation-timing-function: cubic-bezier(.2, .8, .3, 1.2); }
  8%, 100% { transform: translate(0, 0) rotate(0); opacity: 1; }
}
/* After each chop the cleaver lifts high, out of the way of the flying piece */
@keyframes cs-knife {
  0%, 6% { transform: translate(92px, -34px) rotate(-14deg); animation-timing-function: ease-in-out; }
  14% { transform: translate(123px, -26px) rotate(-10deg); animation-timing-function: cubic-bezier(.6, 0, 1, 1); }
  18% { transform: translate(123px, 0) rotate(0); animation-timing-function: ease-out; }
  22%, 26% { transform: translate(123px, -46px) rotate(-12deg); animation-timing-function: ease-in-out; }
  34% { transform: translate(187px, -26px) rotate(-10deg); animation-timing-function: cubic-bezier(.6, 0, 1, 1); }
  38% { transform: translate(187px, 0) rotate(0); animation-timing-function: ease-out; }
  42%, 62% { transform: translate(187px, -46px) rotate(-12deg); animation-timing-function: ease-in-out; }
  76%, 100% { transform: translate(92px, -34px) rotate(-14deg); }
}
@keyframes cs-board {
  0%, 18%, 21%, 38%, 41%, 100% { transform: translateY(0); }
  19%, 39% { transform: translateY(2px); }
}
@keyframes cs-spark {
  0%, 17.9% { opacity: 0; transform: translateX(126px) scale(.5); }
  18% { opacity: 1; transform: translateX(126px) scale(.6); }
  22% { opacity: 0; transform: translateX(126px) scale(1.4); }
  22.1%, 37.9% { opacity: 0; transform: translateX(190px) scale(.5); }
  38% { opacity: 1; transform: translateX(190px) scale(.6); }
  42%, 100% { opacity: 0; transform: translateX(190px) scale(1.4); }
}
/* Chops go left to right (Adi): the first cut frees the left task, the second the middle one, then the last goes.
   Each piece is nudged off by its chop, then flies straight to its plate (--dx); the arc is in cs-y*. */
@keyframes cs-x0 { 0%, 18% { transform: translateX(0); } 20%, 22% { transform: translateX(-8px); } 32%, 100% { transform: translateX(var(--dx, -83px)); } }
@keyframes cs-x1 { 0%, 41% { transform: translateX(0); } 51%, 100% { transform: translateX(var(--dx, 153px)); } }
@keyframes cs-x2 { 0%, 38% { transform: translateX(0); } 40%, 50% { transform: translateX(6px); } 60%, 100% { transform: translateX(var(--dx, 77px)); } }
@keyframes cs-y0 {
  0%, 18% { transform: translateY(0) rotate(0) scale(1); opacity: 1; }
  20%, 22% { transform: translateY(0) rotate(-3deg) scale(1); animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  27% { transform: translateY(-30px) rotate(10deg) scale(.9); animation-timing-function: cubic-bezier(.6, 0, .8, .4); }
  32%, 100% { transform: translateY(var(--land, 8px)) rotate(-3deg) scale(.78); opacity: 1; }
}
@keyframes cs-y1 {
  0%, 41% { transform: translateY(0) rotate(0) scale(1); opacity: 1; animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  46% { transform: translateY(-30px) rotate(12deg) scale(.9); animation-timing-function: cubic-bezier(.6, 0, .8, .4); }
  51%, 100% { transform: translateY(var(--land, 8px)) rotate(2deg) scale(.78); opacity: 1; }
}
@keyframes cs-y2 {
  0%, 38% { transform: translateY(0) rotate(0) scale(1); opacity: 1; }
  40%, 50% { transform: translateY(0) rotate(3deg) scale(1); animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  55% { transform: translateY(-30px) rotate(-14deg) scale(.9); animation-timing-function: cubic-bezier(.6, 0, .8, .4); }
  60%, 100% { transform: translateY(var(--land, 8px)) rotate(-1deg) scale(.78); opacity: 1; }
}

/* The piles: each landed piece becomes a chip in the same spot (app.js sets --x, --y, --r) */
.cs-pile { top: 91px; width: 0; height: 0; }
.cs-pile.is-later { left: 33px; }
.cs-pile.is-today { left: 327px; }
.cs-chip {
  position: absolute; left: -32px; top: -19px; width: 64px; height: 38px; box-sizing: border-box; padding: 6px 6px 0; border-radius: 3px;
  background: var(--cs-paper); color: var(--cs-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  font: 600 9.5px/1.22 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  overflow: hidden; overflow-wrap: anywhere;
  transform: translate(var(--x, 0), calc(8px + var(--y, 0px))) rotate(var(--r, 0deg)) scale(.78);
}
.cs-chip:not(:last-child) { color: transparent; } /* only the top of each pile shows its title */
.cs-chip-t { display: block; max-height: 2.44em; overflow: hidden; }
.chop-scene.is-done .cs-piece { visibility: hidden; }
.chop-scene.is-playing, .chop-scene.is-done { cursor: pointer; }

/* Start chopping: one big chop, then the review opens */
.chop-scene.is-go .cs-strip, .chop-scene.is-go .cs-chunk { animation: none; }
.chop-scene.is-go .cs-knife { animation: cs-go-knife .5s both; }
.chop-scene.is-go .cs-board { animation: cs-go-board .5s both; }
.chop-scene.is-go .cs-spark { animation: cs-go-spark .5s both; }
.chop-scene.is-go .cs-piece:nth-child(1) { animation: cs-go-left .5s both; }
.chop-scene.is-go .cs-piece:nth-child(n+2) { animation: cs-go-right .5s both; }
@keyframes cs-go-knife {
  0% { transform: translate(92px, -34px) rotate(-14deg); animation-timing-function: ease-out; }
  35% { transform: translate(123px, -44px) rotate(-28deg); animation-timing-function: cubic-bezier(.7, 0, 1, 1); }
  52% { transform: translate(123px, 2px) rotate(0); animation-timing-function: ease-out; }
  100% { transform: translate(123px, -4px) rotate(-2deg); }
}
@keyframes cs-go-board { 0%, 52% { transform: translateY(0); } 58% { transform: translateY(4px); } 70%, 100% { transform: translateY(0); } }
@keyframes cs-go-spark { 0%, 51% { opacity: 0; transform: translateX(126px) scale(.6); } 52% { opacity: 1; transform: translateX(126px) scale(.8); } 75%, 100% { opacity: 0; transform: translateX(126px) scale(2); } }
@keyframes cs-go-left { 0%, 52% { transform: translate(0, 0) rotate(0); } 70% { transform: translate(-12px, -8px) rotate(-6deg); } 100% { transform: translate(-10px, 0) rotate(-4deg); } }
@keyframes cs-go-right { 0%, 52% { transform: translate(0, 0) rotate(0); } 70% { transform: translate(12px, -8px) rotate(6deg); } 100% { transform: translate(10px, 0) rotate(4deg); } }

/* Wide card: scene on the right, text on the left */
@container (min-width: 680px) {
  /* (a container can't style itself, so the text makes room instead of the card padding) */
  body.orbit-v27 .chop-start.has-scene > :not(.chop-scene) { margin-right: 380px; }
  .chop-start.has-scene .chop-scene { position: absolute; right: 24px; top: 50%; margin: -70px 0 0; }
}
/* Phones: shrink the scene so it fits the card (zoom, so the layout shrinks too) */
@container (max-width: 379px) { .chop-start.has-scene .chop-scene { zoom: .84; } }
@container (max-width: 319px) { .chop-start.has-scene .chop-scene { zoom: .74; } }

@media (prefers-reduced-motion: reduce) {
  .chop-scene .cs-strip, .chop-scene .cs-knife, .chop-scene .cs-board,
  .chop-scene .cs-spark, .chop-scene .cs-piece, .chop-scene .cs-chunk { animation: none !important; }
  /* A still picture: the list already chopped, knife resting */
  .chop-scene .cs-piece:nth-child(1) { transform: translateX(-6px); }
  .chop-scene .cs-piece:nth-child(3) { transform: translateX(8px); }
}
