/* 21st.dev: Agent Chat (7974, Error 12404), Thought Chain (29416),
   Feedback Bar (26536); product chip from Larsen Border Beam demo (21703). Source dimensions and motion
   are retained; colors and typography inherit the Fusion design tokens. */
.assist-page .assist-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  padding: 10px 16px;
  border: 2px solid var(--fusion-accent, #2b6cb0);
  border-radius: 8px;
  background: var(--card, #fff);
  color: var(--text, #111827);
  font-weight: 600;
  transform: translateY(calc(-100% - 24px));
}
.assist-page .assist-skip-link:focus {
  transform: none;
  outline: 2px solid var(--fusion-accent, #2b6cb0);
  outline-offset: 3px;
}
.assist-page #assistMain:focus-visible {
  outline: 2px solid var(--fusion-accent, #2b6cb0);
  outline-offset: -2px;
}
.assist-page .assist-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
body.assist-page.fusion-21st {
  --bg: var(--ui-bg);
  --card: var(--ui-bg);
  --bg-secondary: var(--ui-muted);
  --text: var(--ui-fg);
  --text-secondary: var(--ui-secondary);
  --text-muted: var(--ui-secondary);
  --border: var(--ui-line);
}
body.assist-page.fusion-21st .app-content {
  display: flex;
  flex: 1;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
body.assist-page.fusion-21st .chat-main {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: var(--bg);
  font-family: var(--fusion-font, Inter, sans-serif);
}
body.assist-page.fusion-21st .chat-feed {
  flex: 1 1 0;
  min-height: 0;
  height: auto;
  padding: 24px 16px;
  overflow-x: hidden;
  overflow-y: auto;
}
body.assist-page.fusion-21st .chat-main .messages {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  width: 100%;
  max-width: 640px;
  height: auto;
  min-height: 0;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
}
body.assist-page.fusion-21st .chat-main .messages--empty { display: none; }
body.assist-page.fusion-21st .messages .msg {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  line-height: 1.625;
  animation: none;
  overflow-wrap: anywhere;
}
body.assist-page.fusion-21st .messages .msg::before,
body.assist-page.fusion-21st .messages .msg::after { display: none; }
body.assist-page.fusion-21st .messages .msg.user {
  align-self: flex-end;
  max-width: 80%;
  padding: 8px 14px;
  border-radius: 16px;
  background: var(--bg-secondary, #f5f5f5);
  color: var(--text);
  line-height: 20px;
  white-space: pre-wrap;
}
body.assist-page.fusion-21st .messages .msg.assistant {
  align-self: flex-start;
  width: 90%;
  max-width: 90%;
  padding: 0;
  color: var(--text-secondary);
}
body.assist-page.fusion-21st .messages .msg.assistant > .msg-body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  filter: none;
  opacity: 1;
  transform: none;
  transition: none;
}
/* Keep the answer visibly distinct from request progress in both themes. */
body.assist-page.fusion-21st .msg.assistant > .assist-answer-heading {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}
body.assist-page.fusion-21st .assist-thought-panel + .assist-answer-heading {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
body.assist-page.fusion-21st .msg.assistant > :is(.assist-speak-btn, .source-badge) { align-self: flex-start; }
body.assist-page.fusion-21st .msg.assistant > :is(.sources-wrap, .screenshots-wrap, .assist-follow-ups, .curator-row) { margin-top: 0; }

/* Agent Chat ErrorBubble: px-4 py-2.5, 8px radius, 14px text. */
body.assist-page.fusion-21st .messages .msg.assist-error-message { width: auto; max-width: 100%; }
.assist-page.fusion-21st .assist-error-card {
  padding: 10px 16px;
  border: 1px solid color-mix(in srgb, var(--danger, #ef4444) 30%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--danger, #ef4444) 10%, transparent);
  font-size: 14px;
  line-height: 20px;
}
.assist-page.fusion-21st .assist-error-title { color: var(--text); font-weight: 500; }
.assist-page.fusion-21st .assist-error-detail { margin-top: 2px; color: var(--text-secondary); white-space: pre-wrap; }
.assist-page.fusion-21st .assist-retry { margin-top: 8px; padding: 0; border: 0; color: var(--fusion-accent, #2b6cb0); background: transparent; font: inherit; text-align: left; cursor: pointer; }

/* Agent Chat InputBar: 640px, 16px radius, 120px textarea, 32px actions. */
body.assist-page.fusion-21st .chat-main .composer {
  position: static;
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 12px 12px;
  border: 0;
  background: transparent;
}
body.assist-page.fusion-21st .composer .composer-gpt {
  display: block;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 0 0 1px var(--border);
  cursor: text;
}
.assist-page.fusion-21st .assist-input-field { min-height: 44px; padding: 12px 12px 0 14px; }
body.assist-page.fusion-21st .composer #input {
  display: block;
  width: 100%;
  min-height: 22.4px;
  max-height: 120px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  resize: none;
  overflow-y: hidden;
}
body.assist-page.fusion-21st .composer #input::placeholder { color: var(--text-muted, #a3a3a3); }
.assist-page.fusion-21st .assist-input-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 8px 8px; }
.assist-page.fusion-21st .assist-input-tools { display: flex; align-items: center; gap: 4px; min-width: 0; }
body.assist-page.fusion-21st .composer :is(.composer-icon-btn, .composer-send-btn) {
  display: inline-flex;
  position: static;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0 !important;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  transform: none;
  text-indent: 0;
  cursor: pointer;
}
body.assist-page.fusion-21st .composer .composer-icon-btn { color: var(--text-secondary); background: transparent; transition: color 150ms, background-color 150ms; }
body.assist-page.fusion-21st .composer #micBtn { display: inline-flex; }
body.assist-page.fusion-21st .composer .composer-icon-btn:hover { background: var(--bg-secondary, #f5f5f5); }
body.assist-page.fusion-21st .composer .composer-icon-btn.is-recording { color: var(--danger, #ef4444); background: color-mix(in srgb, var(--danger, #ef4444) 10%, transparent); }
body.assist-page.fusion-21st .composer .composer-send-btn { color: white; background: var(--fusion-accent, #2b6cb0) !important; transition: all 150ms; }
body.assist-page.fusion-21st .composer .composer-send-btn:disabled { color: var(--text-muted, #a3a3a3); background: var(--bg-secondary, #e5e5e5) !important; opacity: 1; cursor: default; }
body.assist-page.fusion-21st .composer .composer-send-btn::after { display: none; }
.assist-page.fusion-21st :is(button, a, summary):focus-visible { outline: 2px solid var(--fusion-accent, #2b6cb0); outline-offset: 3px; }
body.assist-page.fusion-21st .composer-gpt:has(#input:focus-visible) { box-shadow: 0 0 0 2px var(--fusion-accent, #2b6cb0); }
.assist-page.fusion-21st .assist-active-scope { width: 100%; max-width: 640px; margin: 8px auto 0; padding: 0 4px; color: var(--text-secondary); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
.assist-page.fusion-21st .assist-source-summary { margin: 12px 0 4px; color: var(--text-secondary); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
.assist-page.fusion-21st .assist-source-version { margin: 4px 0; color: var(--text-secondary); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }

/* Initial composition requested by the user: title, centered composer, questions. */
body.assist-page.fusion-21st [hidden] { display: none !important; }
body.assist-page.fusion-21st .chat-main.is-start { overflow-y: auto; padding: 24px 0; }
body.assist-page.fusion-21st .chat-main.is-start .chat-feed { display: none; }
.assist-page.fusion-21st .assist-start-heading { flex: 0 0 auto; width: 100%; margin: auto auto 24px; padding: 0 20px; text-align: center; }
.assist-page.fusion-21st .assist-start-heading h1 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 500; letter-spacing: -0.025em; }
body.assist-page.fusion-21st .chat-main.is-start .composer { padding-bottom: 0; }
body.assist-page.fusion-21st .session-list li { background: transparent !important; border: 0 !important; box-shadow: none !important; }
body.assist-page.fusion-21st .session-list li:is(:hover, .active) { background: var(--bg-secondary) !important; }
body.assist-page.fusion-21st .session-product { background: transparent !important; border: 0 !important; color: var(--text-secondary) !important; box-shadow: none !important; }
.assist-page.fusion-21st .assist-suggestions { flex: 0 0 auto; width: calc(100% - 40px); max-width: 620px; margin: 24px auto auto; padding: 0; }
.assist-page.fusion-21st .assist-suggestions .chips-list { display: flex; flex-direction: column; gap: 4px; margin: 0; }
body.assist-page.fusion-21st .assist-suggestions .chip { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; margin: 0; padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; color: var(--text-secondary); font: inherit; font-size: 13px; line-height: 20px; text-align: left; white-space: normal; cursor: pointer; }
.assist-page.fusion-21st .assist-suggestions .chip:hover { background: var(--bg-secondary); color: var(--text); }
.assist-page.fusion-21st .assist-suggestions .chip-ico { display: inline-flex; flex: 0 0 16px; width: 16px; height: 16px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--text-muted); }
.assist-page.fusion-21st .assist-suggestions .chip-ico svg { width: 16px; height: 16px; }
.assist-page.fusion-21st .assist-suggestions .chip-arrow { display: none; }
.assist-page.fusion-21st .assist-suggestions .chip-text { flex: 1; white-space: normal; overflow-wrap: anywhere; }

/* Larsen Agent/Auto chip: 24px high, 36px radius, 12/14px text, 4px gap. */
.assist-page.fusion-21st .assist-product-dropdown { position: relative; min-width: 0; max-width: min(320px, 65vw); }
body.assist-page.fusion-21st .composer .assist-product-trigger { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; height: 24px; min-height: 24px; padding: 0 6px 0 8px; border: 0; border-radius: 36px; background: var(--bg-secondary); box-shadow: inset 0 0 0 1px var(--border); color: var(--text-secondary); font: inherit; font-size: 12px; line-height: 14px; cursor: pointer; }
.assist-page.fusion-21st #assistProductLabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assist-page.fusion-21st .assist-product-trigger svg { flex-shrink: 0; opacity: 0.6; }
.assist-page.fusion-21st .assist-product-trigger:hover, .assist-page.fusion-21st .assist-product-trigger[aria-expanded="true"] { color: var(--text); background: var(--ui-accent-soft, var(--bg-secondary)); }
.assist-page.fusion-21st .assist-product-trigger:disabled { opacity: 0.5; cursor: default; }
body.assist-page.fusion-21st .composer .composer-gpt { overflow: visible; }
body.assist-page.fusion-21st .assist-product-picker { position: absolute; z-index: 40; bottom: calc(100% + 8px); left: 0; width: min(280px, calc(100vw - 64px)); max-height: min(260px, 40dvh); margin: 0; padding: 4px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--card); box-shadow: 0 8px 24px rgb(0 0 0 / 0.12); }
body.assist-page.fusion-21st .assist-product-picker [role="menuitemcheckbox"] { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 36px; margin: 0; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 13px; line-height: 20px; text-align: left; cursor: pointer; }
.assist-page.fusion-21st .assist-product-picker [role="menuitemcheckbox"]:is(:hover, :focus-visible) { background: var(--bg-secondary); outline-offset: -2px; }
.assist-page.fusion-21st .assist-product-check { visibility: hidden; color: var(--fusion-accent); }
.assist-page.fusion-21st [aria-checked="true"] .assist-product-check { visibility: visible; }
.assist-page.fusion-21st .assist-product-status { margin: 8px; font-size: 13px; color: var(--text-secondary); }
.assist-page.fusion-21st .login-welcome-card:not([hidden]) { flex-shrink: 0; width: calc(100% - 32px); max-width: 640px; margin: 16px auto 0; }
@media (max-width: 640px) {
  .assist-page.fusion-21st .assist-start-heading h1 { font-size: 22px; }
  .assist-page.fusion-21st .assist-suggestions { margin-top: 16px; }
}

/* Thought Chain: gap-3.5, size-5 status, 0.75s spinner, 0.22s disclosure. */
.assist-page.fusion-21st .assist-thought-panel { width: 100%; }
body.assist-page.fusion-21st .assist-thought-toggle { display: inline-flex; align-items: center; min-height: 32px; margin: 0 0 4px; padding: 4px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--text-secondary); font: inherit; font-size: 13px; line-height: 20px; cursor: pointer; }
.assist-page.fusion-21st .assist-thought-panel[data-collapsed="true"] .assist-thought-toggle { margin: 0; }
.assist-page.fusion-21st .assist-thought-toggle:hover { color: var(--text); }
.assist-page.fusion-21st .assist-request-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.assist-page.fusion-21st .assist-request-status svg { width: 20px; height: 20px; animation: assist-chain-spin 750ms linear infinite; }
.assist-page.fusion-21st .thought-chain { width: 100%; }
.assist-page.fusion-21st .thought-step { display: flex; gap: 14px; }
.assist-page.fusion-21st .thought-step-track { display: flex; flex: 0 0 20px; flex-direction: column; align-items: center; }
.assist-page.fusion-21st .thought-step-icon { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-top: 2px; color: var(--fusion-accent, #2b6cb0); }
.assist-page.fusion-21st .thought-step[data-status="active"] .thought-step-icon { animation: assist-chain-spin 750ms linear infinite; }
.assist-page.fusion-21st .thought-step[data-status="done"] .thought-step-icon { border-radius: 50%; background: var(--success, #16a34a); color: white; }
.assist-page.fusion-21st .thought-step[data-status="done"] .thought-step-icon svg { width: 12px; height: 12px; stroke-width: 3; }
.assist-page.fusion-21st .thought-step-line { flex: 1; width: 2px; min-height: 20px; margin-top: 6px; border-radius: 2px; background: color-mix(in srgb, var(--fusion-accent, #2b6cb0) 25%, transparent); }
.assist-page.fusion-21st .thought-step[data-status="done"] .thought-step-line { background: color-mix(in srgb, var(--success, #16a34a) 30%, transparent); }
.assist-page.fusion-21st .thought-step[data-status="interrupted"] .thought-step-icon { color: var(--text-muted); }
.assist-page.fusion-21st .thought-step-main { flex: 1; min-width: 0; padding-bottom: 8px; }
.assist-page.fusion-21st .thought-step-trigger { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; border: 0; background: transparent; color: var(--text-secondary); text-align: left; cursor: pointer; }
.assist-page.fusion-21st .thought-step-label { font-size: 13.5px; font-weight: 600; line-height: 20px; letter-spacing: -0.025em; }
.assist-page.fusion-21st .thought-step[data-status="active"] .thought-step-label { color: var(--text); }
/* OdysseyUI ShimmerText: 1s sweep + 0.5s repeat delay, text.length * 2px spread. */
.assist-page.fusion-21st .thought-step-shimmer { position: relative; display: inline-block; background-image: linear-gradient(90deg, transparent calc(50% - var(--spread)), var(--text), transparent calc(50% + var(--spread))), linear-gradient(var(--text-secondary), var(--text-secondary)); background-size: 250% 100%, auto; background-repeat: no-repeat; background-position: 100% center; background-clip: text; -webkit-background-clip: text; color: transparent; opacity: 0; }
.assist-page.fusion-21st .thought-step-shimmer.is-in-view { animation: assist-chain-shimmer 1500ms linear infinite, assist-chain-shimmer-opacity 300ms forwards; }
.assist-page.fusion-21st .thought-step-chevron { display: flex; width: 14px; height: 14px; color: var(--text-muted); transition: transform 200ms ease-in-out; }
.assist-page.fusion-21st .thought-step-chevron svg { width: 14px; height: 14px; }
.assist-page.fusion-21st .thought-step-trigger[aria-expanded="true"] .thought-step-chevron { transform: rotate(180deg); }
.assist-page.fusion-21st .thought-step-badge { padding: 2px 10px; border: 1px solid color-mix(in srgb, var(--fusion-accent, #2b6cb0) 30%, var(--border)); border-radius: 999px; background: color-mix(in srgb, var(--fusion-accent, #2b6cb0) 8%, var(--card)); color: var(--fusion-accent, #2b6cb0); font-size: 12px; font-weight: 600; line-height: 16px; }
.assist-page.fusion-21st .thought-step-content { display: grid; grid-template-rows: 1fr; opacity: 1; transition: grid-template-rows 220ms ease-in-out, opacity 220ms ease-in-out; }
.assist-page.fusion-21st .thought-step-content.is-collapsed { grid-template-rows: 0fr; opacity: 0; }
.assist-page.fusion-21st .thought-step-content > div { overflow: hidden; }
.assist-page.fusion-21st .thought-step-items { margin-top: 4px; padding-left: 2px; }
.assist-page.fusion-21st .thought-step-item { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; animation: assist-chain-item 300ms ease-out both; }
.assist-page.fusion-21st .thought-step-item::before { content: ""; flex: 0 0 4px; width: 4px; height: 4px; margin-top: 7px; border-radius: 50%; background: var(--text-muted); }
.assist-page.fusion-21st .thought-step-item span { font-size: 13px; line-height: 1.55; color: var(--text-secondary); }
@keyframes assist-chain-spin { to { transform: rotate(360deg); } }
@keyframes assist-chain-item { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes assist-chain-shimmer { 0% { background-position: 100% center; } 66.6667%, 100% { background-position: 0% center; } }
@keyframes assist-chain-shimmer-opacity { to { opacity: 1; } }

/* Feedback Bar: 12px radius, py-3 pl-4, 32px votes, p-3 close. */
body.assist-page.fusion-21st .messages .feedback-row { display: inline-flex; align-self: flex-start; flex-direction: column; align-items: stretch; max-width: 100%; gap: 0; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--card); font-size: 14px; line-height: 20px; }
.assist-page.fusion-21st .feedback-bar { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.assist-page.fusion-21st .feedback-label-wrap { display: flex; flex: 1; align-items: center; gap: 16px; padding: 12px 0 12px 16px; }
.assist-page.fusion-21st .feedback-label { margin: 0; color: var(--text); font-size: 14px; font-weight: 500; }
.assist-page.fusion-21st .feedback-votes { display: flex; align-items: center; justify-content: center; gap: 2px; padding: 0 12px; }
body.assist-page.fusion-21st .feedback-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; min-width: 32px; min-height: 32px; margin: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--text-secondary); transition: color 150ms; cursor: pointer; }
.assist-page.fusion-21st .feedback-btn svg { width: 16px; height: 16px; }
.assist-page.fusion-21st .feedback-close-wrap { display: flex; align-items: center; justify-content: center; border-left: 1px solid var(--border); }
.assist-page.fusion-21st .feedback-close { display: flex; align-items: center; justify-content: center; padding: 12px; border: 0; border-radius: 6px; background: transparent; color: var(--text-secondary); cursor: pointer; }
.assist-page.fusion-21st .feedback-close svg { width: 20px; height: 20px; }
.assist-page.fusion-21st :is(.feedback-btn, .feedback-close):hover { color: var(--text); }
.assist-page.fusion-21st .feedback-btn[aria-pressed="true"] { color: var(--fusion-accent, #2b6cb0); }
.assist-page.fusion-21st .feedback-status { padding: 0 16px 8px; font-size: 12px; white-space: normal; }
.assist-page.fusion-21st .feedback-status:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
  .assist-page.fusion-21st :is(.thought-step-content, .thought-step-chevron, .thought-step-item, .thought-step-icon, .thought-step-shimmer, .assist-request-status svg) { animation: none !important; transition: none !important; }
  .assist-page.fusion-21st .thought-step-shimmer { background: none; color: var(--text); opacity: 1; }
}
