/* My Canvases — the Plan job (founder 2026-10-27: "make this joyful, like animated
   svgs, cursors coming"). A first-run hero once, then the list.
   Born token-only (shell_css_literal_ratchet). Mobile first: 375px is the base,
   wider screens add a column. Every scene keyframe animates FROM an earlier state,
   so the resting styles are the finished frame — that is the reduced-motion view. */

.kcv { display: grid; gap: var(--kk-s-6); min-width: 0; }
.kcv-lead { margin: var(--kk-s-2) 0 0; max-width: 52ch; color: var(--kk-text-soft); font: 400 var(--kk-fs-body) / var(--kk-lh-body) var(--kk-font-ui); }
.kcv-h2 { margin: 0 0 var(--kk-s-2); color: var(--kk-ink); font: 600 var(--kk-fs-title) / var(--kk-lh-title) var(--kk-font-display); }

/* ── create form: one field and a button ─────────────────────────────────── */
.kcv-create { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--kk-s-1); max-width: 32rem; margin-top: var(--kk-s-5); }
.kcv-create-row { display: flex; min-width: 0; flex-wrap: wrap; gap: var(--kk-s-2); }
.kcv-create-row input { flex: 1 1 12rem; width: auto; }

/* ── first-run hero ──────────────────────────────────────────────────────── */
.kcv-hero { display: grid; gap: var(--kk-s-5); align-items: center; }
.kcv-hero .kk-h1 em { color: var(--kk-accent-text); font-style: normal; }
.kcv-stage { overflow: hidden; padding: var(--kk-s-2); border-radius: var(--kk-r-lg); background: var(--kk-fill-soft); }
.kcv-skip-form { margin-top: var(--kk-s-3); }
.kcv-skip {
  padding: 0; border: 0; background: none; cursor: pointer; color: var(--kk-text-soft);
  font: 500 var(--kk-fs-meta) / var(--kk-lh-meta) var(--kk-font-ui); text-decoration: underline; text-underline-offset: 3px;
}
.kcv-skip:hover { color: var(--kk-ink); }
.kcv-skip:focus-visible { outline: 2px solid var(--kk-ink); outline-offset: 2px; border-radius: var(--kk-r-xs); }
.kcv-rise { animation: kcv-rise .7s var(--kk-ease-out) both; }
.kcv-lead.kcv-rise { animation-delay: .12s; }
@keyframes kcv-rise { from { opacity: 0; transform: translateY(12px); filter: blur(6px); } }

@media (min-width: 900px) {
  .kcv-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--kk-s-7); min-height: min(72vh, 42rem); }
  .kcv-stage { order: 2; padding: var(--kk-s-3); }
}

/* ── the scene ───────────────────────────────────────────────────────────── */
.kcv-scene { --kcv-t: 8s; --kcv-wait: .4s; display: block; width: 100%; height: auto; }
.kcv-scene text { fill: currentColor; font: 600 var(--kk-fs-meta) / 1 var(--kk-font-ui); }
.kcv-board { fill: var(--kk-card); stroke: var(--kk-line); }
.kcv-dot { fill: var(--kk-line); }
.kcv-note { filter: drop-shadow(0 2px 3px color-mix(in srgb, var(--kk-ink) 18%, transparent)); }
.kcv-note-idea, .kcv-note-idea rect:first-child { fill: var(--kk-idea); color: var(--kk-on-idea); }
.kcv-note-decision, .kcv-note-decision rect:first-child { fill: var(--kk-decision); color: var(--kk-on-decision); }
.kcv-note-question, .kcv-note-question rect:first-child { fill: var(--kk-question); color: var(--kk-on-question); }
.kcv-ink { fill: currentColor; opacity: .3; }
.kcv-link { fill: none; stroke: var(--kk-text-soft); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.kcv-ring { fill: none; stroke: var(--kk-secondary); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; transform: rotate(-90deg); }
.kcv-click { fill: none; stroke: var(--kk-primary); stroke-width: 2; opacity: 0; }
.kcv-ring, .kcv-click, .kcv-pop-1, .kcv-pop-3, .kcv-drag { transform-box: fill-box; transform-origin: center; }
.kcv-arrow { stroke: var(--kk-card); stroke-width: 1.5; stroke-linejoin: round; }
.kcv-cur-you { color: var(--kk-on-primary); }
.kcv-cur-you .kcv-arrow, .kcv-cur-you .kcv-tag { fill: var(--kk-primary); }
.kcv-cur-ada { color: var(--kk-on-outcome); }
.kcv-cur-ada .kcv-arrow, .kcv-cur-ada .kcv-tag { fill: var(--kk-outcome); }
.kcv-cur-ai { color: var(--kk-on-link); }
.kcv-cur-ai .kcv-arrow, .kcv-cur-ai .kcv-tag { fill: var(--kk-link); }

/* Resting places = the last frame. */
.kcv-cur-you { transform: translate(138px, 216px); }
.kcv-cur-ada { transform: translate(288px, 82px); }
.kcv-cur-ai { transform: translate(300px, 196px); }

/* One pass, then the cursors idle. */
.kcv-cur, .kcv-pop-1, .kcv-pop-3, .kcv-drag, .kcv-link, .kcv-ring, .kcv-click {
  animation-duration: var(--kcv-t); animation-delay: var(--kcv-wait);
  animation-fill-mode: both; animation-timing-function: var(--kk-ease-settle, ease-in-out);
}
.kcv-cur-you { animation-name: kcv-you; }
.kcv-cur-ada { animation-name: kcv-ada; }
.kcv-cur-ai { animation-name: kcv-ai; }
.kcv-pop-1 { animation-name: kcv-pop-1; }
.kcv-pop-3 { animation-name: kcv-pop-3; }
.kcv-drag { animation-name: kcv-drag; }
.kcv-link { animation-name: kcv-link; }
.kcv-ring { animation-name: kcv-ring; }
.kcv-click { animation-name: kcv-click; }
.kcv-idle { animation: kcv-idle 3.2s ease-in-out calc(var(--kcv-t) + var(--kcv-wait)) infinite alternate; }
.kcv-cur-ada .kcv-idle { animation-duration: 2.6s; }
.kcv-cur-ai .kcv-idle { animation-duration: 3.8s; }

/* You glides in and places the first note, then circles a spot. */
@keyframes kcv-you {
  0% { transform: translate(-30px, 290px); opacity: 0; }
  6% { opacity: 1; }
  22%, 64% { transform: translate(126px, 122px); }
  84%, 100% { transform: translate(138px, 216px); }
}
@keyframes kcv-click {
  0%, 21% { opacity: 0; transform: scale(.4); }
  22% { opacity: .9; transform: scale(.4); }
  34%, 100% { opacity: 0; transform: scale(2.4); }
}
@keyframes kcv-pop-1 {
  0%, 22% { opacity: 0; transform: scale(.2); }
  28% { opacity: 1; transform: scale(1.06); }
  32%, 100% { transform: none; }
}
@keyframes kcv-ring { 0%, 68% { stroke-dashoffset: 1; } 84%, 100% { stroke-dashoffset: 0; } }

/* Ada picks up a note that landed low and drags it to the top right. */
@keyframes kcv-ada {
  0%, 14% { transform: translate(420px, 30px); opacity: 0; }
  20% { opacity: 1; }
  34%, 38% { transform: translate(184px, 194px); }
  60%, 100% { transform: translate(288px, 82px); }
}
@keyframes kcv-drag {
  0%, 26% { opacity: 0; transform: translate(-104px, 112px) scale(.2); }
  31% { opacity: 1; transform: translate(-104px, 112px) scale(1.04); }
  34% { transform: translate(-104px, 112px) scale(1); }
  38% { transform: translate(-104px, 112px) scale(1.05); }
  60% { transform: translate(0, 0) scale(1.05); }
  66%, 100% { transform: none; }
}

/* Your AI draws the link between them (following the curve), then adds a question. */
@keyframes kcv-ai {
  0%, 40% { transform: translate(200px, 290px); opacity: 0; }
  46% { opacity: 1; }
  48% { transform: translate(138px, 92px); animation-timing-function: linear; }
  53.5% { transform: translate(164px, 102px); animation-timing-function: linear; }
  59% { transform: translate(186px, 89px); animation-timing-function: linear; }
  64.5% { transform: translate(209px, 73px); animation-timing-function: linear; }
  70% { transform: translate(236px, 78px); }
  80%, 100% { transform: translate(300px, 196px); }
}
@keyframes kcv-link { 0%, 48% { stroke-dashoffset: 1; animation-timing-function: linear; } 70%, 100% { stroke-dashoffset: 0; } }
@keyframes kcv-pop-3 {
  0%, 78% { opacity: 0; transform: scale(.2); }
  84% { opacity: 1; transform: scale(1.06); }
  88%, 100% { transform: none; }
}
@keyframes kcv-idle { to { transform: translate(3px, -4px); } }

/* ── returning: header, then the list ────────────────────────────────────── */
.kcv-head { display: grid; gap: var(--kk-s-4); }
.kcv-head .kcv-create { margin-top: 0; }
@media (min-width: 720px) {
  .kcv-head { grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); align-items: end; }
}

/* Phones: a compact row (thumb left, words right). Wider: a grid of cards. */
.kcv-list { display: grid; gap: var(--kk-s-2); margin: 0; padding: 0; list-style: none; }
.kcv-card {
  display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); grid-template-rows: auto auto; align-content: center;
  column-gap: var(--kk-s-3); row-gap: 0; min-width: 0; padding: var(--kk-s-2);
  border: 1px solid var(--kk-border); border-radius: var(--kk-r-md); background: var(--kk-card);
  color: var(--kk-ink); text-decoration: none;
  transition: transform var(--kk-t-fast) var(--kk-ease-out), box-shadow var(--kk-t-fast) var(--kk-ease-out), border-color var(--kk-t-fast);
}
.kcv-card .kcv-thumb { grid-row: 1 / 3; }
.kcv-card:hover { transform: translateY(-2px); border-color: var(--kk-secondary); box-shadow: var(--kk-shadow-md); }
.kcv-card:focus-visible { outline: 2px solid var(--kk-ink); outline-offset: 2px; }
.kcv-card-title { align-self: end; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 var(--kk-fs-body) / var(--kk-lh-body) var(--kk-font-ui); }
.kcv-card-meta { color: var(--kk-text-soft); font: 400 var(--kk-fs-meta) / var(--kk-lh-meta) var(--kk-font-ui); }
@media (min-width: 560px) {
  .kcv-list { gap: var(--kk-s-3); grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
  .kcv-card { grid-template-columns: minmax(0, 1fr); row-gap: var(--kk-s-1); padding: var(--kk-s-2) var(--kk-s-2) var(--kk-s-3); }
  .kcv-card .kcv-thumb { grid-row: auto; margin-bottom: var(--kk-s-1); }
  .kcv-card-title, .kcv-card-meta { padding: 0 var(--kk-s-1); }
}

.kcv-thumb { display: block; width: 100%; height: auto; }
.kcv-thumb .kcv-board { fill: var(--kk-fill-soft); stroke: none; }
.kcv-thumb-note { transform-box: fill-box; transform-origin: center; transition: rotate var(--kk-t-base) var(--kk-ease-settle, ease-out); }
.kcv-thumb-note.kcv-note-idea { rotate: -4deg; }
.kcv-thumb-note.kcv-note-decision { rotate: 3deg; }
.kcv-thumb-1 .kcv-note-idea { translate: 84px 26px; }
.kcv-thumb-1 .kcv-note-question { translate: -84px -28px; }
.kcv-thumb-2 .kcv-note-decision { translate: -50px 12px; }
.kcv-thumb-2 .kcv-note-question { translate: -10px -32px; }
.kcv-card:hover .kcv-thumb-note { rotate: 0deg; }

.kcv-empty {
  margin: 0; padding: var(--kk-s-5); border: 1px dashed var(--kk-border); border-radius: var(--kk-r-md);
  color: var(--kk-text-soft); text-align: center; font: 400 var(--kk-fs-body) / var(--kk-lh-body) var(--kk-font-ui);
}

.kcv-trash { padding-top: var(--kk-s-5); border-top: 1px solid var(--kk-line); }
.kcv-trash-list { margin: 0; padding: 0; list-style: none; }
.kcv-trash-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--kk-s-1) var(--kk-s-3);
  padding: var(--kk-s-2) 0; border-bottom: 1px solid var(--kk-line);
}
.kcv-trash-title { flex: 1 1 10rem; min-width: 0; color: var(--kk-ink); font: 500 var(--kk-fs-body) / var(--kk-lh-body) var(--kk-font-ui); }
.kcv-trash-row form { margin-left: auto; }

@media (prefers-reduced-motion: reduce) {
  .kcv *, .kcv *::before, .kcv *::after { animation: none !important; transition: none !important; }
  .kcv-card:hover { transform: none; }
}

/* One Canvas uses the shared Board workspace header and overflow menu. */
.kcv-show { min-width: 0; }
