/* FLUXION Sprint Desk (10-14 demo). A lead desk, not a chat bubble:
   blue pixel-mosaic header, a paper sheet that slides over it, a transcript,
   a brief that fills in as you answer, and a bar meter that shows how close the plan is.
   Grammar: flat brand blue + dot screen, square corners, ink for action, blue only as signal. */

.dk-launch { position: fixed; right: 24px; bottom: 24px; z-index: 90; display: flex; align-items: center; gap: 14px;
  padding: 10px 18px 10px 10px; border: 0; background: var(--ink); color: #FAFAF8; font: inherit; text-align: left; cursor: pointer;
  transition: transform .25s var(--ease), opacity .25s var(--ease); }
.dk-launch:hover .dk-lm i { animation-duration: .9s; }
.dk-launch:active { transform: scale(.97); }
.dk-launch b { display: block; font-weight: 500; font-size: 15px; line-height: 1.2; }
.dk-launch small { display: block; font-family: var(--f-mono); font-size: 11.5px; color: var(--night-faint); letter-spacing: -.01em; }
.dk-lm { display: grid; grid-template-columns: repeat(3, 10px); gap: 2px; padding: 7px; background: var(--brand); }
.dk-lm i { width: 10px; height: 10px; background: #5CB2FF; animation: dk-blink 2.4s steps(1) infinite; animation-delay: calc(var(--i) * -.27s); }
@keyframes dk-blink { 0% { background: #0A3FB0; } 33% { background: #5CB2FF; } 66% { background: #EAF3FF; } }
.dk-open .dk-launch { opacity: 0; transform: translateY(12px); pointer-events: none; }

.dk { position: fixed; right: 24px; bottom: 24px; z-index: 91; width: 404px; height: min(712px, calc(100dvh - 48px));
  display: flex; flex-direction: column; background: var(--canvas); border: 1px solid var(--ink); overflow: hidden;
  clip-path: inset(100% 0 0 100%); visibility: hidden;
  transition: clip-path .55s var(--ease), visibility 0s linear .55s; }
.dk-open .dk { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .55s var(--ease), visibility 0s; }

/* header: live mosaic */
.dk-h { position: relative; flex: none; height: 176px; color: #fff; background: var(--brand); }
.dk-mo { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.dk-h::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(250,250,248,.28) 1px, transparent 1.3px); background-size: 8px 8px; }
.dk-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 18px 20px 0; }
.dk-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; letter-spacing: -.4px; }
.dk-brand img { width: 18px; height: auto; }
.dk-brand em { font-style: normal; font-weight: 400; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0; opacity: .78; }
.dk-time { margin-left: auto; font-family: var(--f-mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.dk-x { width: 32px; height: 32px; margin-right: -8px; border: 0; background: none; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.dk-x:hover { background: rgba(17,17,16,.25); }
.dk-who { position: relative; z-index: 1; padding: 14px 20px 0; }
.dk-who b { display: block; font-weight: 500; font-size: 22px; letter-spacing: -.8px; line-height: 1.15; }
.dk-st { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-family: var(--f-mono); font-size: 12px; opacity: .85; }
.dk-st::before { content: ""; width: 7px; height: 7px; background: #fff; }
.dk-busy .dk-st::before { animation: dk-pulse .7s steps(2) infinite; }
@keyframes dk-pulse { 50% { opacity: .2; } }

/* sheet slides over the mosaic */
.dk-sheet { position: relative; z-index: 2; flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: -36px;
  background: var(--white); transform: translateY(40px); opacity: 0;
  transition: transform .6s var(--ease) .18s, opacity .4s var(--ease) .18s; }
.dk-open .dk-sheet { transform: none; opacity: 1; }

/* brief strip: fills as they answer */
.dk-brief { flex: none; padding: 16px 20px 14px; border-bottom: 1px solid var(--line); }
.dk-bh { display: flex; justify-content: space-between; align-items: baseline; }
.dk-bh b { font-weight: 500; font-size: 15px; letter-spacing: -.3px; }
.dk-bh em { font-style: normal; font-family: var(--f-mono); font-size: 11.5px; color: var(--faint); }
.dk-bv { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.dk-bv span { padding: 3px 7px; font-family: var(--f-mono); font-size: 11.5px; line-height: 1.4; color: var(--faint); background: var(--mist);
  transition: background .3s var(--ease), color .3s var(--ease); }
.dk-bv span.on { background: var(--ink); color: #FAFAF8; animation: dk-pop .45s var(--ease); }
@keyframes dk-pop { from { transform: translateY(4px); opacity: 0; } }

/* transcript */
.dk-log { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 20px 8px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(transparent, #000 28px); mask-image: linear-gradient(transparent, #000 28px); }
.dk-log::-webkit-scrollbar { display: none; }
.dk-m { margin-bottom: 14px; }
.dk-meta { display: block; margin-bottom: 3px; font-family: var(--f-mono); font-size: 11.5px; color: var(--faint); }
.dk-m p { margin: 0; font-size: 15.5px; line-height: 1.45; letter-spacing: -.2px; }
.dk-m p .w { display: inline-block; opacity: 0; transform: translateY(5px); animation: dk-word .5s var(--ease) forwards; animation-delay: calc(var(--w) * 22ms); }
@keyframes dk-word { to { opacity: 1; transform: none; } }
.dk-m.me p { color: var(--body); padding-left: 12px; border-left: 2px solid var(--ink); }
.dk-m.me .dk-meta { padding-left: 14px; }
.dk-typing { display: flex; gap: 4px; padding: 6px 0; }
.dk-typing i { width: 6px; height: 6px; background: var(--ink); animation: dk-dot 1s var(--ease) infinite; animation-delay: calc(var(--i) * .15s); }
@keyframes dk-dot { 0%, 100% { opacity: .15; } 40% { opacity: 1; } }
.dk-m.old { opacity: .45; transition: opacity .4s var(--ease); }

/* plan ticket inside the transcript */
.dk-plan { margin: 4px 0 16px; border: 1px solid var(--ink); animation: dk-pop .6s var(--ease); }
.dk-plan-h { display: flex; justify-content: space-between; padding: 10px 14px; background: var(--ink); color: #FAFAF8; font-size: 14px; }
.dk-plan-h em { font-style: normal; font-family: var(--f-mono); font-size: 11.5px; color: var(--night-faint); }
.dk-plan ol { margin: 0; padding: 0; list-style: none; }
.dk-plan li { display: grid; grid-template-columns: 28px 1fr auto; gap: 2px 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.dk-plan li:first-child { border-top: 0; }
.dk-plan li > span { font-family: var(--f-mono); font-size: 12px; color: var(--faint); }
.dk-plan li b { font-weight: 500; font-size: 15px; }
.dk-plan li strong { font-weight: 400; font-size: 15px; text-align: right; color: var(--brand-deep); }
.dk-plan li small { grid-column: 2 / 4; font-size: 13px; line-height: 1.4; color: var(--body); }
.dk-plan li i { grid-column: 2 / 4; font-style: normal; font-family: var(--f-mono); font-size: 11.5px; color: var(--faint); }
.dk-plan li { opacity: 0; transform: translateY(6px); animation: dk-word .5s var(--ease) forwards; animation-delay: calc(.25s + var(--i) * .16s); }
.dk-plan-f { padding: 10px 14px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--body); }

/* action area: chips, inputs, slots */
.dk-act { flex: none; padding: 4px 20px 12px; }
.dk-act:empty { padding: 0; }
.dk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dk-chip { padding: 9px 12px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font: inherit; font-size: 14px; line-height: 1.2;
  cursor: pointer; opacity: 0; transform: translateY(6px); animation: dk-chip .4s var(--ease) forwards; animation-delay: calc(var(--i) * 45ms);
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease); }
@keyframes dk-chip { to { opacity: 1; transform: none; } }
.dk-chip:hover { border-color: var(--ink); }
.dk-chip:active { background: var(--ink); color: #FAFAF8; }
.dk-chip.ghost { border-style: dashed; color: var(--body); }
.dk-in { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--ink); animation: dk-pop .4s var(--ease); }
.dk-in input { flex: 1; min-width: 0; padding: 12px 0; border: 0; background: none; font: inherit; font-size: 16px; color: var(--ink); outline: none; }
.dk-in input::placeholder { color: var(--faint); }
.dk-err { min-height: 18px; margin-top: 6px; font-size: 12.5px; color: #B42318; }
.dk-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dk-slots > div { display: grid; gap: 6px; }
.dk-slots h4 { margin: 0 0 2px; font-weight: 500; font-size: 13px; }
.dk-slots h4 small { display: block; font-weight: 400; font-family: var(--f-mono); font-size: 11px; color: var(--faint); }
.dk-slots .dk-chip { padding: 8px 0; text-align: center; font-family: var(--f-mono); font-size: 13px; }

/* footer: progress meter + action */
.dk-f { flex: none; padding: 10px 12px 10px 20px; border-top: 1px solid var(--line); background: var(--light); }
.dk-q { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 10px; transition: border-color .25s var(--ease); }
.dk-q:focus-within, .dk-q.need { border-color: var(--ink); }
.dk-q input { flex: 1; min-width: 0; padding: 10px 0; border: 0; background: none; font: inherit; font-size: 16px; color: var(--ink); outline: none; }
.dk-q input::placeholder { color: var(--faint); }
.dk-q.need input::placeholder { color: var(--body); }
.dk-mt { display: flex; align-items: center; gap: 12px; padding: 10px 8px 0 0; }
.dk-n { min-width: 34px; font-family: var(--f-mono); font-size: 12px; color: var(--body); font-variant-numeric: tabular-nums; }
.dk-bars { flex: 1; display: flex; justify-content: space-between; height: 22px; align-items: center; }
.dk-bars s { width: 3px; height: 18px; background: var(--line); transition: background .3s var(--ease), height .3s var(--ease); transition-delay: calc(var(--i) * 18ms); }
.dk-bars s.on { background: var(--ink); }
.dk-bars s.now { background: var(--brand); height: 22px; }
.dk-go { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: var(--ink); cursor: pointer;
  transition: opacity .2s var(--ease), transform .15s var(--ease); }
.dk-go img { width: 16px; height: auto; }
.dk-go:active { transform: scale(.94); }
.dk-go:disabled { opacity: .18; cursor: default; }

/* maker's credit: quiet, never louder than FLUXION */
.dk-by { flex: none; display: block; padding: 0 20px 10px; background: var(--light); font-family: var(--f-mono); font-size: 11px; color: var(--faint); text-align: right; }
.dk-by:hover { color: var(--ink); }

/* confirmation + "what FLUXION receives" */
.dk-ok { margin: 4px 0 16px; padding: 16px 14px; color: #fff; background: var(--brand);
  background-image: radial-gradient(rgba(250,250,248,.26) 1px, transparent 1.3px); background-size: 8px 8px; animation: dk-pop .6s var(--ease); }
.dk-ok small { display: block; font-family: var(--f-mono); font-size: 11.5px; opacity: .85; }
.dk-ok b { display: block; margin-top: 6px; font-weight: 500; font-size: 24px; letter-spacing: -.8px; line-height: 1.15; }
.dk-ok span { display: block; margin-top: 6px; font-size: 13.5px; opacity: .9; }
.dk-lead { margin: 0 0 16px; border: 1px solid var(--line); background: var(--light); font-family: var(--f-mono); font-size: 12px; animation: dk-pop .5s var(--ease); }
.dk-lead p { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); font-family: var(--f-sans); font-size: 13px; }
.dk-lead dl { display: grid; grid-template-columns: 92px 1fr; gap: 6px 10px; margin: 0; padding: 12px 14px; }
.dk-lead dt { color: var(--faint); } .dk-lead dd { margin: 0; color: var(--ink); }
.dk-lead .hot { color: #fff; background: var(--ink); padding: 0 6px; justify-self: start; }

@media (max-width: 560px) {
  .dk { right: 0; bottom: 0; width: 100%; height: 100dvh; border: 0; }
  .dk-launch { right: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .dk, .dk-sheet, .dk-chip, .dk-m p .w, .dk-plan li, .dk-bars s { transition: none !important; animation: none !important; opacity: 1; transform: none; }
}
