/* Motion and hover behaviour, borrowed from Notion: fast, quiet, everything eases.
   Kept apart from style.css so the look and the feel can be tuned separately. */
/* ---------- motion, borrowed from Notion: fast, quiet, everything eases ---------- */
* { transition-timing-function: var(--ease); }
a, .btn, .nav a, .todo li, .rows li, .tbl tbody tr, .filters a, .chip, .check, .stage, .props dd, .req .card
  { transition-property: background-color, box-shadow, color, border-color, opacity, transform; transition-duration: 80ms; }
.main { animation: page-in 220ms var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Rows and cards rise in one after another as data lands. */
.todo li, .rows li, .tbl tbody tr, .timeline li, .stage, .req .card { animation: rise 260ms var(--ease) both; }
.todo li:nth-child(2), .rows li:nth-child(2), .tbl tbody tr:nth-child(2), .timeline li:nth-child(2), .stage:nth-child(2), .req .card:nth-child(2) { animation-delay: 30ms; }
.todo li:nth-child(3), .rows li:nth-child(3), .tbl tbody tr:nth-child(3), .timeline li:nth-child(3), .stage:nth-child(3), .req .card:nth-child(3) { animation-delay: 60ms; }
.todo li:nth-child(4), .rows li:nth-child(4), .tbl tbody tr:nth-child(4), .timeline li:nth-child(4), .stage:nth-child(4), .req .card:nth-child(4) { animation-delay: 90ms; }
.todo li:nth-child(5), .rows li:nth-child(5), .tbl tbody tr:nth-child(5), .timeline li:nth-child(5), .stage:nth-child(5) { animation-delay: 120ms; }
.todo li:nth-child(n+6), .rows li:nth-child(n+6), .tbl tbody tr:nth-child(n+6), .timeline li:nth-child(n+6), .stage:nth-child(n+6) { animation-delay: 150ms; }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, .main, .todo li, .rows li, .tbl tbody tr, dialog[open] { animation: none !important; transition: none !important; } }

/* The drag handle that only shows when you reach for the row. */
.todo li, .rows li { padding-left: 28px; }
.todo li::before, .rows li::before { content: '⋮⋮'; position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  font-size: 13px; letter-spacing: -2px; color: var(--muted); opacity: 0; transition: opacity 120ms; cursor: grab; }
.todo li:hover::before, .rows li:hover::before { opacity: .55; }
.tbl tbody tr td:first-child { position: relative; }
.tbl tbody tr:hover td:first-child::after { content: '→'; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; opacity: .6; }

/* Checkbox: fills and ticks on hover so it looks pressable, then commits. */
.check { display: grid; place-items: center; color: #fff; font-size: 12px; line-height: 1; }
.check:hover { border-color: var(--ink); background: var(--hover); }
.check.on, .check:active { background: var(--accent); border-color: var(--accent); transform: scale(.94); }
.check.on::after { content: '✓'; }

/* Cards lift a hair when they are clickable. */
.tbl tbody tr:active, .todo li:active, .rows li:active { background: var(--press); }
.stage.pick:hover, .req .card:hover { box-shadow: var(--sh-pop); transform: translateY(-1px); }

/* Skeleton bars while a page loads, instead of the word "Loading". */
.skel { display: block; height: 14px; border-radius: 3px; background: linear-gradient(90deg, var(--tint) 25%, #E6E4DE 37%, var(--tint) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
li.skel-row { display: block; padding: 18px 20px; border-top: 1px solid var(--hair); }
li.skel-row .skel { width: 55%; margin-bottom: 8px; } li.skel-row .skel + .skel { width: 35%; margin: 0; height: 11px; }

/* "Saved" toast, bottom left, like Notion. */
.toast { position: fixed; left: 20px; bottom: 20px; z-index: 50; background: var(--ink); color: #fff; font: 500 13px var(--sans);
  padding: 9px 14px; border-radius: var(--r); box-shadow: var(--sh-pop); opacity: 0; transform: translateY(8px); transition: opacity 160ms, transform 160ms; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }
@media (max-width: 800px) { .toast { left: 16px; right: 16px; bottom: 78px; text-align: center; } }
