﻿.demo-stage {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  display: flow-root;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 22px 52px -28px var(--shadow);
  animation: show-scene .24s ease-out;
}
@keyframes show-scene { from { opacity: .65; } to { opacity: 1; } }
.scene-media { display: block; width: 100%; height: auto; object-fit: contain; }
.meeting-video { aspect-ratio: 16 / 9; }
.coding-scene { position: relative; height: 100%; color: #192938; }
.coding-scene .scene-media { height: 100%; }
.coding-question { position: absolute; top: 22%; left: 2.35%; width: 46%; min-height: 16.5%; margin: 0; padding: .6em .6em .8em; background: #fefefe; color: inherit; font-size: clamp(.73rem, 1.2vw, .99rem); }
.coding-question strong { display: none; }
.demo-stage.is-capturing::after { content: ''; position: absolute; z-index: 8; inset: 0; pointer-events: none; border: 2px solid #5ee6d1; background: #8fffee44; animation: scan .58s ease-out both; }
@keyframes scan { from { clip-path: inset(0 0 96%); } 80% { opacity: 1; } to { clip-path: inset(0); opacity: 0; } }
.desktop-workspace {
  --desk-bg: #080f12;
  --desk-field: #101d21;
  --desk-button: #12292a;
  --desk-hover: #153a38;
  --desk-border: #29474a;
  --desk-text: #f0fffc;
  --desk-muted: #acc5c3;
  --desk-accent: #58f3d0;
  --desk-alpha: 1;
  color-scheme: dark;
  color: var(--desk-text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 13px;
}
.desktop-workspace {
  --input-height: clamp(84px, 10vw, 120px);
  position: absolute;
  inset: 16px 14px auto auto;
  width: min(46%, 520px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  z-index: 2;
  pointer-events: none;
}
[data-scenario='audio'] .desktop-workspace {
  --input-height: clamp(78px, 8vw, 104px);
  width: min(39%, 440px);
}
[data-scenario='audio'] .desktop-workspace:has(.desk-input.is-expanded) {
  --input-height: clamp(125px, 14vw, 178px);
}
.desk-toolbar, .desk-input, .desk-output, .desk-helper {
  position: relative;
  transform: translate(var(--move-x, 0px), var(--move-y, 0px));
  pointer-events: auto;
  border: 1px solid var(--desk-border);
  background: color-mix(in srgb, var(--desk-bg) calc(100% * var(--desk-alpha)), transparent);
  border-radius: 14px;
  box-shadow: 0 6px 22px #0004;
}
.desk-toolbar { display: flex; align-items: center; gap: clamp(3px, .55vw, 8px); padding: 7px; min-height: 46px; cursor: grab; touch-action: none; }
.desk-toolbar:focus-within, .desk-input:focus-within, .desk-output:focus-within, .desk-helper:focus-within { z-index: 1; }
.desk-toolbar img { width: clamp(21px, 2.6vw, 32px); height: auto; }
.desktop-button {
  display: inline-grid;
  place-items: center;
  min-width: 0;
  min-height: 28px;
  padding: 0 5px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--desk-button);
  color: var(--desk-text);
  font-size: 15px;
  line-height: 1;
}
.desktop-button:hover { background: var(--desk-hover); }
.desktop-button:focus-visible, .desktop-workspace :focus-visible { outline-color: var(--desk-accent); outline-offset: 2px; }
.desktop-button:disabled { opacity: .42; }
.desktop-button svg { width: 22px; height: 22px; }
.desk-toolbar .desktop-button, .desk-helper .desktop-button { width: 40px; height: 32px; }
[data-scenario='audio'] .desk-toolbar .desktop-button { width: 34px; }
.desk-toolbar .audio-toggle { width: clamp(53px, 7.2vw, 90px); flex-shrink: 0; font-size: 11px; font-weight: 750; border-color: var(--desk-border); }
[data-scenario='audio'] .desk-toolbar .audio-toggle { width: clamp(51px, 6.5vw, 73px); }
.audio-toggle[aria-pressed='true'] { background: var(--desk-accent); color: var(--desk-bg); border-color: var(--desk-accent); }
.group-toggle[aria-pressed='true'] { background: var(--desk-hover); border-color: var(--desk-accent); }
.desk-toolbar .desk-close { margin-left: auto; }
.desktop-button.desk-close { background: #8f315f; color: white; }
.desktop-button.desk-close:hover { background: #b83d7c; }
.desktop-workspace:has(.desk-input.is-expanded) { --input-height: clamp(140px, 16vw, 205px); }
.desk-input { display: flex; flex-direction: column; gap: 7px; padding: 10px; height: var(--input-height); }
.desk-input textarea, .desk-response {
  min-width: 0; width: 100%; min-height: 0; flex: 1;
  border: 1px solid var(--desk-border); border-radius: 8px; padding: 7px;
  background: color-mix(in srgb, var(--desk-field) calc(100% * var(--desk-alpha)), transparent);
  color: var(--desk-text);
  scrollbar-width: thin; scrollbar-color: var(--desk-border) transparent;
}
.desk-input textarea { display: block; resize: none; font-family: Consolas, 'Courier New', monospace; font-size: 13px; line-height: 1.42; }
.desk-input textarea::placeholder { color: var(--desk-muted); }
.desk-input-actions, .desk-answer-actions { display: flex; align-items: center; gap: 6px; }
.desk-input-actions .desktop-button { width: 28px; }
.desk-input-actions .send-ai { width: 80px; margin-right: auto; background: var(--desk-accent); color: var(--desk-bg); font-size: 11px; font-weight: 750; }
.desk-input-actions .send-ai:hover { filter: brightness(1.12); }
.desk-input-actions .send-ai.is-processing, .desk-toolbar .is-processing { opacity: 1; background: var(--desk-accent); color: var(--desk-bg); animation: processing 1.2s ease-in-out infinite alternate; }
@keyframes processing { to { filter: brightness(.7); } }
.desk-output {
  --available-height: calc(56.25cqw - var(--input-height) - 128px);
  width: var(--out-width, 100%);
  height: min(var(--out-height, 360px), var(--available-height));
  min-width: 0;
  overflow: hidden;
}
[data-scenario='audio'] .desk-output { height: min(var(--out-height, 280px), var(--available-height)); }
.desk-answer { display: flex; flex-direction: column; gap: 6px; padding: 10px; height: 100%; }
.desk-answer h3 { margin: 0; color: var(--desk-muted); font-size: 11px; font-weight: 650; letter-spacing: .08em; cursor: grab; touch-action: none; }
.desk-answer .desk-status { margin: 0; color: var(--desk-muted); font-size: 11px; line-height: 1.3; }
.desk-answer .desk-status[data-error='true'] { color: #ffb2cb; }
.desk-response { overflow: auto; line-height: 1.5; overflow-wrap: anywhere; overscroll-behavior: contain; user-select: text; }
.desk-response:empty::before { content: 'Your answers appear here. Capture a question or send your transcript to get started.'; color: var(--desk-muted); }
.desk-response p { margin: 2px 0 7px; }
.desk-response h4 { margin: 7px 0 3px; }
.desk-response ul { margin: 3px 0 7px; padding-left: 21px; }
.desk-response pre { margin: 4px 0 7px; padding: 9px; border-radius: 6px; background: var(--desk-code, #0b1114); color: var(--desk-text); white-space: pre-wrap; }
.desk-response code { font: 12px/1.48 Consolas, 'Courier New', monospace; }
.py-keyword { color: #66d9ef; }
.py-control { color: #f92672; }
.py-name { color: #a6e22e; }
.py-literal { color: #ae81ff; }
.desktop-workspace[data-light='true'] .py-keyword { color: #246c8a; }
.desktop-workspace[data-light='true'] .py-control { color: #a7124d; }
.desktop-workspace[data-light='true'] .py-name { color: #4c6e00; }
.desktop-workspace[data-light='true'] .py-literal { color: #6333a2; }
.desk-answer-actions .desktop-button { width: 32px; height: 32px; }
.desk-pages { color: var(--desk-muted); font-family: Consolas, monospace; }
.desk-spacer { flex: 1; }
.desk-resize { cursor: nwse-resize; touch-action: none; }
.desk-helper { justify-self: end; width: 156px; display: flex; align-items: center; gap: 5px; padding: 5px 6px; background: var(--desk-bg); cursor: grab; touch-action: none; }
.desk-helper .desk-close { background: #dc3545; }
.desk-helper .desk-close:hover { background: #c82333; }
.desktop-workspace[data-transparent='true'] :is(.desk-input textarea, .desk-response, .desk-response pre, .desk-section) { background: transparent; }
.desktop-workspace[data-transparent='true'] :is(.desk-toolbar, .desk-input, .desk-output) .desktop-button { background: transparent; border-color: var(--desk-border); color: var(--desk-text); }
.desktop-workspace[data-transparent='true'] :is(.desk-toolbar, .desk-input, .desk-output) .desktop-button:hover { border-color: var(--desk-accent); }
.desktop-workspace[data-transparent='true'] :is(.desk-toolbar, .desk-input, .desk-output) :is(button, textarea, .desk-response, .desk-status) { text-shadow: 0 1px 3px var(--desk-bg); }
.desktop-workspace[data-transparent='true'] .send-ai { border-color: var(--desk-accent); }
.desk-pane { height: 100%; display: flex; min-height: 0; flex-direction: column; gap: 8px; padding: 10px; }
.desk-pane-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.desk-pane-header strong { flex: 1; font-size: 14px; color: var(--desk-accent); }
.desk-pane-header .desktop-button { min-width: 31px; font-size: 12px; }
.desk-pane-header [data-action='themes'] { border-color: var(--desk-accent); }
.desk-pane-content { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.desk-pane-content p { margin: 4px 0 7px; }
.desk-pane-content .desktop-button { min-height: 30px; border-color: var(--desk-border); padding: 5px 8px; font: 600 12px/1.25 'Segoe UI', sans-serif; text-decoration: none; }
.desk-pane-content .desktop-button[aria-pressed='true'] { border-color: var(--desk-accent); color: var(--desk-text); background: var(--desk-hover); }
.desk-pane-content .desk-section { padding: 9px; margin: 0 0 8px; border: 1px solid var(--desk-border); border-radius: 8px; background: color-mix(in srgb, var(--desk-field) calc(100% * var(--desk-alpha)), transparent); }
.desk-section h4 { margin: 0 0 5px; font-size: 13px; }
.desk-pane-content .desk-account { color: var(--desk-muted); font-size: 12px; }
.desk-pane-content .desk-account strong { color: var(--desk-accent); }
.desk-section p, .desk-pane-note { font-size: 12px; color: var(--desk-muted); }
.desk-options { display: flex; flex-wrap: wrap; gap: 5px; }
.desk-options .desktop-button { flex: 1 1 auto; }
.desk-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-block: 4px; }
.desk-setting-row input[type='range'] { flex: 1; min-width: 30px; }
.desk-setting-row input { accent-color: var(--desk-accent); }
.desk-keys { display: grid; gap: 5px; margin-bottom: 7px; }
.desk-keys .desktop-button { flex: 0 0 98px; }
.desk-history-list { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 8px; }
.desk-history-entry { border-top: 1px solid var(--desk-border); padding: 6px 0; }
.desk-history-entry button { text-align: left; }
.desk-dialog { pointer-events: auto; max-width: min(90vw, 300px); border: 1px solid var(--desk-border); border-radius: 10px; background: var(--desk-bg); color: var(--desk-text); padding: 15px; }
.desk-dialog::backdrop { background: #0a1315aa; }
.desk-dialog p { margin: 0 0 12px; }
.desk-dialog .desktop-button { padding: 7px 12px; }
.demo-tip { z-index: 6; padding: 6px 8px; border-radius: 5px; border: 1px solid #4eb4a9; color: #e7fbf9; background: #102a29; font: 600 11px/1.3 'Segoe UI', system-ui, sans-serif; }
.audio-tip { pointer-events: none; position: absolute; left: 97px; bottom: 12px; margin-right: 64px; padding-block: 4px; }
.desk-input:has(.audio-tip:not([hidden])) .send-ai, .desk-toolbar .is-guided { animation: guide-glow 2.3s ease-in-out infinite; }
.desk-toolbar .is-guided { border-color: var(--desk-accent); }
@keyframes guide-glow { 50% { box-shadow: 0 0 0 4px #4fdac080; } }
@media (max-width: 820px) {
  .demo-stage .desktop-workspace {
    inset: 2% 2% auto auto;
    width: 356px;
    transform: scale(var(--preview-scale));
    transform-origin: top right;
  }
  .demo-stage .desk-input { height: 78px; padding: 6px; gap: 4px; }
  .demo-stage .desk-input.is-expanded { height: 112px; }
  .demo-stage .desk-output { height: var(--out-height, 174px); }
  .demo-stage .desk-answer { padding: 7px; gap: 4px; }
  .demo-stage .audio-tip { left: 91px; bottom: 6px; }
  .coding-question { font-size: 1.55cqw; }
}
