/*
 * Smile conversation stream.
 *
 * Integration contract:
 *   - Mount .nw-conversation-surface inside the scrollable .nw-content.
 *   - .nw-conversation-turn owns .nw-conversation-user and
 *     .nw-conversation-assistant > .nw-conversation-items.
 *   - .nw-conversation-item[data-kind] wraps newly received answer blocks;
 *     blocks have a semantic class (.nw-conversation-prose, -tool, -sources,
 *     -artifact, -progress) and meaningful data-state when available.
 *   - Add data-new="true" to a freshly confirmed item/turn only. Never
 *     reapply to stream tokens, ongoing text updates, or hydrated history.
 *
 * Reading track: live ChatGPT desktop measurement 808px outer / 768px inner.
 * Message geometry, heading rhythm and card hierarchy are informed by the
 * signed Windows CSS analysis in docs/.../conversation-styles.md.
 * Colors, depth and motion remain original Smile design decisions.
 */

.nw-conversation-surface {
  --nw-stream-outer-width: var(--nw-work-track,808px);
  --nw-stream-prose-width: var(--nw-work-track,768px);
  --nw-stream-side-inset: var(--nw-work-stream-inset,20px);
  --nw-stream-copy-size: 16px;
  --nw-stream-leading: 1.58;
  --nw-stream-ink: var(--nw-fg, #edf4f7);
  --nw-stream-ink-soft: var(--nw-soft, #b9cbd5);
  --nw-stream-ink-muted: var(--nw-muted, #90a8b7);
  --nw-stream-emphasis: var(--nw-accent, #78b9ff);
  --nw-stream-divider: color-mix(in srgb, var(--nw-stroke, #304755) 66%, transparent);
  --nw-stream-surface: color-mix(in srgb, var(--nw-elevated, #20232c) 88%, #101117);
  --nw-prompt-material: linear-gradient(156deg,#292d37,#20232c 70%,#1b1e26);
  --nw-prompt-rim: #ffffff15;
  --nw-stream-easing: cubic-bezier(.2, .82, .26, 1);
  --nw-stream-fast: 150ms;
  box-sizing: border-box;
  inline-size: 100%;
  max-inline-size: var(--nw-stream-outer-width);
  margin-inline: auto;
  padding: var(--nw-work-stream-start,20px) var(--nw-stream-side-inset) 52px;
  min-inline-size: 0;
  color: var(--nw-stream-ink);
  -webkit-font-smoothing: antialiased;
}

/* A 20px inset either side makes 808px outer and 768px turns at desktop. */
.nw-conversation-surface .nw-conversation-turn {
  inline-size: 100%;
  max-inline-size: var(--nw-stream-prose-width);
  min-inline-size: 0;
  padding: 0;
  margin: 0 0 46px;
  border: 0;
}

.nw-conversation-surface .nw-conversation-turn:last-child {
  margin-block-end: 0;
}

/* The authored message shares the same reading track, aligned to its end. */
.nw-conversation-surface .nw-conversation-user {
  display: flex;
  flex-direction:column;
  align-items:flex-end;
  inline-size:100%;
  min-inline-size:0;
  padding:0;
  margin:0 0 22px;
  gap:6px;
}

.nw-conversation-surface .nw-user-icon,
.nw-conversation-surface .nw-ai-icon,
.nw-conversation-surface .nw-conversation-assistant > .nw-byline,
.nw-conversation-surface .nw-conversation-items > .nw-byline,
.nw-conversation-surface .nw-conversation-user-bubble > strong {
  display: none;
}

.nw-conversation-surface .nw-conversation-user-bubble {
  box-sizing:border-box;
  inline-size:fit-content;
  max-inline-size:min(84%,42rem);
  min-inline-size:0;
  padding:11px 17px 12px;
  margin:0;
  border:1px solid var(--nw-prompt-rim);
  border-radius:24px 24px 6px 24px;
  background:var(--nw-prompt-material);
  color:var(--nw-stream-ink);
  font-size:var(--nw-stream-copy-size);
  font-weight:400;
  line-height:var(--nw-stream-leading);
  letter-spacing:-.008em;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  box-shadow:inset 0 1px 0 #ffffff0b,inset 0 -1px 0 #00000030;
}
.nw-conversation-surface .nw-conversation-user-bubble p {
  margin: 0;
  font: inherit;
  white-space: inherit;
  overflow-wrap: inherit;
}

.nw-conversation-surface .nw-conversation-request-head{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap;margin:0;max-inline-size:100%;min-width:0;}
.nw-conversation-surface .nw-conversation-request-state{font-size:11px;color:var(--nw-stream-ink-muted);text-transform:capitalize;}
.nw-conversation-surface .nw-conversation-request-state:is([data-state=failed],[data-state=interrupted],[data-state=limited]){color:#efbd91;}

/* Assistant messages are unboxed content; the tool and artifact states carry
   their own surfaces when the content actually benefits from a boundary. */
.nw-conversation-surface .nw-conversation-assistant {
  display: block;
  min-inline-size: 0;
  inline-size: 100%;
  gap: 0;
}

.nw-conversation-surface .nw-conversation-items {
  min-inline-size: 0;
  inline-size: 100%;
  max-inline-size: var(--nw-stream-prose-width);
}

.nw-conversation-surface .nw-conversation-item {
  min-inline-size: 0;
  max-inline-size: 100%;
}

.nw-conversation-surface .nw-conversation-item + .nw-conversation-item {
  margin-block-start: 14px;
}

.nw-conversation-surface .nw-conversation-prose {
  min-inline-size: 0;
  max-inline-size: 100%;
  color: var(--nw-stream-ink);
  font-family: "Segoe UI Variable", "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: var(--nw-stream-copy-size);
  font-weight: 400;
  line-height: var(--nw-stream-leading);
  letter-spacing: -.005em;
  overflow-wrap: anywhere;
}

.nw-conversation-surface .nw-conversation-prose > :first-child {
  margin-block-start: 0;
}

.nw-conversation-surface .nw-conversation-prose > :last-child {
  margin-block-end: 0;
}

.nw-conversation-surface .nw-conversation-prose p {
  margin: 0 0 14px;
  line-height: inherit;
}

.nw-conversation-surface .nw-conversation-prose :is(h1, h2, h3, h4, h5, h6) {
  margin: 24px 0 10px;
  font-family: inherit;
  font-weight: 600;
  font-variant-ligatures: common-ligatures;
  line-height: 1.25;
  letter-spacing: -.025em;
  color: var(--nw-stream-ink);
}

.nw-conversation-surface .nw-conversation-prose h1 {
  font-size: 1.5em;
}

.nw-conversation-surface .nw-conversation-prose h2 {
  font-size: 1.25em;
}

.nw-conversation-surface .nw-conversation-prose h3 {
  font-size: 1.15em;
}

.nw-conversation-surface .nw-conversation-prose :is(h4, h5, h6) {
  font-size: 1em;
  letter-spacing: -.01em;
}

.nw-conversation-surface .nw-conversation-prose :is(h1, h2, h3, h4, h5, h6) + :is(p, ul, ol) {
  margin-block-start: 0;
}

.nw-conversation-surface .nw-conversation-prose :is(ul, ol) {
  padding-inline-start: 1.6em;
  margin: 8px 0 16px;
  list-style-position: outside;
}

.nw-conversation-surface .nw-conversation-prose li {
  margin: 0 0 5px;
  padding-inline-start: 2px;
}

.nw-conversation-surface .nw-conversation-prose li > :is(p, ul, ol):last-child {
  margin-block-end: 0;
}

.nw-conversation-surface .nw-conversation-prose li + li {
  margin-block-start: 4px;
}

.nw-conversation-surface .nw-conversation-prose :is(strong, b) {
  font-weight: 600;
  color: var(--nw-stream-ink);
}

.nw-conversation-surface .nw-conversation-prose a {
  color: var(--nw-stream-emphasis);
  text-decoration-color: color-mix(in srgb, currentColor 55%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.nw-conversation-surface .nw-conversation-prose a:hover {
  text-decoration-color: currentColor;
}

.nw-conversation-surface .nw-conversation-prose blockquote {
  position: relative;
  margin: 17px 0;
  padding: 5px 0 5px 17px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--nw-stream-ink-soft);
}

.nw-conversation-surface .nw-conversation-prose blockquote::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block: 5px;
  inline-size: 3px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--nw-stream-emphasis) 54%, var(--nw-stream-divider));
}

.nw-conversation-surface .nw-conversation-prose blockquote > :last-child {
  margin-block-end: 0;
}

.nw-conversation-surface .nw-conversation-prose :not(pre) > code {
  padding: 1px 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--nw-stream-ink) 8%, transparent);
  color: var(--nw-stream-ink);
  font-size: .92em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  overflow-wrap: anywhere;
}

.nw-conversation-surface .nw-conversation-prose :is(code, pre, kbd, samp) {
  font-family: "Cascadia Code", "Consolas", ui-monospace, SFMono-Regular, monospace;
  font-variant-ligatures: none;
}

.nw-conversation-surface .nw-conversation-prose pre,
.nw-conversation-surface .nw-conversation-code {
  max-inline-size: 100%;
  min-inline-size: 0;
  margin: 17px 0 20px;
  padding: 17px 19px;
  border: 1px solid var(--nw-stream-divider);
  border-radius: 15px;
  background: #091824;
  color: var(--nw-stream-ink);
  box-shadow: inset 0 1px 0 #ffffff08;
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
  scrollbar-width: thin;
}

.nw-conversation-surface .nw-conversation-prose pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  white-space: inherit;
}

.nw-conversation-surface .nw-conversation-prose .assistant-table-wrap {max-inline-size:100%;min-inline-size:0;overflow-x:auto;}
.nw-conversation-surface .nw-conversation-prose table {
  display: table;
  inline-size: 100%;
  min-inline-size: 100%;
  margin: 14px 0 18px;
  border-collapse: collapse;
  border-spacing: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  font-size: .92em;
  line-height: 1.5;
}

.nw-conversation-surface .nw-conversation-prose :is(td, th) {
  padding: 9px 16px 9px 0;
  border-block-end: 1px solid var(--nw-stream-divider);
  text-align: start;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: break-word;
}

.nw-conversation-surface .nw-conversation-prose th {
  font-weight: 600;
  color: var(--nw-stream-ink);
  white-space: nowrap;
}

.nw-conversation-surface .nw-conversation-prose hr {
  margin: 22px 0;
  border: 0;
  border-block-start: 1px solid var(--nw-stream-divider);
}

/* Activity is a typographic timeline, never a stack of receipt cards. */
.nw-conversation-surface :is(.nw-conversation-tool,.nw-conversation-progress) {
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  column-gap:10px;
  row-gap:2px;
  min-inline-size:0;
  max-inline-size:100%;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  color:var(--nw-stream-ink-muted);
  font-size:var(--nw-stream-copy-size);
  font-weight:400;
  line-height:var(--nw-stream-leading);
}
.nw-conversation-surface :is(.nw-conversation-tool-mark,.nw-conversation-progress-mark) {
  flex:0 0 13px;
  inline-size:13px;
  block-size:13px;
  box-sizing:border-box;
  align-self:flex-start;
  margin-block-start:calc((var(--nw-stream-copy-size) * var(--nw-stream-leading) - 13px) / 2);
  border:1.25px solid currentColor;
  border-radius:50%;
  color:inherit;
  position:relative;
}
.nw-conversation-surface .nw-conversation-tool[data-state="completed"] .nw-conversation-tool-mark::after {
  content:"";
  position:absolute;
  inset:2px 3px 3px 2px;
  border-inline-end:1.25px solid currentColor;
  border-block-end:1.25px solid currentColor;
  transform:rotate(40deg);
}
.nw-conversation-surface :is(.nw-conversation-tool[data-state="started"] .nw-conversation-tool-mark,.nw-conversation-progress-mark)::after {
  content:"";
  position:absolute;
  inset:3px;
  border-radius:50%;
  background:currentColor;
}
.nw-conversation-surface .nw-conversation-turn[data-work-motion="active"] .nw-conversation-tool[data-state="started"] .nw-conversation-tool-mark {
  animation:nw-activity-breathe 1.9s ease-in-out infinite;
}
@keyframes nw-activity-breathe {0%,100%{opacity:.55}50%{opacity:1}}
.nw-conversation-surface :is(.nw-conversation-tool-label,.nw-conversation-progress-text) {
  flex:1 1 0;
  min-inline-size:0;
  overflow-wrap:anywhere;
}
.nw-conversation-surface .nw-conversation-tool-status {
  font:inherit;
  font-size:.94em;
  color:var(--nw-warning,#e9b277);
}
.nw-conversation-surface .nw-conversation-tool-status[hidden] {display:none;}
.nw-conversation-surface .nw-conversation-tool[data-state="failed"] .nw-conversation-tool-mark {color:var(--nw-warning,#e9b277);}
@media(prefers-reduced-motion:reduce){
  .nw-conversation-surface .nw-conversation-turn[data-work-motion="active"] .nw-conversation-tool[data-state="started"] .nw-conversation-tool-mark {animation:none;}
}

/* Tool receipts: clock and a real detail action, on the same quiet line.
   The label is the existing journal text, not a reconstructed raw command. */
.nw-conversation-surface .nw-conversation-tool[data-receipt="true"] {
  display:block;
  inline-size:100%;
  min-inline-size:0;
}
.nw-conversation-surface .nw-conversation-receipt-line {
  display:flex;
  align-items:center;
  gap:9px;
  max-inline-size:100%;
  min-inline-size:0;
}
.nw-conversation-surface .nw-conversation-receipt-line .nw-conversation-tool-mark {
  align-self:center;
  margin-block-start:0;
}
.nw-conversation-surface .nw-conversation-receipt-line .nw-conversation-tool-label {
  flex:0 1 auto;
  min-inline-size:0;
}
.nw-conversation-surface .nw-conversation-tool[data-receipt="true"] .nw-conversation-tool-label {
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.nw-conversation-surface .nw-conversation-receipt-clock {
  flex:none;
  color:var(--nw-stream-ink-muted);
  font-size:.8em;
  font-variant-numeric:tabular-nums;
  opacity:.82;
  white-space:nowrap;
}
.nw-conversation-surface .nw-conversation-receipt-toggle {
  align-self:center;
  flex:0 0 28px;
  block-size:28px;
  display:grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:5px;
  background:none;
  color:inherit;
  cursor:pointer;
}
.nw-conversation-surface .nw-conversation-receipt-toggle::after {
  content:"";
  inline-size:6px;
  block-size:6px;
  border-inline-end:1.25px solid currentColor;
  border-block-start:1.25px solid currentColor;
  transform:rotate(45deg);
  transition:transform 180ms var(--nw-stream-easing);
}
.nw-conversation-surface .nw-conversation-receipt-toggle[aria-expanded="true"]::after {transform:rotate(135deg);}
.nw-conversation-surface .nw-conversation-receipt-toggle:hover {color:var(--nw-stream-ink);}
.nw-conversation-surface .nw-conversation-receipt-toggle:focus-visible {outline:1px solid currentColor;outline-offset:1px;}
.nw-conversation-surface .nw-conversation-receipt-detail {
  margin-inline-start:22px;
  min-inline-size:0;
  max-inline-size:calc(100% - 22px);
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  color:var(--nw-stream-ink-soft);
  font-size:.9em;
  opacity:1;
  transform:perspective(400px) translateY(0) rotateX(0deg);
  transform-origin:top;
  transition:opacity 160ms ease,transform 220ms var(--nw-stream-easing),display 220ms allow-discrete;
}
.nw-conversation-surface .nw-conversation-receipt-detail[hidden] {
  display:none;
  opacity:0;
  transform:perspective(400px) translateY(-3px) rotateX(-4deg);
}
@starting-style {
  .nw-conversation-surface .nw-conversation-receipt-detail:not([hidden]){
    opacity:0;
    transform:perspective(400px) translateY(-3px) rotateX(-4deg);
  }
}
.nw-conversation-surface .nw-conversation-receipt-detail p {margin:4px 0;}
.nw-conversation-surface .nw-conversation-receipt-meta {color:var(--nw-stream-ink-muted);font-size:.9em;}
@media(max-width:480px){
  .nw-conversation-surface .nw-conversation-receipt-clock {font-size:.74em;}
  .nw-conversation-surface .nw-conversation-receipt-toggle {flex-basis:24px;}
}
/* One quiet, keyboard-accessible elapsed-work disclosure before the answer. */
.nw-conversation-surface .nw-conversation-work {
  max-inline-size:100%;
  min-inline-size:0;
  margin-block:0 12px;
  color:var(--nw-stream-ink-muted);
}
.nw-conversation-surface :is(.nw-conversation-work-summary,.nw-conversation-work-label) {
  display:flex;
  align-items:center;
  gap:8px;
  min-block-size:44px;
  inline-size:fit-content;
  max-inline-size:100%;
  padding:3px 2px 3px 0;
  list-style:none;
  cursor:pointer;
  color:var(--nw-stream-ink-soft);
  font-size:14px;
  font-weight:400;
  line-height:1.5;
}
.nw-conversation-surface .nw-conversation-work-meta {
  display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 9px;
  min-inline-size:0;max-inline-size:100%;
}
.nw-conversation-surface .nw-conversation-work-label {cursor:default;margin-block-end:12px;}
@media(max-width:480px){
  .nw-conversation-surface :is(.nw-conversation-work-summary,.nw-conversation-work-label){gap:5px;}
  .nw-conversation-surface .nw-conversation-work-meta{gap:0 7px;}
  .nw-conversation-surface .nw-conversation-work-headline{max-inline-size:100%;}
}
.nw-conversation-surface .nw-conversation-work-label[hidden] {display:none;}
.nw-conversation-surface .nw-conversation-status[data-inline="true"] {
  position:absolute;clip-path:inset(50%);inline-size:1px;block-size:1px;
  overflow:hidden;white-space:nowrap;
}
/* State-bound optical highlight, inspired by the observed loading-only
   treatment. No progress estimate or animation timer owns execution. */
.nw-conversation-surface .nw-conversation-work-headline {
  min-inline-size:0;
  max-inline-size:100%;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  transform-origin:left center;
}
.nw-conversation-surface .nw-conversation-work-headline[hidden] {display:none;}
/* The activity phrase and elapsed time inherit the same status typography.
   Only numeric alignment and semantic contrast belong to the timer. */
.nw-conversation-surface .nw-conversation-work-meta .nw-conversation-timing {
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.nw-conversation-surface .nw-conversation-work-meta:has(.nw-conversation-work-headline:not([hidden])) .nw-conversation-timing {
  color:var(--nw-stream-ink-muted);
}
.nw-conversation-surface .nw-conversation-work-meta .nw-conversation-timing[hidden] {display:none;}
/* One moving optical field across the native activity phrase and its elapsed
   time. The full-cycle period follows the retained spectral motion study.
   It is presentation only; the journal remains the execution clock. */
.nw-conversation-surface .nw-conversation-turn[data-work-motion="active"] .nw-conversation-work-meta{
  background-image:linear-gradient(110deg,var(--nw-stream-ink-muted) 12%,var(--nw-stream-ink-muted) 32%,#94b8e8 44%,#f6faff 50%,#c4b4ed 56%,var(--nw-stream-ink-muted) 68%,var(--nw-stream-ink-muted) 88%);
  background-size:230% 100%;background-clip:text;-webkit-background-clip:text;
  animation:nw-native-work-light 1.92s ease-in-out infinite alternate;
}
.nw-conversation-surface .nw-conversation-turn[data-work-motion="active"] .nw-conversation-work-meta :is(.nw-conversation-work-headline,.nw-conversation-timing){color:transparent;}
@keyframes nw-native-work-light{from{background-position:100% 0;}to{background-position:0% 0;}}
@media(prefers-reduced-motion:reduce){
  .nw-conversation-surface .nw-conversation-turn[data-work-motion="active"] .nw-conversation-work-meta{animation:none;background:none;}
  .nw-conversation-surface .nw-conversation-turn[data-work-motion="active"] .nw-conversation-work-meta .nw-conversation-work-headline{color:inherit;}
  .nw-conversation-surface .nw-conversation-turn[data-work-motion="active"] .nw-conversation-work-meta .nw-conversation-timing{color:var(--nw-stream-ink-muted);}
  .nw-conversation-surface .nw-conversation-receipt-toggle::after,
  .nw-conversation-surface .nw-conversation-receipt-detail {transition:none;}
}
.nw-conversation-surface .nw-conversation-work-summary::-webkit-details-marker {display:none;}
.nw-conversation-surface .nw-conversation-work-summary::after {
  content:"";
  inline-size:7px;
  block-size:7px;
  flex:none;
  border-inline-end:1.5px solid currentColor;
  border-block-start:1.5px solid currentColor;
  transform:rotate(45deg);
  transition:transform 180ms cubic-bezier(.2,.8,.2,1);
}
.nw-conversation-surface .nw-conversation-work[open] > summary::after {transform:rotate(135deg);}
.nw-conversation-surface .nw-conversation-work-summary:is(:hover,:focus-visible) {color:var(--nw-stream-ink);}
.nw-conversation-surface .nw-conversation-work-summary:focus-visible {
  outline:1px solid currentColor;
  outline-offset:3px;
  border-radius:4px;
}
@supports selector(details::details-content) {
  .nw-conversation-surface .nw-conversation-work {interpolate-size:allow-keywords;}
  .nw-conversation-surface .nw-conversation-work::details-content {
    block-size:0;
    opacity:0;
    overflow:clip;
    transition:block-size 220ms cubic-bezier(.2,.8,.2,1),opacity 160ms ease,content-visibility 220ms allow-discrete;
  }
  .nw-conversation-surface .nw-conversation-work[open]::details-content {block-size:auto;opacity:1;}
}
@media (prefers-reduced-motion:reduce) {
  .nw-conversation-surface .nw-conversation-work-summary::after,
  .nw-conversation-surface .nw-conversation-work::details-content {transition:none;}
}
.nw-conversation-surface .nw-conversation-work-items {
  min-inline-size:0;
  margin:10px 0 18px;
  padding:0;
}
.nw-conversation-surface .nw-conversation-work-items > .nw-conversation-item + .nw-conversation-item {
  margin-block-start:12px;
}
.nw-conversation-surface .nw-conversation-work-items > .nw-conversation-prose + .nw-conversation-item,
.nw-conversation-surface .nw-conversation-work-items > .nw-conversation-item + .nw-conversation-prose {
  margin-block-start:16px;
}
.nw-conversation-surface .nw-conversation-tool[data-parent-action] {margin-inline-start:23px;}
.nw-conversation-surface .nw-conversation-assignment-context {
  flex:1 0 calc(100% - 23px);
  margin-inline-start:23px;
  min-inline-size:0;
  overflow-wrap:anywhere;
  font-size:.94em;
}
.nw-conversation-surface .nw-conversation-assignment-context p {margin:3px 0;white-space:pre-wrap;}

/* Citations are a compact text disclosure, not another result card. */
.nw-conversation-surface .nw-conversation-sources {
  min-inline-size:0;
  max-inline-size:100%;
  margin:12px 0;
  color:var(--nw-stream-ink-muted);
}
.nw-conversation-surface .nw-conversation-sources summary {
  display:flex;
  align-items:center;
  gap:8px;
  inline-size:fit-content;
  cursor:pointer;
  font-size:12px;
  font-weight:400;
  line-height:1.5;
  list-style:none;
  padding:6px 11px;
  border-radius:999px;
  background:var(--nw-stream-surface);
  border:1px solid var(--nw-prompt-rim);
  max-inline-size:100%;
}
.nw-conversation-surface .nw-conversation-sources summary::-webkit-details-marker {display:none;}
.nw-conversation-surface .nw-conversation-sources summary::after {
  content:"";
  inline-size:6px;block-size:6px;
  border-block-start:1.25px solid currentColor;
  border-inline-end:1.25px solid currentColor;
  transform:rotate(45deg);
  transition:transform 180ms var(--nw-stream-easing);
}
.nw-conversation-surface .nw-conversation-sources[open] summary::after {transform:rotate(135deg);}
.nw-conversation-surface .nw-conversation-sources summary:hover {color:var(--nw-stream-ink);}
.nw-conversation-surface .nw-conversation-sources summary:focus-visible {outline:1px solid currentColor;outline-offset:3px;border-radius:3px;}
@media(prefers-reduced-motion:reduce){.nw-conversation-surface .nw-conversation-sources summary::after{transition:none;}}
.nw-conversation-surface .nw-conversation-sources a {
  display: block;
  padding: 8px 0;
  color: var(--nw-stream-emphasis);
  line-height: 1.4;
  font-size: 12.5px;
  overflow-wrap: anywhere;
  text-underline-offset: 2px;
}

.nw-conversation-surface .nw-conversation-sources a + a {
  border-block-start: 1px solid var(--nw-stream-divider);
}

/* A managed website result is a safe first-class preview action. Its URL
   is validated by the renderer; authorization remains owned by the GET route. */
.nw-conversation-surface .nw-conversation-resource {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  box-sizing:border-box;
  inline-size:100%;
  min-block-size:58px;
  min-inline-size: 0;
  max-inline-size: 100%;
  gap: 12px;
  margin-block: 12px;
  padding: 12px 14px;
  border: 1px solid var(--nw-stream-divider);
  border-radius: 12px;
  background: color-mix(in srgb, var(--nw-stream-surface) 42%, transparent);
}
.nw-conversation-surface .nw-conversation-resource-mark {
  flex: 0 0 30px;
  color: var(--nw-stream-emphasis);
  font-size: 23px;
  text-align: center;
}
.nw-conversation-surface .nw-conversation-resource-copy {
  flex: 1 1 170px;
  display: grid;
  gap: 3px;
  min-inline-size: 0;
  overflow-wrap: anywhere;
}
.nw-conversation-surface .nw-conversation-resource-copy strong {
  color: var(--nw-stream-ink);
  font-size: 13.5px;
  font-weight: 630;
}
.nw-conversation-surface .nw-conversation-resource-meta {
  font-size: 11.5px;
  color: var(--nw-stream-ink-muted);
}
.nw-conversation-surface .nw-conversation-resource-action {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--nw-stream-emphasis) 37%, transparent);
  border-radius: 8px;
  color: var(--nw-stream-emphasis);
  font-size: 12px;
  font-weight: 620;
  text-decoration: none;
  white-space: nowrap;
}
.nw-conversation-surface .nw-conversation-resource-action:is(:hover,:focus-visible) {
  color: var(--nw-stream-ink);
  background: color-mix(in srgb, var(--nw-stream-emphasis) 10%, transparent);
}
.nw-conversation-surface .nw-conversation-resource-action:focus-visible {
  outline: 2px solid var(--nw-stream-emphasis);
  outline-offset: 2px;
}

/* Artifacts can expand across the reading track, but are bounded by it. */
.nw-conversation-surface .nw-conversation-artifact {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  min-inline-size: 0;
  inline-size: 100%;
  max-inline-size: 100%;
  min-block-size: 58px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid var(--nw-stream-divider);
  border-radius: 12px;
  background: color-mix(in srgb, var(--nw-stream-surface) 42%, transparent);
  color: var(--nw-stream-ink);
  transition: transform var(--nw-stream-fast) var(--nw-stream-easing),
    border-color var(--nw-stream-fast) ease, background-color var(--nw-stream-fast) ease;
}

.nw-conversation-surface .nw-conversation-artifact > :is(span, strong, p) {
  flex: 1 1 auto;
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

/* The mark is an icon, not a flexible text column. Keep document title,
   filename and action in separate readable lanes at every viewport. */
.nw-conversation-surface .nw-conversation-artifact > .nw-conversation-artifact-mark {
  flex: 0 0 24px;
  display: inline-grid;
  place-items: center;
  inline-size: 24px;
  block-size: 24px;
  color: var(--nw-stream-emphasis);
  font-size: 18px;
}

.nw-conversation-surface .nw-conversation-artifact-copy {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-inline-size: 0;
  text-align: start;
}

.nw-conversation-surface .nw-conversation-artifact-copy strong {
  display: block;
  max-inline-size: 100%;
  font-size: 13.5px;
  font-weight: 620;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.nw-conversation-surface .nw-conversation-artifact-copy small {
  display: block;
  max-inline-size: 100%;
  font-size: 11.5px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.nw-conversation-surface .nw-conversation-artifact > :is(a, button) {
  flex: none;
  margin-inline-start: auto;
  color: var(--nw-stream-emphasis);
  text-underline-offset: 3px;
}

.nw-conversation-surface .nw-conversation-artifact .nw-glyph {
  flex: none;
  color: var(--nw-stream-emphasis);
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .nw-conversation-surface .nw-conversation-artifact:is(:hover, :focus-within) {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--nw-stream-emphasis) 48%, var(--nw-stream-divider));
    background: color-mix(in srgb, var(--nw-stream-surface) 75%, transparent);
  }
}

.nw-conversation-surface .nw-conversation-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 15px;
  margin: 18px 0 0;
  padding: 0;
  color: var(--nw-stream-ink-muted);
}

.nw-conversation-surface .nw-conversation-action {
  min-block-size: 30px;
  padding: 5px 8px;
  margin-inline-start: -8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--nw-stream-ink-muted);
  font-size: 12px;
  line-height: 1.35;
  transition: color var(--nw-stream-fast) ease,
    background-color var(--nw-stream-fast) ease;
}

.nw-conversation-surface .nw-conversation-action:is(:hover, :focus-visible) {
  background: color-mix(in srgb, var(--nw-stream-emphasis) 8%, transparent);
  color: var(--nw-stream-ink);
}
.nw-conversation-surface .nw-conversation-request-head .nw-conversation-action{
  margin-inline-start:0;color:var(--nw-stream-ink-soft);border:1px solid var(--nw-prompt-rim);border-radius:999px;padding:4px 9px;background:transparent;font-size:11px;
}
.nw-conversation-surface .nw-conversation-request-head .nw-conversation-action:is(:hover,:focus-visible){border-color:var(--nw-focus);background:var(--nw-control-hover);color:var(--nw-fg);}

.nw-conversation-surface .nw-conversation-status {
  font-size: 11.5px;
  color: var(--nw-stream-ink-muted);
  text-transform: none;
}

/* Real service result data is formatted as a semantic, horizontally bounded
   table. Rows and columns originate from the persisted event payload. */
.nw-conversation-surface .nw-conversation-data-table-wrap {
  max-inline-size: 100%;
  min-inline-size: 0;
  margin-block: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
  border: 1px solid var(--nw-stream-divider);
  border-radius: 10px;
}
.nw-conversation-surface .nw-conversation-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: start;
}
.nw-conversation-surface .nw-conversation-data-table :is(th,td) {
  padding: 10px 12px;
  border-block-end: 1px solid var(--nw-stream-divider);
  text-align: start;
  vertical-align: top;
  overflow-wrap: anywhere;
  min-inline-size: 86px;
}
.nw-conversation-surface .nw-conversation-data-table th {
  color: var(--nw-stream-ink-soft);
  font-weight: 630;
  background: color-mix(in srgb, var(--nw-stream-surface) 87%, transparent);
}
.nw-conversation-surface .nw-conversation-data-table tbody tr:last-child td {
  border-block-end: none;
}
.nw-conversation-surface .nw-conversation-structured > .nw-conversation-muted {
  margin: 8px 0 10px;
  line-height: 1.5;
  font-size: 12px;
}
.nw-conversation-surface .nw-conversation-structured-raw {
  margin: 8px 0;
  padding: 12px;
  overflow: auto;
  max-inline-size: 100%;
  border-radius: 9px;
  background: #091824;
  font: 12px/1.6 "Cascadia Code","Consolas",monospace;
}

.nw-conversation-surface .nw-conversation-progress[data-state="failed"],
.nw-conversation-surface .nw-conversation-status[data-state="failed"],
.nw-conversation-surface .nw-conversation-status[data-state="stopped"] {
  color: var(--nw-warning, #e9b277);
}

.nw-conversation-surface .nw-conversation-pulse {
  display: inline-block;
  flex: none;
  inline-size: 7px;
  block-size: 7px;
  border-radius: 50%;
  background: var(--nw-stream-emphasis);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--nw-stream-emphasis) 10%, transparent);
  vertical-align: middle;
  animation: nw-stream-pulse 1.4s ease-in-out infinite;
}

.nw-conversation-surface .nw-conversation-welcome,
.nw-conversation-surface .nw-conversation-empty {
  display: grid;
  align-content: center;
  justify-items: center;
  min-block-size: min(62dvh, 460px);
  max-inline-size: 620px;
  margin-inline: auto;
  padding: 18px 0 30px;
  text-align: center;
  color: var(--nw-stream-ink-soft);
  line-height: 1.55;
}

.nw-conversation-surface :is(.nw-conversation-welcome, .nw-conversation-empty) :is(h1, h2, h3) {
  margin: 0 0 12px;
  color: var(--nw-stream-ink);
  font-size: clamp(28px, 3.3vw, 46px);
  font-weight: 620;
  letter-spacing: -.025em;
  line-height: 1.25;
}

.nw-conversation-surface :is(.nw-conversation-welcome, .nw-conversation-empty) p {
  max-inline-size: 540px;
  margin: 0;
  font-size: 14px;
}

.nw-conversation-surface .nw-conversation-welcome .nw-conversation-welcome-kicker{font-size:10px;font-weight:650;letter-spacing:.23em;color:#8ebcde;margin-bottom:14px;}
.nw-conversation-surface .nw-conversation-welcome .nw-welcome-mark{width:76px;height:72px;margin-bottom:18px;}
/* Wide results remain bounded by the available track. Content-specific
   viewers may expand in an inspector without distorting this reading lane. */
.nw-conversation-surface :is(.nw-conversation-item[data-kind="wide"], .nw-conversation-item[data-kind="attachment"]) {
  max-inline-size: 100%;
  min-inline-size: 0;
}

/* Opt-in arrival on complete message/item only; no per-token animation. */
.nw-conversation-surface :is(.nw-conversation-item, .nw-conversation-turn)[data-new="true"] {
  animation: nw-stream-confirmed-enter 150ms var(--nw-stream-easing) backwards;
}

@keyframes nw-stream-pulse {
  0%, 100% { opacity: .7; }
  50% { opacity: 1; }
}

@keyframes nw-stream-confirmed-enter {
  from {
    opacity: .25;
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 720px) {
  .nw-conversation-surface {
    --nw-stream-side-inset: var(--nw-work-stream-inset,14px);
    --nw-stream-copy-size: 15.5px;
    padding-block-start: var(--nw-work-stream-start,15px);
    padding-block-end: 34px;
  }

  .nw-conversation-surface .nw-conversation-turn {
    margin-block-end: 36px;
  }

  .nw-conversation-surface .nw-conversation-user-bubble {
    max-inline-size: 90%;
  }

  .nw-conversation-surface .nw-conversation-prose h2 {
    font-size: 1.25em;
  }
}

@media (max-width: 480px) {
  .nw-conversation-surface {
    --nw-stream-side-inset: var(--nw-work-stream-inset,9px);
  }

  .nw-conversation-surface .nw-conversation-user-bubble {
    max-inline-size: 90%;
    padding: 10px 14px;
    border-radius: 22px 22px 6px 22px;
  }

  .nw-conversation-surface .nw-conversation-user {
    margin-block-end: 19px;
  }

  .nw-conversation-surface .nw-conversation-prose pre,
  .nw-conversation-surface .nw-conversation-code {
    padding: 13px;
  }

  .nw-conversation-surface .nw-conversation-artifact {
    flex-wrap: wrap;
    gap: 9px;
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nw-conversation-surface :is(.nw-conversation-item, .nw-conversation-turn)[data-new="true"] {
    animation: none;
    transform: none;
    opacity: 1;
  }

  .nw-conversation-surface .nw-conversation-pulse {
    animation: none;
  }

  .nw-conversation-surface .nw-conversation-artifact {
    transition: none;
    transform: none;
  }

  .nw-conversation-surface .nw-conversation-action {
    transition: none;
  }
}

@media print {
  .nw-conversation-surface,
  .nw-conversation-surface .nw-conversation-prose,
  .nw-conversation-surface .nw-conversation-prose :is(h1, h2, h3, h4, h5, h6) {
    color: #151515;
  }

  .nw-conversation-surface .nw-conversation-user-bubble,
  .nw-conversation-surface .nw-conversation-artifact,
  .nw-conversation-surface .nw-conversation-sources {
    box-shadow: none;
    color: #151515;
    border-color: #aaa;
    background: transparent;
  }

  .nw-conversation-surface .nw-conversation-prose pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .nw-conversation-surface :is(.nw-conversation-item, .nw-conversation-turn)[data-new="true"] {
    animation: none;
  }
}

/* Artifact actions in the transcript; previews belong to the adjacent workspace. */
.nw-conversation-surface .nw-conversation-artifact-meta {
  color: var(--nw-stream-ink-muted, #90a8b7);
  letter-spacing: .015em;
}
.nw-conversation-surface .nw-conversation-artifact-preview {
  border: 1px solid color-mix(in srgb, var(--nw-stream-emphasis, #63dcd2) 32%, transparent);
  border-radius: 9px;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--nw-stream-emphasis, #63dcd2) 11%, transparent);
  cursor: pointer;
}
.nw-conversation-surface .nw-conversation-artifact:has([data-open-artifact]) {
  cursor: pointer;
}
.nw-conversation-surface .nw-conversation-artifact-download {
  font-size: 12px;
  white-space: nowrap;
}
.nw-conversation-surface .nw-conversation-artifact:has(.nw-conversation-artifact-preview) > .nw-conversation-artifact-download {
  margin-inline-start: 2px;
}
.nw-conversation-surface .nw-conversation-artifact :is(button,a):focus-visible {
  outline: 2px solid var(--nw-stream-emphasis, #63dcd2);
  outline-offset: 3px;
}
/* Shared content tab shell; independent of individual file renderers. */
.nw-workspace-content {
  display: flex;
  flex-direction: column;
  block-size: 100%;
  min-inline-size: 0;
  min-block-size: 0;
  background: var(--nw-canvas, #0d1a27);
}
.nw-workspace-content{position:relative;}
.nw-workspace-resize{position:absolute;inset-block:0;inset-inline-start:0;width:7px;z-index:4;cursor:ew-resize;touch-action:none;}
.nw-workspace-resize:hover,.nw-workspace-resize:focus-visible{background:var(--nw-focus,#8ccaff);opacity:.65;}
.nw-resource-host[data-expanded] .nw-workspace-resize{display:none;}
@container (max-width:740px){.nw-workspace-resize{display:none;}}
.nw-workspace-toolbar {display: flex; align-items: stretch; min-inline-size: 0; border-block-end: 1px solid var(--nw-stroke-soft,#304755);}
.nw-workspace-toolbar .nw-workspace-tabs {flex: 1 1 auto; min-inline-size: 0; border-block-end: 0;}
.nw-workspace-control {display:inline-grid;place-items:center;flex:none;width:32px;height:32px;align-self:center;margin:3px 2px;padding:0;border:0;border-radius:7px;background:transparent;color:var(--nw-fg,#edf4f7);cursor:pointer;}
.nw-workspace-control:hover {background:var(--nw-control-hover,#263746);}
.nw-workspace-control:focus-visible {outline: 2px solid var(--nw-focus,#8ccaff); outline-offset: 2px;}
@container (max-width:740px) {.nw-workspace-control:not(.nw-workspace-hide) {display:none;}}
.nw-conversation-file-details {margin: 18px auto 0; max-inline-size: 760px; color: var(--nw-muted,#90a8b7); font-size: 12px;}
.nw-conversation-file-details summary {cursor: pointer; padding-block: 6px;}
.nw-conversation-file-details .nw-conversation-file-sha {margin: 6px 0 0;}
.nw-workspace-tabs {
  display: flex;
  flex: none;
  gap: 4px;
  padding: 8px 10px 0;
  overflow-x: auto;
  scrollbar-width: thin;
  border-block-end: 1px solid var(--nw-stroke-soft, #304755);
}
.nw-workspace-tab-entry {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  max-inline-size: min(250px, 75vw);
  min-inline-size: 0;
  border-block-end: 2px solid transparent;
}
.nw-workspace-tab-entry:has([aria-selected="true"]) {
  border-block-end-color: var(--nw-focus, #8ccaff);
  background: color-mix(in srgb, var(--nw-elevated, #182d3b) 75%, transparent);
  border-radius: 8px 8px 0 0;
}
.nw-workspace-tab, .nw-workspace-tab-close {
  min-block-size: 36px;
  border: 0;
  background: transparent;
  color: var(--nw-muted, #90a8b7);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.nw-workspace-tab {
  min-inline-size: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding-inline: 10px 4px;
}
.nw-workspace-tab[aria-selected="true"] {
  color: var(--nw-fg, #edf4f7);
  font-weight: 600;
}
.nw-workspace-tab-close {
  flex: none;
  inline-size: 32px;
  font-size: 18px;
}
.nw-workspace-tab-close:disabled {opacity: .4; cursor: wait;}
.nw-workspace-tab:focus-visible, .nw-workspace-tab-close:focus-visible {
  outline: 2px solid var(--nw-focus, #8ccaff);
  outline-offset: -3px;
}
.nw-workspace-panels {
  flex: 1 1 auto;
  min-block-size: 0;
  min-inline-size: 0;
  overflow: hidden;
}
.nw-workspace-panels > [hidden] {display: none;}
/* Subtle depth cue for an actual tab arrival, never for streamed content. */
@media (prefers-reduced-motion:no-preference) {
  .nw-workspace-panels > :not([hidden]) {
    animation:nw-document-arrive 170ms cubic-bezier(.2,.8,.2,1) both;
    transform-origin:left center;
  }
  @keyframes nw-document-arrive {
    from {opacity:.84;transform:perspective(1200px) translate3d(5px,0,-9px) rotateY(-1deg);}
    to {opacity:1;transform:perspective(1200px) translate3d(0,0,0) rotateY(0deg);}
  }
}

.nw-conversation-file-viewer {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
  inline-size: 100%;
  block-size: 100%;
  overflow: hidden;
  color: var(--nw-fg, #edf4f7);
  background: var(--nw-canvas, #0d1a27);
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
}
.nw-conversation-file-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex: none;
  gap: 18px;
  padding: 12px 18px;
  border-block-end: 1px solid var(--nw-stroke-soft);
}
.nw-conversation-file-heading {
  min-inline-size: 0;
}
.nw-conversation-file-heading h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.24;
  overflow-wrap: anywhere;
}
.nw-conversation-file-meta {
  margin: 5px 0 0;
  color: var(--nw-muted, #90a8b7);
  font-size: 12px;
}
.nw-conversation-file-close {
  flex: none;
  min-inline-size: 32px;
}
.nw-conversation-file-viewer :is(.nw-conversation-file-header,.nw-conversation-file-footer,.nw-conversation-file-version-bar,.nw-conversation-file-editor) :is(button,a),
.nw-conversation-file-viewer [data-retry-file-viewer],
.nw-conversation-file-viewer:not([data-spatial=true]) .nw-conversation-file-body :is(button,a) {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 38px;
  padding: 8px 13px;
  border-radius: 9px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 620;
  text-decoration: none;
  cursor: pointer;
}
.nw-conversation-file-viewer [hidden] {
  display: none !important;
}
.nw-conversation-file-viewer :is(.nw-conversation-file-header,.nw-conversation-file-footer,.nw-conversation-file-version-bar,.nw-conversation-file-editor) button,
.nw-conversation-file-viewer [data-retry-file-viewer],
.nw-conversation-file-viewer:not([data-spatial=true]) .nw-conversation-file-body button {
  border: 1px solid #ffffff29;
  background:var(--nw-control-fill);
  color:var(--nw-fg, #edf4f7);
}
.nw-conversation-file-viewer :is(button,a):focus-visible {
  outline: 2px solid var(--nw-focus, #8ccaff);
  outline-offset: 3px;
}
.nw-conversation-file-scroll {
  flex: 1 1 auto;
  min-block-size: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px 20px 28px;
}
.nw-conversation-file-status {
  margin: 0;
  font-size: 13px;
  color: var(--nw-soft, #b9cbd5);
}
.nw-conversation-file-status:empty {
  display: none;
}
.nw-conversation-file-status[data-state="error"] {
  padding: 13px 15px;
  border-inline-start: 3px solid #f0aa76;
  background: #f0aa7614;
}
.nw-conversation-file-status[data-state="loading"] {
  display: flex;
  align-items: center;
  gap: 9px;
}
.nw-conversation-file-status[data-state="loading"]::before {
  content: "";
  display: inline-block;
  inline-size: 10px;
  block-size: 10px;
  border: 2px solid #90a8b733;
  border-block-start-color: var(--nw-aqua, #63dcd2);
  border-radius: 50%;
  animation: nw-file-preview-spin 850ms linear infinite;
}
@keyframes nw-file-preview-spin {
  to { transform: rotate(360deg); }
}
.nw-conversation-file-viewer [data-retry-file-viewer] {
  margin-block-start: 12px;
}
.nw-conversation-file-representation {
  margin: 0 0 16px;
  color: var(--nw-muted, #90a8b7);
  font-size: 12px;
  line-height: 1.5;
}
.nw-conversation-file-body {
  min-inline-size: 0;
}
.nw-conversation-file-preview-content {
  min-inline-size: 0;
}
.nw-conversation-file-plain {
  box-sizing: border-box;
  max-inline-size: 100%;
  margin: 0;
  overflow: auto;
  padding: 18px 19px;
  border-radius: 12px;
  background: #08131f;
  color: #e4f0f5;
  font-family: Consolas, "Cascadia Code", monospace;
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
/* Editorial surface: independent of application and transcript heading scales. */
.nw-conversation-file-viewer :is(.nw-conversation-file-markdown,.nw-conversation-file-document) {
  box-sizing: border-box;
  max-inline-size: 760px;
  margin-inline: auto;
  padding: clamp(20px,4vw,44px);
  border: 1px solid #dbe2eb;
  border-radius: 6px;
  background: #fafbfc;
  color: #223244;
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  text-align: start;
}
.nw-conversation-file-viewer :is(.nw-conversation-file-markdown,.nw-conversation-file-document) :is(h1,h2,h3,h4,h5,h6) {
  color: #18344f;
  font-weight: 650;
  line-height: 1.28;
  letter-spacing: -.015em;
  margin: 1.5em 0 .55em;
}
.nw-conversation-file-viewer :is(.nw-conversation-file-markdown,.nw-conversation-file-document) h1 {font-size: 28px;}
.nw-conversation-file-viewer :is(.nw-conversation-file-markdown,.nw-conversation-file-document) h2 {font-size: 22px;}
.nw-conversation-file-viewer :is(.nw-conversation-file-markdown,.nw-conversation-file-document) h3 {font-size: 18px;}
.nw-conversation-file-viewer :is(.nw-conversation-file-markdown,.nw-conversation-file-document) :is(h4,h5,h6) {font-size: 15px;}
.nw-conversation-file-viewer :is(.nw-conversation-file-markdown,.nw-conversation-file-document) > :first-child {margin-block-start: 0;}
.nw-conversation-file-viewer :is(.nw-conversation-file-markdown,.nw-conversation-file-document) > :last-child {margin-block-end: 0;}
.nw-conversation-file-viewer :is(.nw-conversation-file-markdown,.nw-conversation-file-document) :is(p,ul,ol,blockquote,pre) {margin: 0 0 1em;}
.nw-conversation-file-viewer :is(.nw-conversation-file-markdown,.nw-conversation-file-document) :is(ul,ol) {padding-inline-start: 1.5em;}
.nw-conversation-file-viewer .nw-conversation-file-document p {white-space: pre-wrap;}
.nw-conversation-file-viewer .nw-conversation-file-markdown a {color: #185a99; text-decoration: underline; display: inline; padding: 0; font: inherit;}
.nw-conversation-file-viewer .nw-conversation-file-markdown pre {overflow: auto; background: #eaf0f6; padding: 12px; border-radius: 6px;}
.nw-conversation-file-viewer .nw-conversation-file-markdown code {font-size: .9em; color: #253b50;}
.nw-conversation-file-viewer .nw-conversation-file-markdown table {border-collapse: collapse; max-inline-size: 100%; font-size: .9em;}
.nw-conversation-file-viewer :is(.nw-conversation-file-markdown,.nw-conversation-file-document) :is(td,th) {border: 1px solid #cbd5e1; padding: 8px; text-align: start;}
.nw-conversation-file-viewer :is(.nw-conversation-file-markdown,.nw-conversation-file-document) th {background: #eaf0f6; color: #18344f;}
.nw-conversation-file-viewer .nw-conversation-file-markdown blockquote {border-inline-start: 3px solid #a3b5c7; padding-inline-start: 14px;}
.nw-conversation-preview-table-scroll {
  max-inline-size: 100%;
  overflow: auto;
  margin: 12px 0 20px;
  border: 1px solid #ffffff29;
  border-radius: 10px;
}
.nw-conversation-preview-table {
  inline-size: max-content;
  min-inline-size: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.5;
}
.nw-conversation-preview-table :is(td,th) {
  max-inline-size: 360px;
  min-inline-size: 40px;
  border: 1px solid #ffffff1c;
  padding: 8px 11px;
  text-align: start;
  overflow-wrap: anywhere;
  vertical-align: top;
  white-space: pre-wrap;
}
.nw-conversation-preview-table th {
  position: sticky;
  inset-inline-start: 0;
  background: #1f3949;
  color: #b4cdd7;
  font-weight: 600;
}
.nw-conversation-preview-table tr:nth-child(even) td {
  background: #ffffff06;
}
.nw-conversation-preview-table [data-formula="true"] {
  font-family: Consolas, monospace;
  color: #f1cc91;
}
.nw-conversation-file-sheet,
.nw-conversation-file-slide {
  margin: 0 0 24px;
}
.nw-conversation-file-sheet h3,
.nw-conversation-file-slide h3 {
  margin: 0 0 12px;
  font-size: 16px;
}
.nw-conversation-file-slide {
  padding: 20px;
  border: 1px solid #ffffff24;
  border-radius: 12px;
  background: #ffffff06;
}
.nw-conversation-file-slide p {
  margin: 0 0 10px;
  white-space: pre-wrap;
}
.nw-conversation-file-pdf {
  inline-size: 100%;
  block-size: min(600px, 65vh);
  min-block-size: 300px;
  border: 0;
  border-radius: 8px;
  background: #f8f8f8;
}
.nw-conversation-file-image {
  display: block;
  max-inline-size: 100%;
  block-size: auto;
  margin: 0 auto;
  border-radius: 8px;
}
.nw-conversation-file-reason {
  margin: 0;
  line-height: 1.6;
}
.nw-conversation-file-sha {
  margin: 24px 0 0;
  color: var(--nw-muted, #90a8b7);
  font-family: Consolas, monospace;
  font-size: 10.5px;
  overflow-wrap: anywhere;
}
.nw-conversation-file-sha:empty {
  display: none;
}
.nw-conversation-file-footer {
  display: flex;
  justify-content: space-between;
  flex: none;
  gap: 12px;
  padding: 12px 18px;
  border-block-start: 1px solid #ffffff19;
}
.nw-conversation-file-download {
  border:1px solid var(--nw-stroke);
  background:var(--nw-control-fill);
  color:var(--nw-accent);
}
@media (max-width: 640px) {
  .nw-conversation-file-header {padding: 18px 16px 14px;}
  .nw-conversation-file-scroll {padding: 17px 14px 22px;}
  .nw-conversation-file-footer {padding: 13px 16px;}
}
@media (prefers-reduced-motion: reduce) {
  .nw-conversation-file-status[data-state="loading"]::before {animation: none;}
}

/* Immutable artifact revision controls, scoped to the resource workspace. */
.nw-conversation-file-version-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 0 10px;
  padding: 6px 0 10px;
  border-bottom: 1px solid var(--nw-stroke-soft);
}
.nw-conversation-file-version-bar[hidden] {display: none;}
.nw-conversation-file-version-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  min-inline-size: 0;
  color: var(--nw-muted, #9db1be);
  font-size: 12px;
  font-weight: 550;
}
.nw-conversation-file-version-select {
  min-inline-size: min(155px, 55vw);
  max-inline-size: 100%;
  min-block-size: 30px;
  padding: 4px 34px 4px 10px;
  border: 1px solid #ffffff35;
  border-radius: 8px;
  background: #102534;
  color: var(--nw-fg, #edf4f7);
  font: inherit;
}
.nw-conversation-file-version-status {
  flex: 1 1 auto;
  padding: 0;
  color: var(--nw-muted, #9db1be);
  font-size: 11.5px;
}
.nw-conversation-file-version-bar [data-reload-file-viewer] {
  flex: none;
}
.nw-conversation-file-editor {
  margin: 20px 0 0;
  padding: 19px 20px;
  border: 1px solid color-mix(in srgb, var(--nw-aqua, #63dcd2) 22%, #ffffff16);
  border-radius: 13px;
  background: color-mix(in srgb, #0d2433 90%, var(--nw-aqua, #63dcd2));
}
.nw-conversation-file-editor[hidden] {display: none;}
.nw-conversation-file-editor h3 {
  margin: 0 0 5px;
  font-size: 17px;
  font-weight: 660;
}
.nw-conversation-file-edit-note {
  margin: 0 0 20px;
  max-inline-size: 80ch;
  color: var(--nw-muted, #9db1be);
  font-size: 12px;
  line-height: 1.6;
}
.nw-conversation-file-editor-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0 0 16px;
  font-size: 12px;
  color: #c7dce4;
  font-weight: 650;
}
.nw-conversation-file-editor-field :is(textarea,input,select) {
  box-sizing: border-box;
  display: block;
  inline-size: 100%;
  min-inline-size: 0;
  border: 1px solid #ffffff36;
  border-radius: 9px;
  padding: 11px 12px;
  outline-offset: 3px;
  background: #091a27;
  color: #e6f2f4;
  font-family: "Cascadia Code", Consolas, ui-monospace, monospace;
  font-size: 12.5px;
  font-weight: 430;
  line-height: 1.55;
  resize: vertical;
}
.nw-conversation-file-editor-field select {
  font-family: inherit;
}
.nw-conversation-file-editor-field :is(textarea,input,select):focus-visible,
.nw-conversation-file-version-select:focus-visible {
  outline: 2px solid var(--nw-focus, #8ccaff);
}
.nw-conversation-file-edit-original {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 16px;
  color: var(--nw-muted, #9db1be);
  font-size: 12px;
}
.nw-conversation-file-edit-original code {
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid #ffffff23;
  border-radius: 8px;
  color: #e4f0f5;
  background: #071725;
  font-family: "Cascadia Code", Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.nw-conversation-file-editor-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}
.nw-conversation-file-editor-actions .nw-conversation-file-edit-save {
  border-color: color-mix(in srgb, var(--nw-aqua, #63dcd2) 48%, transparent);
  background: #63dcd225;
  color: #b7fcf1;
}
.nw-conversation-file-editor-actions button[disabled] {
  opacity: .55;
  cursor: wait;
}
.nw-conversation-file-edit-feedback {
  margin: 15px 0 0;
  color: var(--nw-muted, #9db1be);
  line-height: 1.6;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.nw-conversation-file-edit-feedback:empty {display: none;}
.nw-conversation-file-edit-feedback[data-state="error"] {
  color: #ffc19a;
}
.nw-conversation-file-edit-feedback[data-state="saved"] {
  color: #9af0dd;
}
.nw-conversation-file-editable-table .nw-conversation-file-cell-select {
  display: block;
  inline-size: 100%;
  max-inline-size: none;
  min-block-size: 30px;
  margin: -8px -11px;
  padding: 8px 11px;
  border: 0;
  border-radius: 0;
  background: #63dcd209;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: 450;
  text-align: start;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.nw-conversation-file-editable-table .nw-conversation-file-cell-select:hover,
.nw-conversation-file-editable-table .nw-conversation-file-cell-select:focus-visible {
  background: #63dcd21c;
}
.nw-conversation-file-footer-links,
.nw-conversation-file-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.nw-conversation-file-footer-actions {
  margin-inline-start: auto;
}
.nw-conversation-file-footer [hidden] {display: none;}
.nw-conversation-file-revised-download {
  border: 1px solid #ffffff26;
  color: #d3e8ed;
}
.nw-conversation-file-footer [data-edit-file-viewer] {
  border: 1px solid color-mix(in srgb, var(--nw-aqua, #63dcd2) 35%, transparent);
  color: #9df5e9;
}
.nw-conversation-file-footer [data-edit-file-viewer][disabled] {
  color: var(--nw-muted, #9db1be);
  opacity: .6;
  cursor: not-allowed;
}
@media (max-width: 640px) {
  .nw-conversation-file-version-bar {
    align-items: stretch;
  }
  .nw-conversation-file-version-caption {
    flex: 1 1 100%;
  }
  .nw-conversation-file-version-select {
    inline-size: 100%;
  }
  .nw-conversation-file-editor {
    padding: 16px 14px;
  }
  .nw-conversation-file-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .nw-conversation-file-footer-actions {
    inline-size: 100%;
    margin-inline-start: 0;
    justify-content: flex-end;
  }
}

/* Inline rich conversation: semantic composition, shared chat tokens, one renderer. */
.nw-conversation-surface .smile-interactive{
  --rich-line:var(--nw-stream-divider,#304755);
  --rich-ink:var(--nw-stream-ink,#edf4f7);
  --rich-muted:var(--nw-stream-ink-soft,#b9cbd5);
  --rich-accent:var(--nw-stream-emphasis,#63dcd2);
  --rich-surface:var(--nw-stream-surface,#182d3b);
  color:var(--rich-ink);margin:16px 0;min-width:0;max-width:100%;
  container-type:inline-size;display:grid;gap:14px;
}
.nw-conversation-surface .smile-interactive,.nw-conversation-surface .smile-interactive *{box-sizing:border-box}
.nw-conversation-surface .smile-interactive :is(.smile-interactive-group,.smile-interactive-stage-content){min-width:0;max-width:100%}
.nw-conversation-surface .smile-interactive[data-surface=panel],.nw-conversation-surface .smile-interactive-group[data-surface=panel]{
  border:1px solid var(--rich-line);border-radius:16px;padding:clamp(12px,3%,18px);background:var(--rich-surface);
}
.nw-conversation-surface .smile-interactive[data-surface=accent],.nw-conversation-surface .smile-interactive-group[data-surface=accent]{
  border:1px solid color-mix(in srgb,var(--rich-accent) 32%,var(--rich-line));
  border-radius:16px;padding:clamp(12px,3%,18px);
  background:color-mix(in srgb,var(--rich-accent) 9%,var(--rich-surface));
}
.nw-conversation-surface .smile-interactive-group{display:grid;gap:10px;align-content:start;container-type:inline-size}
.nw-conversation-surface .smile-interactive-head{display:grid;gap:4px;min-width:0}
.nw-conversation-surface .smile-interactive .smile-interactive-title{font-size:1.05em;line-height:1.35;font-weight:650;letter-spacing:-.018em;margin:0;overflow-wrap:anywhere}
.nw-conversation-surface .smile-interactive-group .smile-interactive-title{font-size:.94em;letter-spacing:-.012em}
.nw-conversation-surface .smile-interactive .smile-interactive-description{font-size:.86em;line-height:1.5;color:var(--rich-muted);margin:0;overflow-wrap:anywhere}
.nw-conversation-surface .smile-interactive :is([data-align=center])>.smile-interactive-head{text-align:center}
.nw-conversation-surface .smile-interactive [data-align=center]>.smile-interactive-layout[data-layout=stack]>.smile-interactive-text{text-align:center}
.nw-conversation-surface .smile-interactive-layout{display:grid;gap:12px;min-width:0;grid-template-columns:minmax(0,1fr)}
.nw-conversation-surface .smile-interactive-layout>*{min-width:0;max-width:100%}
.nw-conversation-surface .smile-interactive-layout[data-layout=auto]{grid-template-columns:repeat(2,minmax(0,1fr))}
.nw-conversation-surface .smile-interactive-layout[data-layout=auto]>:not(.smile-interactive-input):not(.smile-interactive-value){grid-column:1/-1}
.nw-conversation-surface .smile-interactive-layout[data-layout=columns]{grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr));align-items:stretch}
.nw-conversation-surface .smile-interactive-layout[data-layout=flow]{gap:0}
.nw-conversation-surface .smile-interactive-stage{display:grid;justify-items:stretch;min-width:0}
.nw-conversation-surface .smile-interactive-connector{display:block;position:relative;width:24px;height:30px;justify-self:center;color:var(--rich-muted)}
.nw-conversation-surface .smile-interactive-connector::before{content:"";position:absolute;top:4px;left:11px;width:1px;height:19px;background:currentColor;opacity:.65}
.nw-conversation-surface .smile-interactive-connector::after{content:"";position:absolute;top:15px;left:8px;width:7px;height:7px;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:rotate(45deg)}
.nw-conversation-surface .smile-interactive-divider{border:0;border-block-start:1px solid var(--rich-line);margin:3px 0}
.nw-conversation-surface .smile-interactive-input{display:grid;gap:7px;align-content:start;min-width:0;font-size:.86em;color:var(--rich-muted)}
.nw-conversation-surface .smile-interactive-input>span{overflow-wrap:anywhere}
.nw-conversation-surface .smile-interactive-input>input:not([type=range]):not([type=checkbox]),.nw-conversation-surface .smile-interactive-input>select{
  border:1px solid var(--rich-line);border-radius:10px;min-height:42px;padding:9px 11px;width:100%;min-width:0;color:var(--rich-ink);background:var(--nw-canvas,#0d1a27);font:inherit
}
.nw-conversation-surface .smile-interactive-input>input[type=range]{width:100%;min-width:0;margin:0;accent-color:var(--rich-accent)}
.nw-conversation-surface .smile-interactive-input:has(input[type=checkbox]){display:flex;flex-direction:row-reverse;justify-content:flex-end;align-items:center;min-height:42px;gap:9px}
.nw-conversation-surface .smile-interactive-input>input[type=checkbox]{accent-color:var(--rich-accent);width:18px;height:18px;flex:none}
.nw-conversation-surface .smile-interactive-range-value{font-variant-numeric:tabular-nums;color:var(--rich-ink)}
.nw-conversation-surface .smile-interactive-value{display:grid;gap:5px;align-content:center;min-width:0;padding:10px 0}
.nw-conversation-surface .smile-interactive-value>span{font-size:.78em;line-height:1.35;color:var(--rich-muted);overflow-wrap:anywhere}
.nw-conversation-surface .smile-interactive-value>output{font-size:clamp(1.25rem,3.5cqi,1.8rem);line-height:1.15;font-weight:630;letter-spacing:-.035em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.nw-conversation-surface .smile-interactive .smile-interactive-text{margin:0;font-size:.94em;line-height:1.55;overflow-wrap:anywhere}
.nw-conversation-surface .smile-interactive .smile-interactive-text[data-tone=caption]{font-size:.81em;color:var(--rich-muted)}
.nw-conversation-surface .smile-interactive-table-wrap{overflow:auto;max-width:100%}
.nw-conversation-surface .smile-interactive-table{border-collapse:collapse;width:100%;text-align:left;font-size:.84em}
.nw-conversation-surface .smile-interactive-table caption{text-align:start;font-weight:600;margin-bottom:8px}
.nw-conversation-surface .smile-interactive-table :is(th,td){border-bottom:1px solid var(--rich-line);padding:9px 8px;overflow-wrap:anywhere}
.nw-conversation-surface .smile-interactive-table th{font-weight:600;color:var(--rich-muted)}
.nw-conversation-surface .smile-interactive-bars{margin:0;display:grid;gap:10px}
.nw-conversation-surface .smile-interactive-bars figcaption{font-size:.85em;font-weight:600;margin-bottom:4px}
.nw-conversation-surface .smile-interactive-bar-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(36px,2fr) auto;gap:9px;align-items:center;font-size:.79em}
.nw-conversation-surface .smile-interactive-bar-row>span{overflow-wrap:anywhere}
.nw-conversation-surface .smile-interactive-bar-track{height:10px;background:color-mix(in srgb,var(--rich-muted) 14%,transparent);border-radius:5px;position:relative;overflow:hidden}
.nw-conversation-surface .smile-interactive-bar-track::after{content:"";position:absolute;left:var(--zero,0%);top:0;bottom:0;width:1px;background:var(--rich-muted);opacity:.5}
.nw-conversation-surface .smile-interactive-bar{position:absolute;top:0;height:100%;border-radius:4px;background:var(--rich-accent);transition:width 150ms ease-out,left 150ms ease-out}
.nw-conversation-surface .smile-interactive-bar[data-negative=true]{background:var(--rich-muted)}
.nw-conversation-surface .smile-interactive-bar-value{font-variant-numeric:tabular-nums;text-align:right}
.nw-conversation-surface .smile-interactive-resource{display:flex;align-items:center;gap:12px;min-width:0;padding:8px 0}
.nw-conversation-surface .smile-interactive-resource+.smile-interactive-resource{border-block-start:1px solid var(--rich-line)}
.nw-conversation-surface .smile-interactive-resource:first-child{padding-top:0}
.nw-conversation-surface .smile-interactive-resource+.smile-interactive-value:last-child{grid-column:1/-1;display:flex;align-items:baseline;justify-content:space-between;border-top:1px solid var(--rich-line);padding:12px 0 0;gap:12px}
.nw-conversation-surface .smile-interactive-resource+.smile-interactive-value:last-child>output{font-size:1.25em;text-align:end}
.nw-conversation-surface .smile-interactive-resource>.smile-response-media{flex:0 0 76px;width:76px;aspect-ratio:1;border-radius:10px;overflow:hidden;background:var(--nw-canvas,#0d1a27)}
.nw-conversation-surface .smile-interactive-resource .smile-response-image-link,.nw-conversation-surface .smile-interactive-resource .smile-response-image-link img{width:100%;height:100%;object-fit:contain}
.nw-conversation-surface .smile-interactive-resource-copy{flex:1 1 0;min-width:0;display:grid;gap:4px;overflow-wrap:anywhere}
.nw-conversation-surface .smile-interactive-resource-copy strong{font-size:inherit;line-height:1.35;font-weight:650}
.nw-conversation-surface .smile-interactive-resource-copy p{margin:0;color:var(--rich-muted);font-size:.85em;line-height:1.45}
.nw-conversation-surface .smile-interactive-resource-copy a{color:inherit;text-decoration:underline;text-underline-offset:3px;justify-self:start}
.nw-conversation-surface .smile-interactive-resource-value{flex:0 0 auto;max-width:38%;font-weight:650;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;text-align:end}
.nw-conversation-surface .smile-interactive-footer{display:flex;justify-content:flex-end}
.nw-conversation-surface .smile-interactive-footer button{border:0;background:transparent;color:var(--rich-muted);border-radius:8px;min-height:32px;padding:4px 10px;cursor:pointer;font:inherit;font-size:.83em}
.nw-conversation-surface .smile-interactive-footer button:hover{background:color-mix(in srgb,var(--rich-muted) 10%,transparent);color:var(--rich-ink)}
.nw-conversation-surface .smile-interactive :is(button,input,select,a):focus-visible{outline:2px solid var(--rich-accent);outline-offset:3px}
@container (max-width:370px){
  .nw-conversation-surface .smile-interactive-layout[data-layout=auto]{grid-template-columns:minmax(0,1fr)}
  .nw-conversation-surface .smile-interactive-resource{gap:9px}
  .nw-conversation-surface .smile-interactive-resource>.smile-response-media{flex-basis:56px;width:56px}
}
@media(prefers-reduced-motion:reduce){.nw-conversation-surface .smile-interactive-bar{transition:none}}

 /* Illustrated results belong to the normal prose track. */
.nw-conversation-surface .nw-conversation-prose .smile-response-media,.nw-conversation-file-viewer .nw-conversation-prose .smile-response-media {display:inline-block;vertical-align:middle;max-width:100%;min-width:0;}
.nw-conversation-surface .nw-conversation-prose .smile-response-image-link,.nw-conversation-file-viewer .nw-conversation-prose .smile-response-image-link {display:block;max-width:100%;overflow:hidden;border-radius:12px;}
.nw-conversation-surface .nw-conversation-prose .smile-response-image-link[hidden],.nw-conversation-file-viewer .nw-conversation-prose .smile-response-image-link[hidden],.nw-conversation-surface .nw-conversation-prose .smile-response-media-unavailable[hidden],.nw-conversation-file-viewer .nw-conversation-prose .smile-response-media-unavailable[hidden] {display:none;}
.nw-conversation-surface .nw-conversation-prose .smile-response-image-link img,.nw-conversation-file-viewer .nw-conversation-prose .smile-response-image-link img {display:block;max-width:100%;height:auto;border-radius:inherit;}
.nw-conversation-surface .nw-conversation-prose .smile-response-media-unavailable,.nw-conversation-file-viewer .nw-conversation-prose .smile-response-media-unavailable {display:block;padding:12px;font-size:.85em;color:var(--nw-stream-ink-muted);overflow-wrap:anywhere;}
.nw-conversation-surface .nw-conversation-prose li.smile-response-illustrated-item {padding-block:13px;margin-block:0;}
.nw-conversation-surface .nw-conversation-prose li.smile-response-illustrated-item+li.smile-response-illustrated-item {border-top:1px solid color-mix(in srgb,currentColor 17%,transparent);margin-block-start:0;}
.nw-conversation-surface .nw-conversation-prose .smile-response-illustrated-row,.nw-conversation-file-viewer .nw-conversation-prose .smile-response-illustrated-row {display:grid;grid-template-columns:minmax(0,124px) minmax(0,1fr);gap:14px;align-items:start;}
.nw-conversation-surface .nw-conversation-prose .smile-response-illustrated-row>.smile-response-media,.nw-conversation-file-viewer .nw-conversation-prose .smile-response-illustrated-row>.smile-response-media {display:block;aspect-ratio:4/3;border-radius:12px;overflow:hidden;}
.nw-conversation-surface .nw-conversation-prose .smile-response-illustrated-row .smile-response-image-link,.nw-conversation-file-viewer .nw-conversation-prose .smile-response-illustrated-row .smile-response-image-link {width:100%;height:100%;}
.nw-conversation-surface .nw-conversation-prose .smile-response-illustrated-row .smile-response-image-link img,.nw-conversation-file-viewer .nw-conversation-prose .smile-response-illustrated-row .smile-response-image-link img {width:100%;height:100%;object-fit:contain;}
.nw-conversation-surface .nw-conversation-prose .smile-response-illustrated-copy,.nw-conversation-file-viewer .nw-conversation-prose .smile-response-illustrated-copy {min-width:0;overflow-wrap:anywhere;}
.nw-conversation-surface .nw-conversation-prose .smile-response-illustrated-copy>:last-child,.nw-conversation-file-viewer .nw-conversation-prose .smile-response-illustrated-copy>:last-child {margin-block-end:0;}
@media (max-width:600px){.nw-conversation-surface .nw-conversation-prose .smile-response-illustrated-row,.nw-conversation-file-viewer .nw-conversation-prose .smile-response-illustrated-row {grid-template-columns:minmax(0,88px) minmax(0,1fr);gap:10px;}}

/* The authored image, rather than a domain template, owns the composition. */
.nw-conversation-surface .nw-conversation-prose .smile-visual-source{margin:18px 0 22px;min-width:0;max-width:100%}
.nw-conversation-surface .smile-visual-source-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 3px 8px;color:var(--nw-stream-ink-muted,#90a8b7);font-size:12px}
.nw-conversation-surface .smile-visual-toggle{font:inherit;color:var(--nw-stream-ink-soft,#b9cbd5);background:transparent;border:1px solid var(--nw-stream-divider,#304755);border-radius:8px;padding:5px 11px;cursor:pointer}
.nw-conversation-surface .smile-visual-toggle:focus-visible{outline:2px solid var(--nw-stream-emphasis,#63dcd2);outline-offset:3px}
.nw-conversation-surface .smile-visual-toggle:disabled{opacity:.5;cursor:default}
.nw-conversation-surface .smile-visual-preview{display:grid;place-items:center;overflow:hidden;border-radius:14px;min-width:0;max-width:100%}
.nw-conversation-surface .smile-visual-preview img{display:block;width:100%;height:auto;max-width:100%}
.nw-conversation-surface .smile-visual-source pre{margin:0}
.nw-conversation-surface .smile-visual-source [hidden]{display:none}

/* The authored application shares the original visual response track. */
.nw-conversation-surface .smile-program-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.nw-conversation-surface .smile-program-preview{width:100%;min-width:0;height:clamp(300px,58vh,560px);min-height:240px;resize:vertical;overflow:auto;border:1px solid var(--nw-stream-divider,#304755);border-radius:14px;background:var(--nw-canvas,#0d1a27)}
.nw-conversation-surface .smile-program-frame{display:block;width:100%;height:100%;border:0;background:transparent}
.nw-conversation-surface .nw-conversation-prose .smile-program-status{font-size:12px;line-height:1.5;color:var(--nw-stream-ink-muted,#90a8b7);margin:8px 3px 0}

/* Spatial is a conversation resource, not another route-owned renderer. */
.nw-conversation-file-viewer[data-spatial=true] .nw-conversation-file-scroll {padding:12px 16px 20px;}
.nw-conversation-file-viewer[data-spatial=true] .nw-conversation-file-body {max-inline-size:none;}
.nw-conversation-artifact[data-file-format=glb] .nw-conversation-artifact-mark,
.nw-conversation-artifact:is([data-file-format=step],[data-file-format=iges],[data-file-format=brep]) .nw-conversation-artifact-mark {color:#a7e5ff;}

/* Spatial results belong to the conversation; focus moves the existing scene. */
.nw-conversation-surface .nw-conversation-artifact:has(> .nw-inline-spatial-slot:not([hidden])) {
  flex-wrap:wrap;transform:none;cursor:default;background:transparent;
  border-color:color-mix(in srgb,var(--nw-stream-divider) 65%,#78c9e7);
  padding:12px;
}
.nw-inline-spatial-slot[hidden]{display:none!important}
.nw-inline-spatial-slot{flex:1 0 100%;min-inline-size:0;inline-size:100%;max-inline-size:100%}
.nw-local-spatial-slot{margin:16px auto;max-inline-size:var(--nw-work-track,848px)}
.nw-conversation-file-viewer[data-placement=inline]{
  block-size:auto;overflow:visible;background:transparent;border:1px solid #42637b;
  border-radius:14px;cursor:default;
}
.nw-conversation-file-viewer[data-placement=inline] .nw-conversation-file-scroll{
  overflow:visible;padding:10px;min-inline-size:0;
}
.nw-conversation-file-viewer[data-placement=inline] .nw-conversation-file-header{
  padding:9px 12px;align-items:center;gap:8px;flex-wrap:wrap;
  background:linear-gradient(105deg,#17283c,#0b1624);border-radius:14px 14px 0 0;
}
.nw-spatial-header-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.nw-conversation-file-viewer[data-placement=inline] .nw-conversation-file-footer{display:none}
.nw-conversation-file-viewer[data-placement=inline] .nw-conversation-file-meta{font-size:11px}
.nw-conversation-file-viewer[data-spatial=true] .nw-device-model-stage{
  background:radial-gradient(ellipse at 48% 42%,#254a5c65,transparent 65%),linear-gradient(155deg,#101c2b,#060e19);
  border-color:#4a7a90;
}
.nw-conversation-file-viewer[data-placement=inline] .nw-spatial-model{
  grid-template-columns:minmax(0,1fr);align-items:start;
}
.nw-conversation-file-viewer[data-placement=inline] .nw-spatial-model .nw-device-viewport{
  grid-column:1;grid-row:1;
}
.nw-conversation-file-viewer[data-placement=inline] .nw-spatial-model :is(.nw-spatial-navigator,.nw-device-evidence){
  grid-column:1;grid-row:auto;
}
.nw-conversation-file-viewer[data-placement=inline] .nw-spatial-model .nw-device-model-stage{
  block-size:clamp(220px,38vh,400px);min-block-size:0;
}
.nw-conversation-file-viewer[data-placement=inline] .nw-spatial-model:not([data-study-details=open]) :is(.nw-spatial-navigator,.nw-device-evidence){display:none}
.nw-spatial-detail-toggle{display:none!important}
.nw-conversation-file-viewer[data-placement=inline] .nw-spatial-detail-toggle{display:inline-flex!important}
.nw-conversation-file-viewer[data-spatial=true] .nw-device-model-controls{flex-wrap:wrap}
.nw-conversation-file-viewer[data-spatial=true] .nw-spatial-model .nw-device-model-stage{min-block-size:0}
@container spatial-studio (max-width:719px){
 .nw-conversation-file-viewer[data-spatial=true] .nw-spatial-model:not([data-study-details=open]) :is(.nw-spatial-navigator,.nw-device-evidence){display:none}
 .nw-conversation-file-viewer[data-spatial=true] .nw-spatial-detail-toggle{display:inline-flex!important}
 .nw-conversation-file-viewer[data-spatial=true] .nw-spatial-model .nw-device-model-stage{block-size:clamp(210px,36vh,340px)}
}
.data-explore{margin:5px 0 14px;font-size:12px;color:var(--nw-muted,#a6b7c9)}
.data-explore summary{cursor:pointer;width:max-content;max-width:100%;padding:5px 0}
.data-explore[open] .data-tools{margin:6px 0 8px}


/* Immersive Studio: top-layer surface, live geometry and independent instruments. */
html:has(.nw-spatial-theater[open]){scrollbar-gutter:auto;overflow:hidden}
.nw-spatial-theater {
  position:fixed;inset:0;box-sizing:border-box;width:100vw;height:100%;height:100dvh;
  max-width:none;max-height:none;margin:0;padding:0;border:0;overflow:hidden;
  color:var(--nw-fg,#eaf4ff);background:#080f1a;
  font:inherit;
}
.nw-spatial-theater[open]{display:flex;flex-direction:column}
.nw-spatial-theater::backdrop{background:#03080fe6}
.nw-spatial-theater-bar{
  flex:none;display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:14px clamp(16px,3vw,42px);border-bottom:1px solid #9bbbd522;
  background:linear-gradient(110deg,#172c42,#0c1523 60%);z-index:3
}
.nw-spatial-theater-identity{min-width:0;display:grid;gap:4px}
.nw-spatial-theater-brand{font-size:10px;letter-spacing:.19em;font-weight:700;color:#8ddfdc}
.nw-spatial-theater-title{font-size:16px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nw-spatial-theater-back{
  flex:none;display:inline-flex;align-items:center;gap:9px;padding:10px 16px;border:1px solid #83b6d355;
  border-radius:24px;background:#90c8e217;color:#e6f3ff;font:inherit;font-size:13px;cursor:pointer
}
.nw-spatial-theater-back::before{content:"\2190";font-size:17px}
.nw-spatial-theater-back:hover{background:#a3ddff2b}
.nw-spatial-theater-back:focus-visible{outline:2px solid #9de3ff;outline-offset:3px}
.nw-spatial-theater-body{flex:1;min-height:0;min-width:0;overflow:hidden}
.nw-spatial-theater .nw-conversation-file-viewer{background:radial-gradient(ellipse at 48% 38%,#152b41,#080f1a 76%);height:100%}
.nw-spatial-theater .nw-conversation-file-header{display:none}
.nw-spatial-theater .nw-conversation-file-scroll{display:flex;flex-direction:column;min-height:0;padding:clamp(12px,2vw,28px);gap:8px;overflow:auto}
.nw-spatial-theater .nw-conversation-file-body{display:flex;flex:1;min-height:0;min-width:0;margin:0;max-width:none}
.nw-spatial-theater .nw-spatial-studio{flex:1;min-height:0;min-width:0;grid-template-rows:auto minmax(0,1fr);gap:12px}
.nw-spatial-theater .nw-spatial-studio:has(> .nw-spatial-model:only-child){grid-template-rows:minmax(0,1fr)}
.nw-spatial-theater .nw-spatial-model{min-height:0;min-width:0;gap:clamp(8px,1vw,16px)}
.nw-spatial-theater .nw-device-model-stage{
  border:1px solid #9bd9ff25;border-radius:24px;box-shadow:inset 0 1px #c5e6ff18,0 20px 80px #0005;
  background:radial-gradient(ellipse at 48% 38%,#34586c75,transparent 60%),linear-gradient(155deg,#15283b,#080f1a);
  transform-origin:center;
}
.nw-spatial-theater .nw-device-inspection[data-view-mode=assembly] .nw-device-model-stage{
  background:radial-gradient(ellipse at 48% 38%,#34586c75,transparent 60%),linear-gradient(155deg,#15283b,#080f1a);
}
.nw-spatial-theater .nw-spatial-model :is(.nw-spatial-navigator,.nw-device-evidence,.nw-assembly-controls){
  border:1px solid #b6d8f025;border-radius:18px;background:linear-gradient(145deg,#23394b70,#101a2ab0);
  box-shadow:inset 0 1px #e8f5ff0c,0 12px 30px #0003;padding:14px
}
.nw-spatial-theater .nw-spatial-model :is(.nw-device-model-controls,.nw-assembly-actions) button{
  border-radius:20px;border-color:#9bc6e72e;background:#b2d7f010;padding:8px 13px;min-height:34px
}
.nw-spatial-theater .nw-spatial-model button[aria-pressed=true]{background:#59b7d32b;border-color:#86d4e3a0}
.nw-spatial-theater .nw-conversation-file-footer{padding:8px 24px;background:#080f1a;border:0}
.nw-spatial-theater .nw-conversation-file-details{margin:0;max-width:none}
.nw-spatial-theater .nw-spatial-studio-toolbar{padding:0;gap:8px 12px}
.nw-spatial-theater .nw-spatial-studio-actions button{border-radius:24px}
.nw-spatial-theater .nw-device-model-controls{gap:6px}
.nw-spatial-theater .nw-spatial-model .nw-assembly-fidelity{color:#9bd8df}
.nw-inline-spatial-slot{scroll-margin-block-start:12px}
.nw-conversation-artifact:has(> .nw-inline-spatial-slot:not([hidden])){border-color:transparent}
.nw-conversation-artifact .nw-conversation-file-viewer[data-placement=inline] .nw-conversation-file-heading{display:none}
.nw-conversation-artifact .nw-conversation-file-viewer[data-placement=inline] .nw-conversation-file-header{justify-content:flex-end;background:transparent;border:0;padding-block-end:0}
.nw-conversation-file-viewer[data-placement=inline] [data-focus-spatial]{
  background:linear-gradient(115deg,#a5e5f2,#82b5ff);color:#071521;border:0;font-weight:700;border-radius:20px
}
@container spatial-studio (min-width:1120px){
 .nw-spatial-theater .nw-spatial-model{grid-template-columns:minmax(160px,.7fr) minmax(0,3.3fr) minmax(230px,.95fr);align-items:stretch;grid-template-rows:minmax(0,1fr)}
 .nw-spatial-theater .nw-device-viewport{grid-template-rows:max-content minmax(160px,1fr);grid-auto-rows:auto;min-height:0;align-content:stretch}
 .nw-spatial-theater .nw-device-model-stage{block-size:100%;min-block-size:160px}
 .nw-spatial-theater :is(.nw-spatial-navigator,.nw-device-evidence){min-height:0;overflow:auto;overscroll-behavior:contain}
}
@container spatial-studio (max-width:1119px){
 .nw-spatial-theater .nw-conversation-file-body{min-height:auto}
 .nw-spatial-theater .nw-spatial-model{grid-template-columns:minmax(0,1fr);grid-template-rows:auto;align-items:start}
 .nw-spatial-theater .nw-device-viewport{grid-row:1;grid-column:1}
 .nw-spatial-theater .nw-spatial-model :is(.nw-spatial-navigator,.nw-device-evidence){grid-row:auto;grid-column:1}
 .nw-spatial-theater .nw-spatial-model:not([data-study-details=open]) :is(.nw-spatial-navigator,.nw-device-evidence){display:none}
 .nw-spatial-theater .nw-spatial-detail-toggle{display:inline-flex!important}
 .nw-spatial-theater .nw-device-model-stage{block-size:clamp(180px,36dvh,440px)}
}
@media(max-width:600px){
 .nw-spatial-theater-bar{padding:12px 14px}
 .nw-spatial-theater-title{font-size:13px}
 .nw-spatial-theater-back{padding:8px 11px;font-size:12px}
 .nw-spatial-theater .nw-conversation-file-scroll{display:block;padding:10px}
 .nw-spatial-theater .nw-conversation-file-body{display:block}
 .nw-spatial-theater .nw-spatial-studio{grid-template-rows:auto;gap:8px}
 .nw-spatial-theater .nw-device-model-stage{border-radius:18px;block-size:clamp(180px,33dvh,300px)}
 .nw-spatial-theater .nw-spatial-model .nw-assembly-controls{padding:9px}
 .nw-spatial-theater .nw-device-model-controls button{padding:7px 10px}
}
@media(prefers-reduced-motion:no-preference){
 .nw-spatial-theater[open]{animation:nw-studio-enter 340ms cubic-bezier(.22,.8,.2,1)}
 @keyframes nw-studio-enter{from{opacity:.3}to{opacity:1}}
}

.nw-conversation-file-viewer[data-placement=inline] .nw-device-model-stage{block-size:clamp(190px,32vh,380px)}

/* The cinematic default is a model, not a wall of forms. Inspection reveals
   the same live component and material instruments without changing the scene. */
.nw-spatial-theater .nw-spatial-detail-toggle{display:inline-flex!important}
.nw-spatial-theater .nw-spatial-model:not([data-study-details=open]) :is(.nw-spatial-navigator,.nw-device-evidence){display:none}
.nw-spatial-theater .nw-spatial-model:not([data-study-details=open]){grid-template-columns:minmax(0,1fr)}
.nw-spatial-theater .nw-spatial-model:not([data-study-details=open]) .nw-device-viewport{grid-column:1}
.nw-spatial-theater .nw-device-model-stage:before{mask-image:radial-gradient(ellipse,#000 12%,transparent 80%);opacity:.55}
.nw-spatial-theater .nw-device-model-stage{box-shadow:inset 0 1px #d8eaff1a,0 24px 70px #0004}
.nw-spatial-theater .nw-assembly-controls,.nw-spatial-theater .nw-device-model-controls{width:100%;max-width:1040px;justify-self:center;box-sizing:border-box}
.nw-spatial-theater .nw-device-model-controls{justify-content:center}
.nw-spatial-theater .nw-spatial-detail-toggle{border-color:#83dce65c!important;color:#c7f7ff;background:#5c9bba23!important}
@media(prefers-reduced-motion:no-preference){
 .nw-spatial-theater[open] .nw-spatial-theater-bar{animation:nw-studio-chrome-in 300ms cubic-bezier(.22,.8,.2,1) both}
 @keyframes nw-studio-chrome-in{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
}

.nw-spatial-context-action{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.nw-spatial-context-action button{background:linear-gradient(115deg,#a5e5f2,#82b5ff);color:#071521;border:0;border-radius:18px;padding:8px 12px;font-size:12px;font-weight:650;cursor:pointer;max-width:100%}
.nw-spatial-context-action button:disabled{opacity:.5;cursor:default}
.nw-spatial-context-status{font-size:11px;color:#a9cbd7;margin:0;flex:1;min-width:0;overflow-wrap:anywhere}
.nw-spatial-context-status:empty{display:none}

/* Projected evidence is part of the model, not a fixed dashboard ornament. */
.nw-spatial-leaders,.nw-spatial-callouts{position:absolute;inset:0;inline-size:100%;block-size:100%;pointer-events:none;z-index:4;overflow:hidden}
.nw-spatial-leaders{z-index:3}
.nw-spatial-leader{fill:none;stroke:#8fc8d2;stroke-width:1;stroke-opacity:.50;vector-effect:non-scaling-stroke}
.nw-spatial-leader-dot{fill:#c4e6ef;stroke:#102a3b;stroke-width:1;vector-effect:non-scaling-stroke}
.nw-spatial-leader[data-active=true]{stroke:#c5faff;stroke-opacity:1;stroke-width:1.5}
.nw-spatial-leader-dot[data-active=true]{fill:#efffff;stroke:#69d7ed}
.nw-spatial-comparison-link{fill:none;stroke:#ffd5a0;stroke-width:1.5;stroke-dasharray:5 5;vector-effect:non-scaling-stroke}
.nw-spatial-callout{position:absolute;inset:0 auto auto 0;pointer-events:auto;text-align:start;box-sizing:border-box;font:inherit;font-size:10px;line-height:1.2;font-weight:550;padding:7px 9px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#c6e7ed;background:linear-gradient(110deg,#122b3eea,#071522e8);border:1px solid #6899ab90;border-inline-start:2px solid #9bdbea;border-radius:2px 8px 8px 2px;cursor:pointer;box-shadow:0 3px 14px #0004}
.nw-spatial-callout[hidden]{display:none!important}
.nw-spatial-callout:hover,.nw-spatial-callout[aria-pressed=true]{color:#f0fdff;border-color:#b8f4f9;background:linear-gradient(110deg,#21556b,#10293c)}
.nw-spatial-callout[data-reference=true]{border-color:#e6bd89;color:#ffe5c6}
.nw-spatial-callout:focus-visible{outline:2px solid #b8f4f9;outline-offset:2px}
.nw-spatial-comparison{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;padding:10px 14px;border:1px solid #7cb9cf35;border-radius:12px;background:linear-gradient(120deg,#17354a9c,#0c1c2b99);min-width:0}
.nw-spatial-comparison[hidden]{display:none!important}
.nw-spatial-comparison .nw-spatial-instrument-kicker,.nw-spatial-comparison .nw-spatial-measure-value,.nw-spatial-comparison .nw-spatial-comparison-status{grid-column:1;overflow-wrap:anywhere}
.nw-spatial-comparison .nw-assembly-actions{grid-column:2;grid-row:1/4;align-self:center;justify-content:flex-end}
.nw-spatial-comparison .nw-assembly-actions button{white-space:normal}
@container spatial-studio (max-width:719px){.nw-spatial-comparison{grid-template-columns:minmax(0,1fr);padding:9px 11px}.nw-spatial-comparison .nw-assembly-actions{grid-column:1;grid-row:auto;justify-content:flex-start}}
.nw-spatial-instrument-kicker{font-size:9px;letter-spacing:.14em;font-weight:700;color:#9acbd8;margin:0}
.nw-spatial-measure-value{font-size:14px;font-weight:600;line-height:1.4;color:var(--nw-fg,#eaf6ff);font-variant-numeric:tabular-nums}
.nw-spatial-comparison-status{font-size:11px;color:#b8cbd6;line-height:1.5;margin:0;overflow-wrap:anywhere}
.nw-spatial-theater .nw-device-model-stage{border-color:#729fb34a;background:radial-gradient(ellipse at 50% 46%,#1b4152a0,transparent 64%),linear-gradient(160deg,#0d1c2b,#070e17)}
.nw-spatial-theater .nw-device-model-stage::before{background-size:36px 36px;mask-image:radial-gradient(ellipse,#000 20%,transparent 86%)}
.nw-spatial-theater .nw-device-inspection[data-view-mode=assembly] .nw-device-model-stage{background:radial-gradient(ellipse at 50% 46%,#1b4152a0,transparent 64%),linear-gradient(160deg,#0d1c2b,#070e17)}
.nw-spatial-theater .nw-spatial-model :is(.nw-spatial-navigator,.nw-device-evidence){background:linear-gradient(145deg,#172b3cbb,#0b1623e8);border-color:#76a9c33b;border-radius:14px}
.nw-spatial-theater .nw-spatial-model .nw-assembly-parts-heading{color:#9ad3dd;letter-spacing:.09em;font-size:9px}
.nw-spatial-theater .nw-assembly-part-list button[aria-pressed=true]{border-inline-start:2px solid #9deaf3;background:linear-gradient(90deg,#22566b,#14283b)}
.nw-spatial-theater .nw-spatial-model .nw-assembly-selected-detail{border-color:#6895a44d;background:#0c1c2b99}
.nw-spatial-theater .nw-spatial-context-action{justify-content:center}
.nw-spatial-theater .nw-spatial-model .nw-assembly-modes{min-height:0}
.nw-spatial-theater .nw-spatial-model .nw-assembly-fidelity{font-size:9px;letter-spacing:.11em}
.nw-spatial-theater .nw-device-model-stage{border-radius:16px;box-shadow:inset 0 1px #d8eaff12,0 20px 65px #0004}
.nw-spatial-theater .nw-spatial-studio-toolbar .nw-device-scene-caption{display:none}
.nw-spatial-theater .nw-spatial-studio-toolbar{align-items:center}
.nw-spatial-theater .nw-spatial-studio-toolbar .nw-spatial-studio-status{font-size:11px;color:#aac4d3}
.nw-spatial-theater .nw-spatial-navigator .nw-device-subject-head{display:none}
.nw-spatial-theater .nw-spatial-navigator{align-content:start}
.nw-spatial-theater .nw-spatial-navigator .nw-assembly-part-list{max-height:none;min-height:0;overflow:auto}
.nw-spatial-theater .nw-assembly-controls{background:linear-gradient(130deg,#142b3d92,#0b1725cc);border-color:#6e9dbb35}
.nw-spatial-theater .nw-spatial-model .nw-device-model-controls button[aria-pressed=true]{color:#d8f7ff;background:#2a6c7f55;border-color:#91d3de80}
@media(max-width:600px){.nw-spatial-callout{font-size:9px;padding:6px 5px}.nw-spatial-theater .nw-spatial-model .nw-assembly-controls{border-radius:12px}.nw-spatial-theater .nw-spatial-model .nw-device-model-controls button{font-size:10px}}

/* The desktop instruments share the stage grid; compact Studio has a separate
   bounded instrument dock rather than a single long, scrolling dashboard. */
.nw-spatial-instrument-dock,.nw-spatial-instrument-body{display:contents}
.nw-spatial-instrument-rail{display:none}
@media(max-width:719px){
 .nw-spatial-theater .nw-conversation-file-scroll{display:flex;min-block-size:0;overflow:hidden;gap:4px;padding:8px 12px}
 .nw-spatial-theater .nw-conversation-file-body{display:flex;flex:1;min-block-size:0}
 .nw-spatial-theater .nw-spatial-studio{flex:1;min-block-size:0;grid-template-rows:auto minmax(0,1fr);gap:8px}
 .nw-spatial-theater .nw-spatial-studio:has(> .nw-spatial-model:only-child){grid-template-rows:minmax(0,1fr)}
 .nw-spatial-theater .nw-spatial-model{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;min-block-size:0;gap:8px;align-items:stretch}
 .nw-spatial-theater .nw-spatial-model .nw-device-viewport{grid-column:1;grid-row:1;min-block-size:0;overflow:auto;overscroll-behavior:contain;align-content:start;grid-template-rows:max-content;grid-auto-rows:max-content}
 .nw-spatial-theater .nw-spatial-model .nw-device-model-stage{block-size:clamp(155px,32dvh,290px);min-block-size:0}
 .nw-spatial-theater .nw-spatial-instrument-dock{grid-column:1;grid-row:2;display:flex;flex-direction:column;min-block-size:0;max-block-size:min(36dvh,320px);border:1px solid #6e9cb952;border-radius:15px;background:linear-gradient(140deg,#1a3144,#0a1724);overflow:hidden;box-shadow:0 -10px 35px #0003}
 .nw-spatial-theater .nw-spatial-model:not([data-study-details=open]) .nw-spatial-instrument-dock{display:none}
 .nw-spatial-theater .nw-spatial-instrument-rail{display:flex;align-items:center;gap:4px;padding:7px;border-bottom:1px solid #a2c8df24;flex:none}
 .nw-spatial-theater .nw-spatial-instrument-rail button{border:0;border-radius:14px;padding:6px 8px;background:#c4e7fa12;color:#d6eef7;font:inherit;font-size:11px;cursor:pointer}
 .nw-spatial-theater .nw-spatial-instrument-rail .nw-spatial-instrument-done{margin-inline-start:auto;color:#99edee}
 .nw-spatial-theater .nw-spatial-instrument-body{display:block;min-block-size:0;overflow:auto;overscroll-behavior:contain}
 .nw-spatial-theater .nw-spatial-model :is(.nw-spatial-navigator,.nw-device-evidence){border:0;box-shadow:none;border-radius:0;background:transparent;overflow:visible;padding:10px 12px}
 .nw-spatial-theater .nw-spatial-navigator .nw-assembly-part-list{max-block-size:130px;overflow:auto}
 .nw-spatial-theater .nw-spatial-model[data-study-details=open] .nw-device-viewport{scroll-padding-block:8px}
 .nw-spatial-theater .nw-conversation-file-details{display:none}
 .nw-spatial-theater .nw-conversation-file-footer{flex:none}
}

/* A single scene supplies all three live optical planes. The auxiliary
   views are a presentation of the same selected and sectioned source. */
.nw-spatial-view-frames{position:absolute;inset:0;pointer-events:none;z-index:2;overflow:hidden}
.nw-spatial-view-frames[hidden]{display:none!important}
.nw-spatial-aux-view{position:absolute;box-sizing:border-box;border-inline-start:1px solid #80adc85c;border-block-start:1px solid #80adc838;overflow:hidden}
.nw-spatial-aux-label{position:absolute;top:9px;left:10px;max-width:calc(100% - 20px);font-size:10px;letter-spacing:.075em;color:#b8dce8;padding:4px 7px;border-radius:4px;background:#081724ba}
.nw-spatial-aux-marker{position:absolute;inline-size:13px;block-size:13px;border-radius:50%;border:1.5px solid #a7eeff;box-shadow:0 0 0 3px #a7eeff27;transform:translate(-50%,-50%)}
.nw-spatial-aux-marker[hidden]{display:none!important}
.nw-device-model-stage[data-linked-views=true] .nw-spatial-axis-view{bottom:calc(10px + var(--nw-view-bottom,0px))}
.nw-device-model-stage[data-linked-views=true] .nw-spatial-render-stats{right:calc(9px + var(--nw-view-right,0px));bottom:calc(7px + var(--nw-view-bottom,0px))}
.nw-spatial-study-file{border-block-start:1px solid #80adc82e;padding-block:10px}
.nw-spatial-study-file summary{cursor:pointer;color:#d5eaf6;font-size:12px;font-weight:650}
.nw-spatial-study-file .nw-assembly-actions{margin-block:10px 6px}
.nw-spatial-study-file .nw-assembly-actions button{border:1px solid #79afce55;border-radius:18px;background:#72b9d41a;color:#d8ecf7;padding:8px 12px;font-size:11px;cursor:pointer}
.nw-spatial-study-file input[hidden]{display:none!important}
@media(max-width:719px){
 .nw-spatial-theater .nw-spatial-model .nw-device-viewport{container-type:size}
 .nw-spatial-theater .nw-spatial-model .nw-device-model-stage[data-linked-views=true]{block-size:min(420px,48dvh,max(155px,calc(100cqh - 49px)))}
 .nw-spatial-theater .nw-spatial-model .nw-device-model-stage:not([data-linked-views=true]){block-size:min(290px,32dvh,max(155px,calc(100cqh - 49px)))}
 .nw-spatial-theater .nw-spatial-render-stats{max-inline-size:calc(100% - 75px);white-space:normal;text-align:end;font-size:8px}
 .nw-spatial-aux-label{top:5px;left:5px;font-size:9px;padding:3px 5px}
}

.nw-spatial-aux-scale{position:absolute;inset:auto 9px 8px auto;display:grid;justify-items:end;gap:3px;max-inline-size:calc(100% - 18px);color:#afd4de;font-size:9px;background:#071421bf;padding:3px 6px;border-radius:3px;font-variant-numeric:tabular-nums}
.nw-spatial-aux-scale-line{display:block;height:5px;border:1px solid #b4e2ea;border-block-start:0;box-sizing:border-box}
.nw-spatial-aux-scale-text{white-space:nowrap}
@media(max-width:719px){.nw-spatial-aux-scale{inset:auto 4px 4px auto;padding:2px 4px;font-size:8px}}


.nw-spatial-model .nw-assembly-modes:has(.nw-spatial-study-identity){display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;min-block-size:max-content}
.nw-spatial-study-identity{min-width:0;display:grid;gap:3px;align-content:center}
.nw-spatial-study-identity .nw-assembly-fidelity{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nw-spatial-study-trigger{border-radius:18px!important;letter-spacing:.025em;color:#d9f8f5!important;border-color:#7ec1c78a!important;background:#25566c55!important}
.nw-spatial-study-indicator{font-size:10px;color:#a6cbd5;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nw-spatial-study-indicator[hidden]{display:none}
.nw-spatial-study-instrument{position:fixed;inset:clamp(72px,12dvh,122px) 22px auto auto;margin:0;width:min(350px,calc(100vw - 32px));max-height:calc(100dvh - 150px);box-sizing:border-box;overflow:auto;overscroll-behavior:contain;padding:18px;border:1px solid #8bbac374;border-radius:20px;background:radial-gradient(ellipse at 0 0,#20485c80,transparent 65%),#101e2af5;color:#e6f2f8;box-shadow:0 18px 65px #0009, inset 0 1px #ccefff24;font-family:inherit}
.nw-spatial-study-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.nw-spatial-study-head h4{margin:3px 0 0;font-size:21px;letter-spacing:-.04em;font-weight:650}
.nw-spatial-study-close{border:1px solid #8fbac65e;border-radius:18px;padding:8px 14px;background:#a1d7e51a;color:#def7f6;cursor:pointer;font:inherit;font-size:12px}
.nw-spatial-study-source{font-size:11px;overflow-wrap:anywhere;color:#abc8d4;margin:8px 0 17px}
.nw-spatial-checkpoints{border-block-start:1px solid #80adc82e;padding-block:12px;min-width:0}
.nw-spatial-checkpoints h5{margin:0 0 8px;font-size:13px;font-weight:650}
.nw-spatial-checkpoints input{width:100%;min-width:0;box-sizing:border-box;background:#0b1926;color:#e3f3fa;border:1px solid #80adc852;border-radius:8px;padding:10px;font:inherit;font-size:12px;margin-block:8px}
.nw-spatial-checkpoints .nw-assembly-actions{margin-block:0 10px}
.nw-spatial-checkpoints .nw-assembly-actions button{border:1px solid #79afce55;border-radius:18px;background:#72b9d41a;color:#d8ecf7;padding:8px 12px;font-size:11px;cursor:pointer}
.nw-spatial-checkpoints .nw-spatial-checkpoint-save{background:linear-gradient(115deg,#a5e5f2,#82b5ff);color:#071521;font-weight:700}
.nw-spatial-checkpoint-list{display:grid;gap:6px;margin-top:10px}
.nw-spatial-checkpoint-entry{display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:start;min-width:0;padding:11px;background:#7faed10e;border:1px solid #80adc82e;border-radius:10px;color:#e1f2f7;cursor:pointer}
.nw-spatial-checkpoint-entry[data-selected=true]{border-color:#88e4e47d;background:#3b93a324}
.nw-spatial-checkpoint-entry:disabled{opacity:.55}
.nw-spatial-checkpoint-copy{display:grid;gap:4px;min-width:0;overflow-wrap:anywhere}
.nw-spatial-checkpoint-copy strong{font-size:12px;font-weight:650}
.nw-spatial-checkpoint-copy small{color:#adc6d0;font-size:10px}
.nw-spatial-checkpoint-arrow{color:#90d7e3}
.nw-spatial-study-instrument .nw-device-model-note{color:#b0ccd8;font-size:11px;line-height:1.5;margin:0}
@media(prefers-reduced-motion:no-preference){
 .nw-spatial-study-instrument{opacity:0;transform:translate3d(12px,8px,0) scale(.98);transform-origin:top right;transition:opacity .18s ease,transform .22s cubic-bezier(.22,.8,.2,1),display .22s allow-discrete,overlay .22s allow-discrete}
 .nw-spatial-study-instrument:popover-open{opacity:1;transform:none}
 @starting-style{.nw-spatial-study-instrument:popover-open{opacity:0;transform:translate3d(12px,8px,0) scale(.98)}}
}
@media(max-width:719px){
 .nw-spatial-study-instrument{inset:auto 12px 12px 12px;width:auto;max-height:min(56dvh,440px);padding:15px;border-radius:19px;transform-origin:bottom center}
 .nw-spatial-study-indicator{font-size:9px}
}
.nw-project-spatial-studies{margin-block:12px 22px}
.nw-project-spatial-studies .nw-project-item{width:100%;text-align:start}

/* The immersive scene owns its usable space; the document metadata is a
   compact source instrument, not a second document header. */
.nw-spatial-theater-body{display:flex}
.nw-spatial-theater .nw-conversation-file-version-bar:not([hidden]){align-items:center;flex-wrap:nowrap;padding:0 0 6px;margin:0;gap:8px;border:0;background:transparent}
.nw-spatial-theater .nw-conversation-file-version-caption{flex-direction:row;align-items:center;gap:8px}
.nw-spatial-theater .nw-conversation-file-version-select{min-inline-size:0;min-block-size:28px;max-inline-size:190px;padding:4px 24px 4px 8px}
.nw-spatial-theater .nw-conversation-file-version-status{padding:0}
.nw-spatial-theater .nw-conversation-file-footer{padding:4px 16px}
.nw-spatial-theater .nw-conversation-file-viewer[data-spatial=true] .nw-conversation-file-details{margin:0}
@media(min-width:1120px){
 .nw-spatial-theater .nw-conversation-file-scroll{padding:12px 18px;overflow:hidden;gap:5px}
 .nw-spatial-theater .nw-spatial-model{grid-template-rows:minmax(0,1fr);align-items:stretch}
 .nw-spatial-theater .nw-device-viewport{min-width:0;min-height:0;grid-template-rows:max-content minmax(150px,1fr);grid-auto-rows:max-content;gap:6px;align-content:stretch;overflow:auto}
 .nw-spatial-theater .nw-spatial-model .nw-device-model-stage{block-size:100%;min-height:0;border-radius:12px}
 .nw-spatial-theater .nw-spatial-model .nw-assembly-controls{padding:7px 10px;gap:4px 10px;border-radius:10px}
 .nw-spatial-theater .nw-spatial-model :is(.nw-device-model-controls,.nw-assembly-actions) button{min-height:28px;padding:5px 10px}
}
.nw-spatial-stage-status{grid-area:1/1;z-index:5;align-self:center;justify-self:center;display:grid;justify-items:center;gap:10px;max-width:min(460px,85%);padding:20px;text-align:center;color:#d7eaf2}
.nw-spatial-stage-status[hidden],.nw-spatial-stage-status button[hidden]{display:none!important}
.nw-spatial-stage-status strong{font-size:20px;font-weight:650;letter-spacing:-.025em}
.nw-spatial-stage-status p{font-size:12px;line-height:1.55;color:#afc6d4;overflow-wrap:anywhere;margin:0}
.nw-spatial-stage-status button{border:1px solid #8ccbd6;border-radius:18px;background:#a7e5ef;color:#0b1c29;padding:9px 16px;font:inherit;font-size:12px;font-weight:650;cursor:pointer}
.nw-spatial-model[data-model-state=fallback] .nw-device-model-stage{border-color:#b8a08865}
.nw-spatial-model[data-model-state=fallback] .nw-model-axis-label{visibility:hidden}
@media(max-width:719px){.nw-spatial-theater .nw-conversation-file-version-status{display:none}.nw-spatial-theater .nw-conversation-file-version-caption{font-size:10px}.nw-spatial-theater .nw-conversation-file-version-bar button{padding:4px 8px;min-height:28px}}

/* The immersive view has a real optical field and a subordinate command
   instrument. Inline previews and compact screens keep their original flow. */
.nw-spatial-command-deck{display:contents}
@media(min-width:1200px){
 .nw-spatial-theater .nw-spatial-model:not([data-study-details=open]) .nw-device-viewport{
  grid-template-columns:minmax(0,1fr) minmax(220px, min(24vw,310px));
  grid-template-rows:max-content minmax(0,1fr);
  gap:10px;overflow:hidden;
 }
 .nw-spatial-theater .nw-spatial-model:not([data-study-details=open]) .nw-assembly-modes{grid-column:1/-1;grid-row:1}
 .nw-spatial-theater .nw-spatial-model:not([data-study-details=open]) .nw-device-model-stage{grid-column:1;grid-row:2;min-height:0;block-size:100%;border-radius:16px}
 .nw-spatial-theater .nw-spatial-model:not([data-study-details=open]) .nw-spatial-command-deck{
  display:flex;flex-direction:column;grid-column:2;grid-row:2;min-block-size:0;min-width:0;gap:12px;
  overflow:auto;overscroll-behavior:contain;padding:14px 12px;
  border:1px solid #7fbac33a;border-radius:16px;
  background:linear-gradient(150deg,#15344880,#0b1724e8 60%);
  box-shadow:inset 0 1px #c2eaff16,0 14px 30px #0004;
 }
 .nw-spatial-theater .nw-spatial-model:not([data-study-details=open]) .nw-spatial-command-deck .nw-assembly-controls{display:grid;grid-template-columns:minmax(0,1fr);width:100%;background:transparent;box-shadow:none;border:0;padding:0;gap:10px}
 .nw-spatial-theater .nw-spatial-model:not([data-study-details=open]) .nw-spatial-command-deck .nw-assembly-controls[hidden]{display:none}
 .nw-spatial-theater .nw-spatial-model:not([data-study-details=open]) .nw-spatial-command-deck .nw-spatial-comparison{grid-template-columns:minmax(0,1fr);padding:10px;gap:6px}
 .nw-spatial-theater .nw-spatial-model:not([data-study-details=open]) .nw-spatial-command-deck .nw-spatial-comparison .nw-assembly-actions{grid-column:1;grid-row:auto;justify-content:flex-start}
 .nw-spatial-theater .nw-spatial-model:not([data-study-details=open]) .nw-spatial-command-deck .nw-spatial-context-action{justify-content:stretch}
 .nw-spatial-theater .nw-spatial-model:not([data-study-details=open]) .nw-spatial-command-deck .nw-spatial-context-action button{width:100%;white-space:normal;text-align:center}
 .nw-spatial-theater .nw-spatial-model:not([data-study-details=open]) .nw-spatial-command-deck .nw-device-model-controls{justify-content:flex-start;border-top:1px solid #8fbad32b;padding-top:12px}
 .nw-spatial-theater .nw-spatial-model:not([data-study-details=open]) .nw-spatial-command-deck .nw-assembly-layout select{width:100%;min-width:0}
 .nw-spatial-theater .nw-spatial-model:not([data-study-details=open]) .nw-spatial-command-deck .nw-assembly-section-controls{grid-template-columns:auto minmax(0,1fr) auto}
 .nw-spatial-theater .nw-spatial-model:not([data-study-details=open]) .nw-spatial-command-deck .nw-assembly-section-controls input{grid-column:1/-1}
 .nw-spatial-theater .nw-spatial-model[data-inspection-lens=motion]:not([data-study-details=open]) .nw-device-viewport{grid-template-columns:minmax(0,1fr) minmax(330px,min(32vw,430px))}
}
@media(max-width:719px){
 .nw-spatial-theater .nw-spatial-model[data-inspection-lens=motion]:not([data-study-details=open]) .nw-device-viewport{grid-template-rows:max-content minmax(140px,27dvh) minmax(0,1fr);grid-auto-rows:max-content;overflow:hidden;align-content:stretch;container-type:normal}
 .nw-spatial-theater .nw-spatial-model[data-inspection-lens=motion]:not([data-study-details=open]) .nw-device-model-stage{block-size:100%;min-height:0}
 .nw-spatial-theater .nw-spatial-model[data-inspection-lens=motion]:not([data-study-details=open]) .nw-spatial-command-deck{display:flex;flex-direction:column;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;gap:8px;padding:0 2px 8px}
 .nw-spatial-theater .nw-spatial-model[data-inspection-lens=motion] .nw-motion-map{max-width:190px}
 .nw-spatial-theater .nw-spatial-model[data-inspection-lens=motion] .nw-motion-atlas{padding:8px}
}

.nw-authored-motion{display:grid;gap:8px;padding:12px;border:1px solid #314d61;border-radius:9px;background:#112232}
.nw-authored-motion select,.nw-authored-transport button{border:1px solid #426783;border-radius:7px;padding:7px 10px;background:#10253b;color:#d8ecf7;min-height:32px;font:inherit;font-size:12px}
.nw-authored-motion select{width:100%;min-width:0;color-scheme:dark}
.nw-authored-transport{display:flex;align-items:center;gap:8px}
.nw-authored-transport button{cursor:pointer;flex:none;min-width:60px}
.nw-authored-transport button:hover:not(:disabled){border-color:#89d9ff;background:#1b425c}
.nw-authored-motion :disabled{opacity:.45;cursor:default}
.nw-authored-transport input{min-width:0;flex:1;accent-color:#81d2fc}
.nw-authored-transport output{font-size:11px;white-space:nowrap;font-variant-numeric:tabular-nums;color:#b2edff}


/* Conversation-native bot request — a compact decision, not a setup dashboard. */
.nw-bot-request{display:grid;gap:15px;max-width:100%;min-width:0;margin:12px 0 18px;padding:20px 22px;border:1px solid var(--nw-stroke);border-radius:20px;background:linear-gradient(145deg,var(--nw-pane),var(--nw-canvas));color:var(--nw-fg);font-size:15px;line-height:1.55;box-shadow:0 8px 30px #0002}
.nw-bot-request-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;min-width:0}
.nw-bot-request-identity{min-width:0}.nw-bot-request-head h3{font-size:19px;font-weight:650;letter-spacing:-.025em;margin:0;line-height:1.25;overflow-wrap:anywhere}
.nw-bot-request-meta{font-size:12px;color:var(--nw-muted);margin:4px 0 0}
.nw-bot-request-body{display:grid;gap:13px;min-width:0}.nw-bot-request-body>p,.nw-bot-source-content>p{margin:0}
.nw-bot-request-note{color:var(--nw-soft);font-size:13px;margin:0}.nw-bot-request-purpose{font-weight:560;overflow-wrap:anywhere}
.nw-bot-brief{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:0 0 3px;min-width:0}.nw-bot-brief>div{min-width:0}.nw-bot-brief small{font-size:12px;color:var(--nw-muted)}.nw-bot-brief p{margin:3px 0 0;overflow-wrap:anywhere}
.nw-bot-request[data-historical=true]{padding:14px 18px;gap:8px;background:transparent;box-shadow:none}.nw-bot-request[data-historical=true] .nw-bot-request-head h3{font-size:15px}.nw-bot-request[data-historical=true]>.nw-bot-request-action{justify-self:start;min-height:30px;padding:5px 12px}

.nw-bot-request-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;min-width:0}
.nw-bot-request .nw-bot-request-action{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 15px;border:1px solid var(--nw-stroke);border-radius:999px;background:transparent;color:var(--nw-fg);font:inherit;font-size:13px;font-weight:600;cursor:pointer;transition:background .16s ease,border-color .16s ease,transform .16s ease}
.nw-bot-request .nw-bot-request-action.primary{background:var(--nw-fg);color:var(--nw-canvas);border-color:transparent}
.nw-bot-request .nw-bot-request-action.quiet:hover{background:var(--nw-elevated);border-color:var(--nw-focus)}
.nw-bot-request .nw-bot-request-action.primary:hover{filter:brightness(.92)}
.nw-bot-request .nw-bot-request-action:active:not(:disabled){transform:scale(.98)}
.nw-bot-request .nw-bot-request-action.close{background:none;border:0;font-size:23px;padding:0;width:32px;min-height:32px;color:var(--nw-muted);font-weight:400;line-height:1}
.nw-bot-request :is(button,input,textarea,summary,a):focus-visible{outline:2px solid var(--nw-focus);outline-offset:3px}
.nw-bot-request :disabled{opacity:.55;cursor:wait}.nw-bot-request [hidden]{display:none!important}
.nw-bot-request-status{color:var(--nw-soft);font-size:13px;margin:0;overflow-wrap:anywhere}.nw-bot-request-status:empty{display:none}.nw-bot-request-status[data-error=true]{color:#ffc6bc}
.nw-bot-source-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));gap:8px}
.nw-bot-source{display:flex;align-items:center;gap:11px;min-width:0;padding:10px 12px;border:1px solid var(--nw-stroke-soft);border-radius:13px;background:var(--nw-control-fill)}
.nw-bot-source svg,.nw-bot-source-detail summary svg{width:22px;height:22px;flex:none;color:var(--nw-aqua)}
.nw-bot-source-copy{display:grid;gap:2px;min-width:0}.nw-bot-source-copy strong{font-size:13px;overflow-wrap:anywhere;line-height:1.35}.nw-bot-source-copy small{font-size:11px;color:var(--nw-muted)}
.nw-bot-source-detail{min-width:0;border-top:1px solid var(--nw-stroke-soft);padding:11px 0 0}
.nw-bot-source-detail summary{display:flex;align-items:center;gap:10px;cursor:pointer;font-size:13px;font-weight:600;list-style:none;min-width:0}
.nw-bot-source-detail summary::-webkit-details-marker{display:none}
.nw-bot-source-detail summary::after{content:"";margin-left:auto;width:7px;height:7px;border-bottom:1.5px solid var(--nw-muted);border-right:1.5px solid var(--nw-muted);transform:rotate(45deg);transition:transform .16s;flex:none}
.nw-bot-source-detail[open] summary::after{transform:rotate(225deg)}.nw-bot-source-detail summary span{overflow-wrap:anywhere;min-width:0}.nw-bot-source-detail summary small{color:var(--nw-muted);font-size:11px;font-weight:400;white-space:nowrap;margin-left:auto}
.nw-bot-source-content,.nw-bot-request-editor{display:grid;gap:13px;min-width:0}.nw-bot-source-content{margin-top:12px}
.nw-bot-request-field{display:grid;gap:6px;min-width:0;font-size:13px;color:var(--nw-soft)}.nw-bot-request-field span{font-weight:550}
.nw-bot-request-field :is(input,textarea,select){box-sizing:border-box;width:100%;min-width:0;border:1px solid var(--nw-stroke);border-radius:12px;background:var(--nw-control-fill);color:var(--nw-fg);font:inherit;font-size:15px;padding:11px 13px;line-height:1.5;resize:vertical}
.nw-bot-request-confirm{display:flex;gap:9px;align-items:flex-start;min-width:0;font-size:13px;color:var(--nw-soft);cursor:pointer}.nw-bot-request-confirm input{accent-color:var(--nw-aqua);flex:none;margin:4px 0 0}.nw-bot-request-confirm span{overflow-wrap:anywhere}
.nw-bot-request-link{font-size:13px;color:var(--nw-aqua);text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}
.nw-bot-request pre{font:inherit;white-space:pre-wrap;overflow-wrap:anywhere;margin:10px 0;color:var(--nw-soft)}
@media(max-width:560px){.nw-bot-request{padding:16px;gap:13px;border-radius:16px;font-size:14px}.nw-bot-request-head h3{font-size:17px}.nw-bot-request-field :is(input,textarea,select){font-size:16px}.nw-bot-request .nw-bot-request-action{min-height:42px}.nw-bot-request .nw-bot-request-action.close{min-height:36px}.nw-bot-source-list{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.nw-bot-request *{transition:none!important;animation:none!important}}

.nw-bot-request-field select{min-height:44px;color-scheme:dark;resize:none;padding-right:24px}.nw-bot-request-field[hidden]{display:none}

/* A speech state is projected only from the actual response player. */
.nw-conversation-surface .nw-conversation-action[data-read-speech][aria-pressed="true"]{
  color:#dff7ff;background:linear-gradient(135deg,#8bdcff21,#a992ff19);
  box-shadow:inset 0 1px #c8eaff30;
}
.nw-conversation-surface .nw-speech-status{font-size:12px;color:var(--nw-stream-ink-muted);}
.nw-conversation-surface .nw-speech-status[hidden]{display:none;}

/* Native engineering arrival: preserve the actual source image without stretching it. */
.nw-studio-arrival{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;overflow:hidden;background:#081624;color:#e5eff9;isolation:isolate}
.nw-studio-arrival::backdrop{background:#081624}
.nw-studio-frame{position:absolute;inset:0;width:100%;height:100%;border:0;opacity:0;transition:opacity .38s cubic-bezier(.2,.78,.18,1)}
.nw-studio-arrival[data-phase=ready] .nw-studio-frame,.nw-studio-arrival[data-phase=closing] .nw-studio-frame{opacity:1}
.nw-studio-veil{position:absolute;inset:0;z-index:1;background:radial-gradient(ellipse at 50% 45%,#1b3952 0%,#0a1b2d 48%,#081624 85%);transition:opacity .38s;pointer-events:none}
.nw-studio-arrival[data-phase=ready] .nw-studio-veil{opacity:0;visibility:hidden}
.nw-studio-arrival[data-phase=closing] .nw-studio-veil{opacity:1}
.nw-studio-arrival-status{position:absolute;left:50%;bottom:max(10%,64px);transform:translateX(-50%);display:grid;gap:9px;text-align:center;width:min(88%,440px);text-shadow:0 2px 18px #000}
.nw-studio-arrival-status span{font-size:10px;letter-spacing:.24em;color:#7daacb}.nw-studio-arrival-status strong{font-size:15px;font-weight:450;line-height:1.4;color:#d4e8f7}
.nw-studio-arrival-back{position:absolute;top:max(14px,env(safe-area-inset-top));left:18px;padding:10px 16px;border:1px solid #6b9bb355;border-radius:24px;color:#deedf8;background:#122c40;pointer-events:auto}
.nw-studio-ghost{position:absolute;z-index:2;pointer-events:none;display:grid;place-items:center;transform-origin:center;overflow:hidden}.nw-studio-ghost canvas{width:100%;height:100%;object-fit:contain;display:block}
@media(prefers-reduced-motion:reduce){.nw-studio-frame,.nw-studio-veil{transition:none}}

.nw-studio-arrival[data-phase=source-error] .nw-studio-frame{opacity:1}.nw-studio-arrival[data-phase=source-error] .nw-studio-veil{background:transparent}.nw-studio-arrival[data-phase=source-error] .nw-studio-arrival-status{display:none}

html.nw-studio-open,html.nw-studio-open body{overflow:hidden!important;scrollbar-gutter:auto!important}

/* Native-style workbook surface. The workspace owns the surrounding chrome;
   only the visible cell window is rendered, regardless of workbook size. */
.nw-conversation-file-viewer[data-preview-type=spreadsheet] .nw-conversation-file-scroll{display:flex;flex-direction:column;gap:8px;padding:8px 0 0;min-height:0}
.nw-conversation-file-viewer[data-preview-type=spreadsheet] .nw-conversation-file-body,
.nw-conversation-file-viewer[data-preview-type=spreadsheet] .nw-conversation-file-preview-content{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;min-width:0;max-width:none;margin:0}
.nw-conversation-file-viewer[data-preview-type=spreadsheet] .nw-conversation-file-representation{margin:0 14px 7px}
.nw-workbook{display:flex;flex-direction:column;flex:1;min-height:260px;min-width:0;overflow:hidden;background:#fff;color:#222;font-family:system-ui,sans-serif}
.nw-workbook-bar{display:flex;align-items:center;gap:0;background:#f7f8fa;border-bottom:1px solid #d1d5db;min-height:34px;color:#30363d;flex:none}
.nw-workbook-address{width:66px;text-align:center;font:12px ui-monospace,monospace;border-right:1px solid #d1d5db;padding:8px 5px}
.nw-workbook-fx{width:30px;text-align:center;color:#69737c;font:italic 14px Georgia,serif}
.nw-workbook-value{flex:1;min-width:0;background:#fff;color:#1f2937;border:1px solid #d1d5db;height:27px;padding:2px 6px;font:12px system-ui}
.nw-workbook-zoom{margin-inline:6px;padding:3px;background:#fff;border:1px solid #d1d5db;border-radius:4px;color:#30363d;font:12px system-ui}
.nw-workbook-grid{position:relative;flex:1 1 auto;min-height:220px;overflow:auto;background:#fff;outline:none;overscroll-behavior:contain}
.nw-workbook-surface{position:relative}
.nw-workbook-row,.nw-workbook-cell,.nw-workbook-header{position:absolute;box-sizing:border-box}
.nw-workbook-cell,.nw-workbook-header{border-right:1px solid #e0e3e7;border-bottom:1px solid #e0e3e7;padding:2px 5px;overflow:hidden;white-space:nowrap;text-overflow:clip;display:flex;align-items:center;font-size:var(--nw-sheet-font,12px);line-height:1}
.nw-workbook-header{justify-content:center;background:#f2f4f6;color:#59636c;border-color:#d5d9df}
.nw-workbook-header.selected{background:#dbe8fa;color:#174d94}
.nw-workbook-headers{z-index:3;background:#f2f4f6}
.nw-workbook-number{z-index:2}
.nw-workbook-corner{z-index:4}
.nw-workbook-cell{background:#fff;cursor:cell}
.nw-workbook-cell.numeric{justify-content:flex-end}
.nw-workbook-cell.selected{outline:2px solid #3478c8;outline-offset:-2px;background:#f0f6ff;z-index:1}
.nw-workbook-tabs{display:flex;align-items:center;background:#f5f6f8;border-top:1px solid #d1d5db;min-height:31px;overflow:auto;flex:none;padding:0 5px}
.nw-workbook-range-nav{display:flex;flex-wrap:wrap;align-items:center;gap:5px;padding:6px;background:#f5f6f8;border-top:1px solid #d1d5db;flex:none;font-size:11px;color:#30363d}
.nw-workbook-range-nav[hidden],.nw-workbook-range-notice[hidden]{display:none}
.nw-workbook-range-nav button,.nw-workbook-range-nav input{font:12px system-ui;border:1px solid #c4cbd3;border-radius:4px;background:#fff;color:#30363d;padding:5px 7px}
.nw-workbook-range-nav button:disabled{opacity:.45}
.nw-workbook-range-nav input{width:72px;min-width:0}
.nw-workbook-range-nav output{flex-basis:100%;overflow-wrap:anywhere}
.nw-workbook-range-notice{margin:0;padding:5px 8px;font-size:12px;color:#465366;background:#f5f6f8;flex:none}
.nw-conversation-file-viewer:not([data-spatial=true]) .nw-workbook .nw-workbook-tab,
.nw-conversation-file-viewer:not([data-spatial=true]) .nw-workbook .nw-workbook-edit{font:12px system-ui;min-block-size:26px;padding:4px 12px;border:0;border-radius:0;background:transparent;color:#58616a}
.nw-conversation-file-viewer:not([data-spatial=true]) .nw-workbook .nw-workbook-tab[aria-selected=true]{color:#1d4f89;font-weight:600;border-bottom:2px solid #3478c8;background:#fff}

.nw-conversation-file-viewer:not([data-spatial=true]) .nw-conversation-file-header{align-items:center;padding:8px 12px;gap:8px}
.nw-conversation-file-viewer:not([data-spatial=true]) .nw-conversation-file-header :is(.nw-conversation-file-close,.nw-conversation-file-download){width:32px;min-block-size:32px;padding:0;border:0;background:transparent;color:var(--nw-fg)}
.nw-conversation-file-viewer:not([data-spatial=true]) .nw-conversation-file-header :is(.nw-conversation-file-close,.nw-conversation-file-download):hover{background:var(--nw-control-hover,#263746)}
.nw-conversation-file-viewer:not([data-spatial=true]) .nw-spatial-header-actions{flex:none;gap:4px}
.nw-conversation-file-mime{overflow-wrap:anywhere;margin:12px 0 0;font-size:12px}
.nw-conversation-file-mime:empty{display:none}
.nw-slide-reader{display:grid;grid-template-columns:minmax(76px,25%) minmax(0,1fr);grid-template-rows:minmax(250px,1fr) auto;gap:0;min-height:320px;border:1px solid var(--nw-stroke-soft);border-radius:8px;overflow:hidden}
.nw-slide-navigator{display:flex;flex-direction:column;gap:6px;padding:8px;overflow:auto;max-height:65vh;background:var(--nw-canvas)}
.nw-conversation-file-viewer:not([data-spatial=true]) .nw-slide-tab{display:flex;align-items:flex-start;justify-content:flex-start;gap:6px;text-align:left;padding:8px 5px;border:1px solid transparent;background:transparent;min-height:42px;border-radius:5px;flex:none;overflow:hidden}
.nw-conversation-file-viewer:not([data-spatial=true]) .nw-slide-tab[aria-selected=true]{border-color:var(--nw-focus);background:var(--nw-elevated)}
.nw-slide-number{font-size:11px;color:var(--nw-muted);flex:none}
.nw-slide-title{font-size:11px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow-wrap:anywhere}
.nw-slide-page{padding:12px;overflow:auto;max-height:65vh;background:var(--nw-elevated)}
.nw-slide-page .nw-conversation-file-slide{margin:0;min-height:200px}
.nw-slide-controls{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:12px;padding:5px;border-top:1px solid var(--nw-stroke-soft)}
.nw-slide-controls output{font-size:12px;font-variant-numeric:tabular-nums}
@container (max-width:400px){.nw-slide-reader{grid-template-columns:1fr;grid-template-rows:auto minmax(220px,1fr) auto}.nw-slide-navigator{flex-direction:row;max-height:80px}.nw-slide-tab{max-width:140px}}

@container (max-width:400px){.nw-conversation-file-viewer .nw-conversation-file-version-caption{flex:1 1 100%;justify-content:space-between}.nw-conversation-file-viewer .nw-conversation-file-version-select{flex:1}}

.nw-conversation-prose .smile-native-chart{margin:20px 0;min-width:0;max-width:100%;display:grid;gap:18px;padding:18px;border:1px solid var(--nw-stream-rule,#26384b);border-radius:14px}
.smile-native-chart [data-series="0"]{background:#77aef4}.smile-native-chart [data-series="1"]{background:#65c6b0}.smile-native-chart [data-series="2"]{background:#cf9de9}.smile-native-chart [data-series="3"]{background:#d9ac68}.smile-native-chart [data-series="4"]{background:#ea8b9d}.smile-native-chart [data-series="5"]{background:#8bb6c3}
.smile-native-chart-plot{display:grid;gap:20px;min-width:0}.smile-native-chart-group{display:grid;gap:8px;min-width:0}.smile-native-chart-category{font-size:13px;font-weight:600;overflow-wrap:anywhere}
.smile-native-chart-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,auto);gap:5px 12px;align-items:center;min-width:0}.smile-native-chart-series,.smile-native-chart-value{font-size:12px;overflow-wrap:anywhere}.smile-native-chart-value{grid-column:2;grid-row:1;font-variant-numeric:tabular-nums}
.smile-native-chart-track{grid-column:1/-1;position:relative;height:13px;border-radius:3px;background:rgba(128,145,166,.12)}.smile-native-chart-track i:not(.smile-native-chart-zero){position:absolute;inset-block:0;border-radius:3px}.smile-native-chart-zero{position:absolute;inset-block:-2px;width:1px;background:currentColor;opacity:.55}
.smile-native-chart-data{min-width:0;overflow:auto;font-size:12px}.smile-native-chart-data summary{cursor:pointer}.smile-native-chart pre{white-space:pre-wrap;overflow-wrap:anywhere}

.nw-native-image{margin:16px 0;max-width:100%;min-width:0}.nw-native-image a{display:block;width:fit-content;max-width:100%}.nw-native-image img{display:block;max-width:100%;height:auto;border-radius:14px}.nw-native-image figcaption{margin-top:8px}

.smile-native-line-plot{min-width:0;display:grid;gap:12px}
.smile-native-line-plot svg{display:block;width:100%;height:auto;overflow:visible}
.smile-native-line-legend{display:flex;flex-wrap:wrap;gap:8px 18px;font-size:12px}
.smile-native-line-key{display:inline-flex;align-items:center;gap:7px}.smile-native-line-key i{width:12px;height:3px;border-radius:2px}
.smile-native-line-label{fill:currentColor;font-size:14px;font-family:inherit}.smile-native-line-axis,.smile-native-line-grid{stroke:currentColor;stroke-width:1;opacity:.35}.smile-native-line-grid{opacity:.15}
.smile-native-line-plot [data-line-series="0"]{stroke:#77aef4;fill:#77aef4}.smile-native-line-plot [data-line-series="1"]{stroke:#65c6b0;fill:#65c6b0}.smile-native-line-plot [data-line-series="2"]{stroke:#cf9de9;fill:#cf9de9}.smile-native-line-plot [data-line-series="3"]{stroke:#d9ac68;fill:#d9ac68}.smile-native-line-plot [data-line-series="4"]{stroke:#ea8b9d;fill:#ea8b9d}.smile-native-line-plot [data-line-series="5"]{stroke:#8bb6c3;fill:#8bb6c3}
@media(max-width:480px){.nw-conversation-prose .smile-native-chart{padding:10px}.smile-native-line-label{font-size:22px}}
