/* Saywork Chat: first-run onboarding, the sign-in "task is waiting" note and the memory page.
   Adapted from the landing mock's .lp-flow / .fl-* rules (docs/design/landing/landing.css).
   Every class starts swf- / swm- so nothing collides with the prototype's sheets. */

.swf-flow { position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; overflow: auto; background: var(--paper); animation: swf-fade .2s var(--ease); }
@keyframes swf-fade { from { opacity: 0; } }
/* Sign-in and onboarding are always the light card on the light glow. In dark mode the app
   swaps --graphite/--paper (web.css html[data-theme="dark"]), which left pale text on the white
   card: an unreadable headline and an empty-looking email button on dark-mode phones. */
.swf-flow {
  color-scheme: light; color: #1D2023;
  --graphite: #1D2023; --graphite-2: #2A2E32; --chalk: #EEF0EA; --paper: #FAFBF8;
  --stone: #5E6561; --line: #D6DBD2; --mint-tint: #E1F6EC; --green: #0F7A55; --danger: #B4452F;
}
.swf-flow .lgo.inv { filter: none; }

.swf-glow { position: absolute; left: -20%; right: -20%; bottom: 0; height: 90%; z-index: 0; pointer-events: none; overflow: hidden; }
.swf-glow::before, .swf-glow::after { content: ""; position: absolute; left: 0; right: 0; z-index: 3; }
.swf-glow::before { top: 0; height: 42%; background: linear-gradient(var(--paper), rgba(250, 251, 248, 0)); }
.swf-glow::after { bottom: 0; height: 16%; background: linear-gradient(rgba(250, 251, 248, 0), var(--paper)); }
.swf-glow i { position: absolute; border-radius: 50%; will-change: transform; }
.swf-glow .b1 { left: 0; bottom: -22%; width: 52%; height: 96%; background: radial-gradient(closest-side, rgba(255, 79, 139, .95), rgba(255, 79, 139, .55) 45%, rgba(255, 79, 139, 0)); animation: swf-f1 13s ease-in-out infinite; }
.swf-glow .b2 { right: -2%; bottom: -18%; width: 54%; height: 100%; background: radial-gradient(closest-side, rgba(69, 215, 162, 1), rgba(69, 215, 162, .55) 45%, rgba(69, 215, 162, 0)); animation: swf-f2 15s ease-in-out infinite; }
.swf-glow .b3 { left: 26%; bottom: -34%; width: 44%; height: 80%; background: radial-gradient(closest-side, rgba(255, 140, 181, .95), rgba(255, 140, 181, 0)); animation: swf-f3 11s ease-in-out infinite; }
.swf-glow .b4 { left: 8%; top: 8%; width: 38%; height: 62%; background: radial-gradient(closest-side, rgba(110, 226, 184, .85), rgba(110, 226, 184, 0)); animation: swf-f4 17s ease-in-out infinite; }
.swf-glow .b5 { right: 10%; top: 4%; width: 36%; height: 64%; background: radial-gradient(closest-side, rgba(255, 170, 200, .9), rgba(255, 170, 200, 0)); animation: swf-f5 14s ease-in-out infinite; }
.swf-glow .b6 { left: 44%; top: 22%; width: 30%; height: 56%; background: radial-gradient(closest-side, rgba(69, 215, 162, .75), rgba(69, 215, 162, 0)); animation: swf-f6 12s ease-in-out infinite; }
.swf-glow .halo { left: 50%; top: -8%; z-index: 2; width: 62%; height: 70%; margin-left: -31%; background: radial-gradient(closest-side, var(--paper) 52%, rgba(250, 251, 248, 0)); }
@keyframes swf-f1 { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(38%, -14%); } 66% { transform: translate(14%, 8%); } }
@keyframes swf-f2 { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(-34%, -10%); } 66% { transform: translate(-12%, 10%); } }
@keyframes swf-f3 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-40%, -18%); } }
@keyframes swf-f4 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(70%, 16%); } }
@keyframes swf-f5 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-80%, 14%); } }
@keyframes swf-f6 { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(-90%, 20%); } 66% { transform: translate(60%, 10%); } }

.swf-card { position: relative; z-index: 2; width: min(520px, 100%); padding: 38px 36px 34px; border-radius: 34px; background: #fff; box-shadow: 0 0 0 1px rgba(29, 32, 35, .05), 0 40px 90px -40px rgba(29, 32, 35, .45); overflow: hidden; animation: swf-pop .3s var(--ease-spring); }
@keyframes swf-pop { from { transform: translateY(14px) scale(.97); opacity: 0; } }
.swf-bar { position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--chalk); }
.swf-bar i { display: block; height: 100%; border-radius: 0 3px 3px 0; background: linear-gradient(90deg, #FF4F8B, #45D7A2); transition: width .35s var(--ease); }
.swf-step { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; animation: swf-in .22s var(--ease); }
@keyframes swf-in { from { opacity: 0; transform: translateY(8px); } }
.swf-step h2 { margin-top: 4px; font: 800 34px/1.04 var(--display); letter-spacing: -.04em; }
.swf-step > p { max-width: 38ch; color: var(--stone); font-size: 16.5px; line-height: 1.45; }
.swf-go { width: 100%; height: 56px; margin-top: 10px; border-radius: 999px; justify-content: center; text-decoration: none; }
.swf-go img, .swf-go svg { width: 20px; height: 20px; }
.swf-skip { border: 0; background: none; padding: 8px; font: 600 15px/1 var(--ui); color: var(--stone); cursor: pointer; }
.swf-skip:hover { color: var(--graphite); }
.swf-pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.swf-pick button { height: 42px; padding: 0 17px; border: 0; border-radius: 999px; background: var(--chalk); font: 600 15px/1 var(--ui); color: var(--graphite); cursor: pointer; transition: background .15s, color .15s, transform .2s var(--ease-spring); }
.swf-pick button:hover { transform: translateY(-2px); }
.swf-pick button[aria-pressed="true"] { background: var(--graphite); color: var(--paper); }
.swf-ic { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 26px; background: var(--chalk); }
.swf-job { padding: 12px 16px; border-radius: 18px; background: #E1F6EC; color: var(--graphite) !important; font-weight: 600; font-size: 15px !important; }

/* where each source stands (onboarding and the Memory page) */
.swf-srcs { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.swf-s { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-radius: 16px; background: var(--chalk); text-align: start; }
.swf-s b { font-size: 14.5px; }
.swf-s span { font-size: 13px; font-weight: 600; color: var(--stone); }
.swf-s.ok span { color: var(--green); }
.swf-s.warn span { color: #B4452F; }
.swf-s.run span { color: var(--graphite); animation: swf-pulse 1.2s ease-in-out infinite; }
@keyframes swf-pulse { 50% { opacity: .45; } }
.swf-noext { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; padding: 16px; border-radius: 18px; background: var(--chalk); text-align: center; }
.swf-noext span { color: var(--stone); font-size: 14px; }
.swf-noext a { text-decoration: none; }

/* the sign-in screens: the task that is waiting */
.swf-wait { display: flex; flex-direction: column; gap: 4px; width: 100%; max-width: 440px; padding: 12px 16px; border-radius: 18px; background: #E1F6EC; color: var(--graphite); text-align: start; }
.swf-wait b { font-size: 13px; color: var(--green); }
.swf-wait span { font-weight: 600; overflow-wrap: anywhere; }
.swf-auth .swf-wait { max-width: none; }
.swf-gbtn, .swf-obtn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 56px; border: 0; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); font: 700 16px/1 var(--ui); color: var(--graphite); cursor: pointer; transition: background .15s, box-shadow .15s, transform .2s var(--ease-spring); }
.swf-gbtn { margin-top: 10px; background: var(--graphite); color: var(--paper); box-shadow: none; }
.swf-gbtn img { background: #fff; border-radius: 50%; padding: 3px; box-sizing: content-box; width: 18px; height: 18px; }
.swf-gbtn svg, .swf-obtn svg { width: 20px; height: 20px; }
.swf-gbtn:hover { transform: translateY(-2px); }
.swf-obtn:hover { box-shadow: inset 0 0 0 1.5px var(--graphite); }
.swf-gbtn:disabled, .swf-obtn:disabled { opacity: .6; cursor: default; }
.swf-email { width: 100%; height: 56px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--chalk); font: 600 16px/1 var(--ui); color: var(--graphite); text-align: center; outline: 0; }
.swf-email:focus { box-shadow: inset 0 0 0 1.5px var(--graphite); }
.swf-err { color: var(--danger, #B4452F) !important; font-size: 14.5px !important; }
.swf-fine { max-width: none !important; margin-top: 4px; font-size: 13px !important; color: var(--stone); }
.swf-fine a { color: inherit; text-decoration: underline; }

/* the logo as a link home */
.swf-home { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; min-width: 0; }

/* the Memory page */
.swm-row { display: flex; align-items: flex-start; gap: 8px; }
.swm-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.swm-row .ibtn { flex: none; opacity: .55; }
.swm-row:hover .ibtn, .swm-row .ibtn:focus-visible { opacity: 1; }
.swf-page .swf-srcs { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* paste import: copy the prompt, paste into any assistant, paste the answers back */
.swf-paste { width: 100%; padding: 12px; border-radius: 18px; background: var(--chalk); text-align: start; }
.swf-paste h3 { margin: 0 0 8px; font-size: 15px; }
.swf-paste ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.swf-paste li { display: flex; align-items: flex-start; gap: 10px; }
.swf-paste li > i { flex: none; display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: var(--graphite); color: var(--paper); font: 700 12px/1 var(--ui); font-style: normal; }
.swf-paste li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.swf-paste b { font-size: 14px; line-height: 1.3; }
.swf-paste textarea { width: 100%; min-height: 84px; max-height: 160px; padding: 10px 12px; border: 0; border-radius: 12px; background: #fff; font: 500 14px/1.35 var(--ui); color: var(--graphite); resize: vertical; outline: 0; box-sizing: border-box; }
.swf-paste textarea:focus { box-shadow: inset 0 0 0 1.5px var(--graphite); }
.swf-paste .btn.ok { background: #E1F6EC; color: var(--green); }
.swf-addm { width: 100%; height: 46px; margin-top: 10px; border-radius: 999px; justify-content: center; }
.swf-pmsg { margin: 8px 0 0; font-size: 13.5px; font-weight: 600; color: var(--stone); text-align: center; }
.swf-pmsg.ok { color: var(--green); }
.swf-pmsg.warn { color: #B4452F; }
.swf-page .swf-paste { max-width: 560px; margin-bottom: 14px; }

@media (max-width: 760px) {
  .swf-flow { justify-content: flex-start; padding: 56px 12px 12px; gap: 8px; }
  .swf-card { padding: 22px 16px; border-radius: 28px; max-height: calc(100vh - 76px); max-height: calc(100dvh - 76px); overflow-y: auto; overscroll-behavior: contain; }
  .swf-step { gap: 8px; }
  .swf-step .mascot { width: 56px !important; height: 56px !important; }
  .swf-step h2 { margin-top: 0; font-size: 24px; }
  .swf-step > p { font-size: 15px; line-height: 1.35; }
  .swf-ic { width: 56px; height: 56px; border-radius: 18px; }
  .swf-ic img { width: 32px; height: 32px; }
  .swf-go { height: 50px; margin-top: 4px; }
  .swf-pick { gap: 8px; margin-top: 2px; }
  .swf-pick button { height: 38px; padding: 0 14px; font-size: 14px; }
  .swf-skip { padding: 4px; }
  .swf-srcs { grid-template-columns: 1fr 1fr; gap: 6px; }
  .swf-s { padding: 8px 10px; border-radius: 12px; }
  .swf-paste textarea { min-height: 72px; max-height: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  .swf-glow i, .swf-s.run span { animation: none; }
}

/* "Import your memory" — on the home screen and the phone chat list until any memory exists.
   In-app, so it follows the theme's variables (dark mode included). */
.swf-remind { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 640px; margin: 14px auto 0; padding: 12px 14px; border: 0; border-radius: 20px; background: var(--chalk); color: var(--graphite); text-align: start; cursor: pointer; font: inherit; }
.swf-remind:hover { box-shadow: inset 0 0 0 1.5px var(--line); }
.swf-remind .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.swf-remind b { font-size: 15px; }
.swf-remind small { color: var(--stone); font-size: 13px; line-height: 1.35; }
.swf-remind svg.i { width: 18px; height: 18px; color: var(--stone); flex: none; }
.swf-remind.ps { margin: 10px 0 4px; max-width: none; }

/* The business step (onboarding.js, 2026-11-27) */
.swf-biz input,.swf-biz textarea{width:100%;border:1px solid var(--line);border-radius:12px;padding:10px 12px;font:inherit;font-size:15px;margin-top:8px;background:var(--paper,#fff)}
.swf-biz-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.swf-biz-row label{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:12px;padding:0 10px;margin-top:8px}
.swf-biz-row label input{border:0;margin:0;padding:10px 0}

/* Before Kit pays or books: the confirmation card, the code box, "What Kit did", and the plain
   promises on Integrations (api cloudworkspace/confirm.ts, views.js confirmCard/didCard). */
.sw-confirm h4 { margin: 0 0 10px; }
.sw-cpic { display: block; margin: 0 0 12px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--chalk); }
.sw-cpic img { display: block; width: 100%; max-height: 320px; object-fit: cover; object-position: top; }
.sw-crows { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 10px; font-size: 14px; }
.sw-crows dt { color: var(--stone); }
.sw-crows dd { margin: 0; color: var(--graphite); overflow-wrap: anywhere; }
.sw-crows dd.bad { color: var(--danger, #B4452F); font-weight: 600; }
.sw-crows dd.total { font-weight: 700; }
.sw-clink { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--graphite); text-decoration: underline; margin: 0 0 12px; }
.sw-clink svg { width: 14px; height: 14px; }
.sw-confirm .sw-yes { background: var(--green, #0F7A55); border-color: var(--green, #0F7A55); color: #fff; }
.sw-cnote { margin: 10px 0 0; font-size: 12px; color: var(--stone); }
.sw-code { width: 100%; box-sizing: border-box; font: 600 22px ui-monospace, monospace; letter-spacing: 4px; padding: 10px 12px; margin: 4px 0 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--graphite); }
@media (max-width: 520px) { .sw-crows { grid-template-columns: 1fr; gap: 2px; } .sw-crows dd { margin-bottom: 6px; } }

.sw-did { margin: 8px 0 0; border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; font-size: 13px; background: var(--paper); }
.sw-did summary { cursor: pointer; display: flex; align-items: center; gap: 6px; color: var(--stone); font-weight: 600; list-style: none; }
.sw-did summary::-webkit-details-marker { display: none; }
.sw-did summary svg { width: 15px; height: 15px; }
.sw-did ul { margin: 8px 0 2px; padding: 0 0 0 16px; display: grid; gap: 6px; }
.sw-did .sw-dk { color: var(--stone); }
.sw-did q { color: var(--graphite); font-style: italic; }
.sw-did .sw-dok { color: var(--green, #0F7A55); white-space: nowrap; }
.sw-did .sw-dok svg { width: 12px; height: 12px; vertical-align: -1px; }
.sw-did .sw-dno { color: var(--danger, #B4452F); white-space: nowrap; }

.sw-promise { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 18px; padding: 14px 16px; }
.sw-promise b { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.sw-promise b svg { width: 15px; height: 15px; }
.sw-promise ul { margin: 6px 0 0; padding: 0 0 0 18px; font-size: 13px; color: var(--stone); display: grid; gap: 3px; }
@media (max-width: 640px) { .sw-promise { grid-template-columns: 1fr; } }
.swm-forget { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 18px; }
.swm-forget small { color: var(--stone); }
.sw-needext h4 { display: flex; align-items: center; gap: 8px; }
.sw-needext h4 img, .sw-needext h4 .lg, .sw-needext h4 svg { width: 18px; height: 18px; flex: none; margin: 0; }
