/* Proof 4, tasks. The phone, and beside it the paper sheet it retires, the record and "Siby noticed". */
/* The toy's room is kept before it is drawn, so the page below does not jump. */
.js [data-toy='tasks'] { min-height: 1068px; }
@media (min-width: 700px) { .js [data-toy='tasks'] { min-height: 695px; } }
.tk { container-type: inline-size; }
/* On a narrow screen the phone is a little shorter, so its last button stays above the page's own dock. */
@container (max-width: 569px) { .tk .phone { height: 590px; } .tk .phone > .screen { height: 572px; } }
.tk-in { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.tk-phone { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.tk-nudge.still::before { animation: none; }
.tk-side { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; width: 100%; max-width: 350px; align-items: start; }
.tk-noticed { grid-column: 1 / -1; }
@container (min-width: 570px) {
  .tk-in { flex-direction: row; align-items: flex-start; justify-content: center; gap: 24px; }
  .tk-side { display: flex; flex-direction: column; gap: 16px; flex: 1 1 0; min-width: 0; max-width: 292px; padding-top: 36px; }
  .tk-clip { align-self: center; }
}

/* ----- In the phone ----- */
.tk .screen { gap: 9px; }
.tk-lists { display: flex; flex-direction: column; gap: 9px; }
.tk-task.new { animation: tk-land 460ms var(--ease-spring) both; }
@keyframes tk-land { from { opacity: 0; transform: translateY(-14px) scale(0.95); } }
.tk-task.soon { opacity: 0.6; }
.tk-task.soon .ui-check { border-style: dashed; }
.tk-pulse { position: relative; }
.tk-pulse::after { content: ''; position: absolute; inset: -4px; border-radius: 13px; border: 2px solid var(--accent); animation: tk-ring 1.5s var(--ease-out) infinite; pointer-events: none; }
@keyframes tk-ring { from { opacity: 0.9; transform: scale(0.92); } to { opacity: 0; transform: scale(1.4); } }
.ui-row .tk-step { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; margin-top: 7px; }
.tk-step button { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line-control); background: var(--surface); color: var(--text); font: 600 18px/1 var(--sans); transition: transform 140ms var(--ease-spring), background 140ms; }
.tk-step button:active { transform: scale(0.9); background: var(--sunken); }
.tk-step output { min-width: 64px; text-align: center; font: 500 16px/32px var(--mono); color: var(--text); }
.tk-step output.out { color: var(--warn); }
.ui-row .tk-out { display: block; margin-top: 8px; padding: 7px 9px; border-radius: 10px; background: var(--warn-tint); color: var(--warn); font: 400 12px/16px var(--sans); animation: tk-land 300ms var(--ease-spring) both; }
.tk-out strong { display: block; font-weight: 600; }
.tk-thumb { flex: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line-strong); }
.tk-clear { margin-inline: 16px; font: 600 14px/19px var(--sans); color: var(--ok); }
.tk-keep { margin: auto 18px 6px; font: 400 12px/17px var(--sans); color: var(--text-3); }

/* A picture, drawn: three things on a shelf. */
.tk-pic { background:
  radial-gradient(circle at 26% 60%, var(--p-coral) 0 12.5%, transparent 13.5%),
  radial-gradient(circle at 52% 57%, var(--p-butter) 0 15.5%, transparent 16.5%),
  radial-gradient(circle at 77% 61%, var(--p-mint) 0 11.5%, transparent 12.5%),
  linear-gradient(to bottom, var(--p-sky) 0 72%, var(--p-peach-ink) 72% 77%, var(--p-lilac) 77%); }

/* The quiet nudge: a notification, in the app's words. */
.tk-push { position: absolute; z-index: 3; top: 44px; inset-inline: 10px; display: flex; flex-direction: column; gap: 1px; padding: 10px 14px 11px; border-radius: 16px; background: var(--navy); color: var(--on-navy); box-shadow: 0 16px 28px -14px color-mix(in srgb, var(--navy) 80%, transparent); transform: translateY(-150%); opacity: 0; transition: transform 460ms var(--ease-spring), opacity 200ms linear; pointer-events: none; }
.tk-push.on { transform: none; opacity: 1; }
.tk-push b { font: 700 13px/18px var(--sans); color: var(--on-navy); }
.tk-push span { font: 400 13px/18px var(--sans); color: var(--on-navy-2); }

/* The camera. */
.tk-cam { position: absolute; z-index: 4; inset: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 48px 16px 22px; background: var(--night-ground); animation: tk-cam-in 260ms var(--ease-out) both; }
.tk-cam[hidden] { display: none; }
@keyframes tk-cam-in { from { opacity: 0; transform: translateY(24px); } }
.tk-cam-title { font: 600 14px/20px var(--sans); color: var(--on-navy); text-align: center; }
.tk-cam-view { position: relative; flex: 1; width: 100%; border-radius: 18px; overflow: hidden; }
.tk-cam-view .tk-pic { position: absolute; inset: 0; }
.tk-cam-view::before, .tk-cam-view::after { content: ''; position: absolute; z-index: 1; width: 34px; height: 34px; border: 3px solid var(--on-navy); opacity: 0.9; }
.tk-cam-view::before { top: 14px; inset-inline-start: 14px; border-inline-end: 0; border-bottom: 0; border-start-start-radius: 8px; }
.tk-cam-view::after { bottom: 14px; inset-inline-end: 14px; border-inline-start: 0; border-top: 0; border-end-end-radius: 8px; }
.tk-cam-flash { position: absolute; z-index: 2; inset: 0; background: var(--on-navy); opacity: 0; }
.tk-cam.shot .tk-cam-flash { animation: tk-flash 420ms ease-out both; }
@keyframes tk-flash { 0% { opacity: 0; } 18% { opacity: 1; } 100% { opacity: 0; } }
.tk-shutter { width: 64px; height: 64px; border-radius: 50%; background: var(--on-navy); box-shadow: 0 0 0 4px var(--night-ground), 0 0 0 7px var(--on-navy); transition: transform 140ms var(--ease-spring); animation: tk-breathe 1.6s var(--ease-in-out) infinite; }
.tk-shutter:active { transform: scale(0.88); }
@keyframes tk-breathe { 50% { transform: scale(1.07); } }

/* ----- The paper sheet ----- */
.tk-clip { position: relative; width: 132px; transform: rotate(-4deg); transform-origin: 50% 0; animation: tk-sway 5.2s var(--ease-in-out) infinite; }
@keyframes tk-sway { 0%, 100% { transform: rotate(-4.5deg); } 50% { transform: rotate(-1deg); } }
.tk-clip-board { position: relative; padding: 20px 9px 10px; border-radius: 10px; background: var(--p-peach-ink); box-shadow: 0 18px 28px -16px color-mix(in srgb, var(--navy) 70%, transparent); }
.tk-clip-clip { position: absolute; top: -8px; inset-inline: 0; margin-inline: auto; width: 56px; height: 24px; border-radius: 7px 7px 4px 4px; background: var(--line-control); box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--navy) 28%, transparent); }
.tk-clip-paper { padding: 12px 9px 10px; border-radius: 3px; background: var(--surface); }
.tk-clip-paper b { display: block; margin-bottom: 4px; font: 400 11px/13px var(--marker); letter-spacing: 0.02em; text-transform: uppercase; color: var(--text); }
.tk-clip-paper li { display: flex; justify-content: space-between; gap: 6px; border-bottom: 1px solid var(--line-strong); font: 500 15px/21px var(--hand); color: var(--text-2); }
.tk-clip-paper li i { font: 700 16px/21px var(--hand); color: var(--ink); transform: rotate(-6deg); }
.tk-clip-paper em { display: block; margin-top: 7px; font: 700 15px/15px var(--hand); font-style: normal; color: var(--bad); transform: rotate(-3deg); }
.tk-clip-stamp { position: absolute; top: 44%; inset-inline: 0; margin-inline: auto; width: max-content; padding: 5px 9px; border: 2.5px solid var(--bad-solid); border-radius: 7px; background: color-mix(in srgb, var(--surface) 82%, transparent); color: var(--bad-solid); font: 700 16px/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; opacity: 0; transform: rotate(-14deg) scale(0); }
.tk-clip.retired { animation: none; transform: rotate(-8deg) translateY(4px); transition: transform 500ms var(--ease-spring); }
.tk-clip.retired .tk-clip-stamp { opacity: 1; transform: rotate(-14deg); animation: tk-stamp 480ms var(--ease-spring) both; }
@keyframes tk-stamp { 0% { opacity: 0; transform: rotate(-32deg) scale(2.6); } 100% { opacity: 1; transform: rotate(-14deg) scale(1); } }

/* ----- The cards ----- */
.tk-card { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; padding: 14px 15px 13px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 20px 32px -24px color-mix(in srgb, var(--navy) 60%, transparent); }
.tk-cap { font: 600 12px/16px var(--sans); color: var(--text-3); }
.tk-say { font: 600 15px/20px var(--sans); color: var(--text); }
.tk-sub { font: 400 13px/18px var(--sans); color: var(--text-2); }
.tk-foot { font: 400 11px/15px var(--sans); color: var(--text-3); }
.tk-rows { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.tk-rows li { display: flex; align-items: flex-start; gap: 8px; font: 500 13px/18px var(--sans); color: var(--text); }
.tk-rows li.new { animation: tk-land 460ms var(--ease-spring) both; }
.tk-rows .ui-check { width: 18px; height: 18px; border-radius: 6px; }
.tk-rows .ui-check.on::after { width: 8px; height: 4px; }
.tk-rows li > span:not(.ui-check) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tk-rows em { font: 400 12px/16px var(--sans); font-style: normal; color: var(--text-2); }
.tk-rows time { font: 500 12px/18px var(--mono); color: var(--text-2); white-space: nowrap; }
.tk-record { transition: border-color 300ms, box-shadow 300ms; }
.tk-record.full { border-color: var(--ok-solid); box-shadow: 0 0 0 3px var(--ok-tint), 0 20px 32px -24px color-mix(in srgb, var(--navy) 60%, transparent); }

/* With the whole width: more room between the phone and what stands beside it. */
@container (min-width: 860px) { .tk-in { gap: clamp(56px, 8cqw, 110px); } }
