/* The /start assistant ("Ask Projunity") — public/start-assistant.js. Projunity's own tokens (admin.css :root):
   deep navy surfaces, cyan for the assistant, orange only for the trial invitation. A small launcher pill and a
   docked panel on wide screens; a bottom sheet on phones. Nothing here covers the plan cards while closed. */

.pa-launch {
  position: fixed; right: 20px; bottom: 20px; z-index: 900;
  display: inline-flex; align-items: center; gap: 9px; max-width: calc(100vw - 40px);
  background: var(--dark-2); color: var(--text); border: 1px solid rgba(59,191,207,0.45); border-radius: 999px;
  padding: 10px 16px 10px 12px; font-family: 'DM Sans', sans-serif; font-size: 13px; line-height: 1.2;
  box-shadow: 0 6px 22px rgba(0,0,0,0.35); cursor: pointer; text-decoration: none;
}
.pa-launch:hover { border-color: var(--teal); background: var(--dark-3); color: #fff; }
.pa-launch:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.pa-launch strong { color: var(--teal); font-weight: 600; }
.pa-launch-ic { width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(59,191,207,0.14); color: var(--teal); }
.pa-launch-ic svg { width: 15px; height: 15px; }
.pa-launch[hidden] { display: none; }
.pa-launch-short { display: none; }

.pa-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 901;
  width: 384px; height: min(620px, calc(100vh - 40px)); max-width: calc(100vw - 40px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--dark-1); border: 1px solid rgba(59,191,207,0.3); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.5); font-family: 'DM Sans', sans-serif; color: var(--text);
}
.pa-panel[hidden] { display: none; }

.pa-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 14px 12px 16px; border-bottom: 1px solid var(--border); background: var(--dark-2); }
.pa-head-text { flex: 1; min-width: 0; }
.pa-title { font-family: 'Space Grotesk', sans-serif; font-size: 15px; font-weight: 600; color: #fff; margin: 0; }
.pa-subtitle { font-size: 11.5px; color: var(--muted); margin: 2px 0 0; line-height: 1.4; }
.pa-head-btn { background: none; border: 1px solid transparent; color: var(--muted); border-radius: 6px; cursor: pointer;
  font-family: inherit; font-size: 12px; padding: 5px 8px; line-height: 1; white-space: nowrap; }
.pa-head-btn:hover { color: #fff; border-color: var(--border); background: var(--dark-3); }
.pa-head-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.pa-close { font-size: 18px; padding: 3px 8px 5px; }

.pa-log { flex: 1; overflow-y: auto; padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--dark-4) transparent; }
.pa-log::-webkit-scrollbar { width: 8px; } .pa-log::-webkit-scrollbar-thumb { background: var(--dark-4); border-radius: 4px; } .pa-log::-webkit-scrollbar-track { background: transparent; }
.pa-msg { max-width: 88%; font-size: 13.5px; line-height: 1.55; border-radius: 12px; padding: 9px 12px; overflow-wrap: anywhere; }
.pa-msg p { margin: 0 0 7px; } .pa-msg p:last-child { margin-bottom: 0; }
.pa-msg ul { margin: 2px 0 7px; padding-left: 18px; } .pa-msg ul:last-child { margin-bottom: 0; }
.pa-msg li { margin: 2px 0; }
.pa-bot { align-self: flex-start; background: var(--dark-3); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.pa-me  { align-self: flex-end; background: rgba(59,191,207,0.13); border: 1px solid rgba(59,191,207,0.32); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.pa-note { align-self: stretch; font-size: 12.5px; line-height: 1.5; color: var(--muted); background: transparent; border: 1px dashed rgba(255,255,255,0.14); border-radius: 10px; padding: 8px 11px; }
.pa-note.pa-warn { color: #e8c89a; border-color: rgba(224,123,47,0.45); }
.pa-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pa-extras { display: flex; flex-direction: column; gap: 8px; align-self: flex-start; max-width: 88%; }
.pa-link { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: 12.5px; color: var(--teal); text-decoration: none;
  border: 1px solid rgba(59,191,207,0.35); border-radius: 999px; padding: 6px 12px; background: rgba(59,191,207,0.06); }
.pa-link:hover { background: rgba(59,191,207,0.14); color: #fff; }
.pa-cta { border: 1px solid rgba(224,123,47,0.4); border-left: 3px solid var(--orange); background: rgba(224,123,47,0.06); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.5; }
.pa-cta p { margin: 0 0 8px; }
.pa-cta-btn { font-family: 'Space Grotesk', sans-serif; font-size: 12px; font-weight: 600; color: #0e0f11; background: var(--teal); border: none; border-radius: 6px; padding: 7px 14px; cursor: pointer; }
.pa-cta-btn:hover { background: #32a8b7; }
.pa-chips { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; max-width: 100%; }
.pa-chip { font-family: inherit; font-size: 12px; color: var(--text); background: transparent; border: 1px solid rgba(255,255,255,0.14); border-radius: 999px; padding: 5px 11px; cursor: pointer; text-align: left; }
.pa-chip:hover { border-color: var(--teal); color: #fff; }
.pa-link:focus-visible, .pa-cta-btn:focus-visible, .pa-chip:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.pa-typing { display: inline-flex; gap: 4px; align-items: center; padding: 12px 14px; }
.pa-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: paDot 1.2s infinite ease-in-out; }
.pa-typing span:nth-child(2) { animation-delay: 0.15s; } .pa-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes paDot { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pa-typing span { animation: none; opacity: 0.7; } }

.pa-foot { border-top: 1px solid var(--border); padding: 10px 12px 12px; background: var(--dark-2); }
/* Turnstile runs invisibly; this container only takes space if Cloudflare itself shows its box. */
.pa-verify { display: flex; justify-content: center; min-height: 0; }
.pa-verify-note { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.45; margin: 6px 0 8px; }
.pa-verify-problem { border: 1px solid rgba(224,123,47,0.45); border-radius: 10px; padding: 9px 11px; margin-bottom: 8px; font-size: 12.5px; line-height: 1.5; color: #e8c89a; }
.pa-verify-problem p { margin: 0 0 8px; }
.pa-verify-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pa-verify-note[hidden], .pa-verify-problem[hidden] { display: none; }
.pa-verify:empty { display: none; }
.pa-form { display: flex; align-items: flex-end; gap: 8px; }
/* admin.css gives every textarea min-height 120px and a vertical resize handle — not this one-line question box. */
.pa-input { flex: 1; min-width: 0; width: auto; resize: none; min-height: 38px; height: 38px; max-height: 120px; background: var(--dark-1); color: #fff;
  border: 1px solid var(--border); border-radius: 10px; font-family: inherit; font-size: 13.5px; line-height: 1.45; padding: 9px 11px; outline: none; box-shadow: none; overflow-y: hidden; }
.pa-input::placeholder { color: var(--placeholder); }
.pa-input:focus { border-color: rgba(59,191,207,0.55); }
.pa-send { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; border: none; background: var(--teal); color: #0e0f11; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pa-send svg { width: 16px; height: 16px; }
.pa-send:disabled { opacity: 0.45; cursor: default; }
.pa-send:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pa-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--muted-2); margin-top: 6px; min-height: 14px; }
.pa-meta a { color: var(--teal); }
.pa-end { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.pa-form[hidden], .pa-end[hidden], .pa-extras:empty { display: none; }
.pa-end button { margin-top: 8px; }

/* Leave room so the launcher never sits on the last line of the page footer. */
body.pa-has-launcher .pub-footer { padding-bottom: 76px; }

@media (max-width: 560px) {
  .pa-launch { right: 14px; bottom: 14px; padding: 9px 14px 9px 10px; }
  .pa-launch-long { display: none; } .pa-launch-short { display: inline; }
  .pa-panel { left: 0; right: 0; bottom: 0; width: 100%; max-width: 100%; height: 88vh; height: 88dvh; border-radius: 14px 14px 0 0; border-left: none; border-right: none; border-bottom: none; }
  .pa-msg, .pa-extras { max-width: 92%; }
}

/* ── Vincent ─────────────────────────────────────────────────────────────────────────────────────────────── */
.pa-avatar { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(59,191,207,0.95), rgba(59,191,207,0.55)); color: #04121e;
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 15px; margin-top: 1px; }
.pa-pop { padding: 4px 7px; line-height: 0; }
.pa-pop svg { width: 15px; height: 15px; }
@media (max-width: 560px) { .pa-pop { display: none; } }        /* the panel is already full-screen on a phone */

/* ── the pop-out window (/start/assistant): the same panel, filling the window ─────────────────────────── */
body.pa-standalone { margin: 0; background: var(--dark); min-height: 100vh; }
body.pa-standalone .pa-panel { position: static; width: 100%; max-width: none; height: 100vh; height: 100dvh; border: none; border-radius: 0; box-shadow: none; }
body.pa-standalone .pa-log { padding: 18px 18px 8px; }
body.pa-standalone .pa-msg, body.pa-standalone .pa-extras { max-width: min(88%, 640px); }
body.pa-standalone .pa-foot { padding: 12px 16px 16px; }

/* ── framed on a projunity.com page (/start/vincent, opened by public/vincent-embed.js): the same panel, filling the frame.
   The frame is panel-sized on a wide screen, so its own width is no sign of a phone: the page says when it is one
   (body.pa-phone) — and the frame fills the whole window then, as it does while a film plays. ── */
body.pa-framed { margin: 0; background: var(--dark-1); min-height: 100vh; overflow: hidden; }
body.pa-framed .pa-panel { position: static; width: 100%; max-width: none; height: 100vh; height: 100dvh; border: none; border-radius: 0; box-shadow: none; }
body.pa-framed .pa-pop { display: inline-flex; }
body.pa-framed.pa-phone .pa-pop { display: none; }
body.pa-framed .pa-msg, body.pa-framed .pa-extras { max-width: 92%; }

/* What's kept, said under the box whenever conversations are kept (availability `records`). */
.pa-notice { font-size: 10.5px; line-height: 1.45; color: var(--muted-2, rgba(255,255,255,0.45)); margin-top: 6px; }
.pa-notice a { color: var(--muted, rgba(255,255,255,0.6)); text-decoration: underline; text-underline-offset: 2px; }
.pa-notice a:hover { color: var(--teal); }
.pa-notice[hidden] { display: none; }

/* ── embedded in the workspace Help panel (public/help-panel.js): the same panel, filling the panel's body ── */
.pa-root-embedded { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pa-root-embedded .pa-panel { position: static; width: 100%; max-width: none; height: 100%; flex: 1; min-height: 0; border: none; border-radius: 0;
  box-shadow: none; background: transparent; }
.pa-root-embedded .pa-head { background: transparent; padding: 12px 16px 12px 18px; }
.pa-root-embedded .pa-log { padding: 14px 16px 6px; }
.pa-root-embedded .pa-msg, .pa-root-embedded .pa-extras { max-width: 92%; }
.pa-root-embedded .pa-foot { background: transparent; padding: 10px 14px 14px; }
@media (max-width: 560px) { .pa-root-embedded .pa-panel { height: 100%; border-radius: 0; } }
/* the member's links into the workspace, the Contact Support action, and the Help articles an answer drew on */
button.pa-link { font-family: inherit; cursor: pointer; }
.pa-sources { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; align-self: flex-start; max-width: 92%; font-size: 12px; }
.pa-sources-label { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2, rgba(255,255,255,0.45)); }
.pa-source { color: var(--teal); text-decoration: none; border-bottom: 1px dotted rgba(59,191,207,0.5); }
.pa-source:hover { color: #fff; border-bottom-color: #fff; }
.pa-source:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 2px; }

/* "Explore Custom Studio" points the panel out for a moment (public/start-assistant.js goToCustom). */
.pa-spotlight { outline: 2px solid var(--teal, #3BBFCF); outline-offset: 6px; border-radius: 14px; transition: outline-color .6s ease; }
@media (prefers-reduced-motion: reduce) { .pa-spotlight { transition: none; } }

/* ── A film from projunity.com, in a pop-up on this page (public/start-assistant.js openVideo) ── */
.pa-video-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 2px; padding: 7px 12px 7px 9px; border-radius: 999px;
  border: 1px solid rgba(59,191,207,0.45); background: rgba(59,191,207,0.10); color: var(--text-strong, #fff); font: inherit; font-size: 13px; cursor: pointer; }
.pa-video-btn:hover { background: rgba(59,191,207,0.18); }
.pa-video-btn:focus-visible { outline: 2px solid var(--teal, #3BBFCF); outline-offset: 2px; }
.pa-video-play { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--teal, #3BBFCF); color: #0B1622; font-size: 9px; padding-left: 2px; box-sizing: border-box; }
.pa-video-len { color: var(--muted, rgba(255,255,255,0.6)); font-size: 12px; }
.pa-video-dlg { width: min(960px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); padding: 0; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px; background: #0B1622; color: #fff; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,0.6); }
.pa-video-dlg::backdrop { background: rgba(4,9,16,0.82); }
.pa-video-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; }
.pa-video-title { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.3; }
.pa-video-close { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.18); background: transparent;
  color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.pa-video-close:hover { background: rgba(255,255,255,0.08); }
.pa-video-close:focus-visible { outline: 2px solid var(--teal, #3BBFCF); outline-offset: 2px; }
.pa-video-player { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 100px); background: #000; }
@media (max-width: 560px) { .pa-video-dlg { width: calc(100vw - 16px); border-radius: 10px; } }

/* ── A note to the founder, shown in full for approval (public/start-assistant.js founderCard) ── */
.pa-founder { margin: 2px 0 6px; padding: 12px 14px; border: 1px solid rgba(59,191,207,0.35); border-radius: 12px; background: rgba(59,191,207,0.06); max-width: min(88%, 520px); }
.pa-founder-head { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--teal, #3BBFCF); margin-bottom: 6px; }
.pa-founder-msg { white-space: pre-wrap; font-size: 14px; line-height: 1.55; color: var(--text-strong, #fff); }
.pa-founder-meta { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 10px 0 0; font-size: 13px; }
.pa-founder-meta dt { color: var(--muted, rgba(255,255,255,0.6)); }
.pa-founder-meta dd { margin: 0; color: var(--text-strong, #fff); word-break: break-word; }
.pa-founder-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pa-founder-summary-note { margin-top: 10px; font-size: 12px; line-height: 1.45; color: var(--muted, rgba(255,255,255,0.6)); }
.pa-founder-cancel { padding: 7px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.2); background: transparent; color: var(--text-strong, #fff); font: inherit; font-size: 13px; cursor: pointer; }
.pa-founder-done { margin-top: 10px; font-size: 13px; color: var(--teal, #3BBFCF); }
.pa-founder-old { margin-top: 10px; font-size: 12px; color: var(--muted, rgba(255,255,255,0.6)); }

/* ── Vincenzo, the Platform Operations assistant (surface 'ops'): his avatar, "Data used", a change awaiting Confirm ── */
.pa-avatar-ops { background: linear-gradient(135deg, rgba(167,139,250,0.95), rgba(59,191,207,0.75)); font-size: 12.5px; letter-spacing: -.02em; }
.pa-data { align-self: flex-start; max-width: 92%; font-size: 12px; color: var(--muted, rgba(255,255,255,0.6)); }
.pa-data summary { cursor: pointer; color: var(--teal, #3BBFCF); font-size: 11.5px; list-style: revert; }
.pa-data summary:focus-visible { outline: 2px solid var(--teal, #3BBFCF); outline-offset: 2px; border-radius: 2px; }
.pa-data ul { margin: 6px 0 0; padding: 0 0 0 16px; display: flex; flex-direction: column; gap: 5px; }
.pa-data li { line-height: 1.45; }
.pa-data strong { color: var(--text, #CBD5E1); font-weight: 500; }
.pa-data-link { color: var(--teal, #3BBFCF); text-decoration: none; white-space: nowrap; }
.pa-data-link:hover { color: #fff; }
.pa-data-note { font-size: 11px; color: var(--muted-2, rgba(255,255,255,0.45)); margin-top: 2px; }
.pa-proposal { margin: 2px 0 6px; padding: 12px 14px; border: 1px solid rgba(224,192,123,0.45); border-radius: 12px; background: rgba(224,192,123,0.06); max-width: min(92%, 520px); }
.pa-proposal-head { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: #e0c07b; margin-bottom: 6px; }
.pa-proposal-what { font-size: 14px; line-height: 1.5; color: var(--text-strong, #fff); }
.pa-proposal-why { margin-top: 6px; font-size: 12px; line-height: 1.45; color: var(--muted, rgba(255,255,255,0.6)); }
.pa-proposal-done { margin-top: 10px; font-size: 13px; color: var(--teal, #3BBFCF); }

/* Vincenzo's model, under the header: two small toggles (Haiku | Sonnet), the chosen one lit, with a line about it. */
.pa-models { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 7px 16px 8px 18px; border-bottom: 1px solid var(--border); font-size: 11px; color: var(--muted, rgba(255,255,255,0.6)); }
.pa-models[hidden] { display: none; }
.pa-models-label { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2, rgba(255,255,255,0.45)); margin-right: 2px; }
.pa-model { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border, rgba(255,255,255,0.12)); background: transparent; color: var(--muted, rgba(255,255,255,0.6)); font: inherit; font-size: 11.5px; cursor: pointer; }
.pa-model:hover:not(:disabled) { color: #fff; border-color: rgba(167,139,250,0.5); }
.pa-model:focus-visible { outline: 2px solid var(--teal, #3BBFCF); outline-offset: 1px; }
.pa-model:disabled { cursor: default; opacity: .55; }
.pa-model-on { color: #fff; border-color: rgba(167,139,250,0.7); background: rgba(167,139,250,0.16); }
.pa-model-on:disabled { opacity: 1; }
.pa-models-about { flex-basis: 100%; font-size: 10.5px; color: var(--muted-2, rgba(255,255,255,0.45)); line-height: 1.4; }
.pa-answered-by { align-self: flex-start; font-size: 10px; letter-spacing: .04em; color: var(--muted-2, rgba(255,255,255,0.4)); margin: -2px 0 2px 4px; }
.pa-signin-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pa-signin-actions .btn { margin-top: 0; text-decoration: none; }

/* His own window (/admin/ops/vincenzo), kept open through the day: one readable column, centred on a wide screen. */
body.pa-standalone #pa-root[data-surface="ops"] .pa-panel { max-width: 820px; margin: 0 auto; }
@media (min-width: 860px) { body.pa-standalone #pa-root[data-surface="ops"] .pa-panel { border-left: 1px solid var(--border); border-right: 1px solid var(--border); } }
body.pa-standalone #pa-root[data-surface="ops"] .pa-msg, body.pa-standalone #pa-root[data-surface="ops"] .pa-extras { max-width: min(90%, 680px); }
