:root {
  color-scheme: light;
  --vela-bg: #fafafa;
  --vela-panel: #f8f8f8;
  --vela-card: #ffffff;
  --vela-text: #3f3f46;
  --vela-strong: #18181b;
  --vela-muted: #71717a;
  --vela-border: #e4e4e7;
  --vela-border-strong: #d4d4d8;
  --vela-accent: #dc2626;
  --vela-accent-soft: rgba(220, 38, 38, 0.09);
  --word-blue: #185abd;
  --word-blue-strong: #124078;
  --word-blue-soft: #e8f1fb;
  --word-canvas: #e7e7e7;
  --word-ink: #111111;
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--vela-bg);
  color: var(--vela-text);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

.demo-shell {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: 50px minmax(0, 1fr);
  overflow: hidden;
  background: var(--vela-bg);
}

.vela-titlebar {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 0 16px;
  border-bottom: 1px solid var(--vela-border);
  background: rgba(250, 250, 250, 0.98);
}

.vela-wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #27272a;
}

.vela-wordmark strong {
  font-size: 14px;
  font-weight: 650;
}

.vela-mark {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--vela-accent);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.18);
}

.demo-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--vela-muted);
  font-size: 11px;
}

.demo-identity i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #a1a1aa;
}

.demo-identity strong {
  color: #52525b;
  font-weight: 600;
}

.titlebar-spacer {
  flex: 1;
}

.truth-pill,
.vela-runtime-status {
  height: 27px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--vela-border);
  border-radius: 999px;
  background: #fff;
  color: var(--vela-muted);
  font-size: 10px;
}

.truth-dot,
.runtime-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.11);
}

.vela-runtime-status code {
  color: var(--vela-strong);
  font-family: inherit;
  font-size: 10px;
}

.workspace-pane-toggle-group {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--vela-border);
  border-radius: 9px;
  background: #fff;
}

.workspace-pane-toggle-group button,
.titlebar-agent {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: default;
}

.workspace-pane-toggle-group button.is-active {
  color: var(--vela-accent);
  background: var(--vela-accent-soft);
}

.titlebar-agent {
  color: #fff;
  background: var(--vela-accent);
  font-size: 10px;
}

.pane-icon {
  position: relative;
  width: 13px;
  height: 11px;
  display: block;
  border: 1px solid #71717a;
  border-radius: 2px;
}

.pane-icon::after {
  position: absolute;
  content: "";
  background: currentColor;
  opacity: 0.75;
}

.pane-icon--left::after {
  top: 0;
  bottom: 0;
  left: 3px;
  width: 1px;
}

.pane-icon--right::after {
  top: 0;
  right: 3px;
  bottom: 0;
  width: 1px;
}

.pane-icon--bottom::after {
  right: 0;
  bottom: 3px;
  left: 0;
  height: 1px;
}

.workspace {
  min-height: 0;
  display: flex;
  overflow: hidden;
}

/* Word application */

.word-pane {
  flex: 1 1 auto;
  min-width: 560px;
  min-height: 0;
  display: grid;
  grid-template-rows: 38px 34px 82px minmax(0, 1fr) 25px;
  overflow: hidden;
  border-right: 1px solid var(--vela-border);
  background: #f4f4f4;
}

.word-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 0 10px 0 0;
  color: #fff;
  background: var(--word-blue);
}

.word-app-icon {
  width: 46px;
  height: 38px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.13);
  font-family: Georgia, serif;
  font-size: 19px;
  font-weight: 700;
}

.quick-actions {
  display: flex;
  gap: 8px;
  opacity: 0.9;
  font-size: 15px;
}

.word-file-identity {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.word-file-identity strong {
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 500;
}

.word-file-identity span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
  white-space: nowrap;
}

.word-search {
  width: min(235px, 24vw);
  height: 25px;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 0 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
}

.word-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font-size: 10px;
}

.word-window-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-left: 6px;
  font-size: 12px;
}

.word-tab-row {
  display: flex;
  align-items: stretch;
  gap: 1px;
  min-width: 0;
  padding: 0 8px;
  border-bottom: 1px solid #dadada;
  background: #fff;
}

.word-tab-row button {
  min-width: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 0 8px;
  color: #333;
  font-size: 10px;
}

.word-tab-row button.is-active {
  border-bottom-color: var(--word-blue);
  color: var(--word-blue);
  font-weight: 600;
}

.word-tab-spacer {
  flex: 1;
}

.editing-mode {
  display: flex;
  align-items: center;
  padding: 0 7px;
  color: #444;
  font-size: 9px;
}

.word-tab-row .share-button {
  align-self: center;
  height: 25px;
  min-width: 54px;
  border-radius: 3px;
  color: #fff;
  background: var(--word-blue);
}

.word-ribbon {
  display: flex;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
  padding: 5px 7px 3px;
  border-bottom: 1px solid #cfcfcf;
  background: #fff;
}

.ribbon-group {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 7px 13px;
}

.ribbon-group small {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  color: #737373;
  text-align: center;
  font-size: 8px;
}

.ribbon-separator {
  width: 1px;
  margin: 3px 2px 13px;
  background: #dddddd;
}

.clipboard-group {
  width: 56px;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  font-size: 8px;
}

.ribbon-large-icon {
  color: var(--word-blue);
  font-size: 24px;
  line-height: 1;
}

.font-group {
  width: 210px;
  flex-direction: column;
  align-items: stretch;
}

.ribbon-controls {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 3px;
}

.select-control,
.size-control {
  height: 23px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0 5px;
  border: 1px solid #c9c9c9;
  color: #333;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ribbon-buttons {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 25px;
}

.ribbon-buttons > * {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  color: #333;
  font-family: "Segoe UI", sans-serif;
  font-size: 11px;
}

.paragraph-group {
  width: 145px;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.ribbon-buttons--paragraph {
  justify-content: center;
  height: 27px;
}

.styles-group {
  flex: 1;
  min-width: 230px;
  align-items: stretch;
  overflow: hidden;
}

.style-chip {
  width: 82px;
  min-width: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5px 6px;
  border: 1px solid #d8d8d8;
  color: #222;
  background: #fff;
}

.style-chip--normal {
  border-color: var(--word-blue);
  box-shadow: inset 0 0 0 1px rgba(24, 90, 189, 0.16);
}

.style-chip strong {
  font-family: "SimSun", "宋体", serif;
  font-size: 10px;
}

.style-chip span {
  overflow: hidden;
  color: #777;
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-editor {
  min-height: 0;
  display: flex;
  overflow: hidden;
  background: var(--word-canvas);
}

.word-navigation {
  flex: 0 0 205px;
  width: 205px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #cfcfcf;
  background: #f8f8f8;
}

.navigation-header {
  display: flex;
  align-items: center;
  padding: 10px 10px 7px 12px;
}

.navigation-header strong {
  color: #333;
  font-size: 12px;
  font-weight: 500;
}

.navigation-header button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #777;
}

.navigation-search {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 9px 7px;
  padding: 0 7px;
  border: 1px solid #c8c8c8;
  background: #fff;
}

.navigation-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 9px;
}

.navigation-tabs {
  height: 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid #d7d7d7;
}

.navigation-tabs span {
  display: grid;
  place-items: center;
  border-bottom: 2px solid transparent;
  color: #666;
  font-size: 9px;
}

.navigation-tabs span.is-active {
  border-bottom-color: var(--word-blue);
  color: var(--word-blue);
}

.outline-tree {
  min-height: 0;
  overflow: auto;
  padding: 8px 5px 20px;
  scrollbar-width: thin;
}

.outline-placeholder {
  padding: 10px 7px;
  color: #888;
  font-size: 9px;
}

.outline-item {
  position: relative;
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px 5px 21px;
  border-radius: 3px;
  color: #4a4a4a;
  font-family: "SimSun", "宋体", serif;
  font-size: 10px;
  line-height: 1.45;
}

.outline-item::before {
  position: absolute;
  left: 7px;
  width: 6px;
  height: 6px;
  border: 1px solid #a3a3a3;
  border-radius: 50%;
  content: "";
}

.outline-item.is-written::before {
  border-color: #22a65a;
  background: #22a65a;
}

.outline-item.is-active {
  color: var(--word-blue-strong);
  background: #e8f1fb;
  font-weight: 700;
}

.outline-item.is-active::before {
  border-color: var(--word-blue);
  background: var(--word-blue);
  box-shadow: 0 0 0 3px rgba(24, 90, 189, 0.1);
}

.outline-item span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.outline-item small {
  margin-left: auto;
  color: #8b8b8b;
  font-family: "Segoe UI", sans-serif;
  font-size: 7px;
}

.document-workbench {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 20px minmax(0, 1fr);
  overflow: hidden;
}

.horizontal-ruler {
  position: relative;
  z-index: 5;
  height: 20px;
  display: flex;
  margin: 0;
  border-bottom: 1px solid #c5c5c5;
  background: #f7f7f7;
}

.ruler-margin {
  width: 15%;
  background: #e5e5e5;
}

.ruler-ticks {
  position: relative;
  flex: 1;
  background:
    repeating-linear-gradient(90deg, transparent 0 14px, #8e8e8e 15px 16px) bottom / auto 4px
      no-repeat,
    repeating-linear-gradient(90deg, transparent 0 74px, #555 75px 76px) bottom / auto 7px no-repeat;
}

.document-viewport {
  min-height: 0;
  overflow: auto;
  padding: 28px 26px 92px;
  background: var(--word-canvas);
  scroll-behavior: smooth;
  scrollbar-color: #bababa transparent;
  scrollbar-width: thin;
}

.document-pages {
  width: min(650px, calc(100% - 18px));
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0 auto;
}

.word-page {
  position: relative;
  width: 100%;
  min-height: 918px;
  flex: 0 0 auto;
  overflow: hidden;
  padding: 85px 98px 78px;
  color: var(--word-ink);
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.09),
    0 3px 10px rgba(0, 0, 0, 0.14);
  font-family: "Times New Roman", "SimSun", "宋体", serif;
}

.word-page--cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 120px;
  text-align: center;
}

.cover-brand {
  margin-bottom: 92px;
  color: #333;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 13px;
  letter-spacing: 0.24em;
}

.cover-title {
  max-width: 460px;
  margin: 0;
  font-family: "SimSun", "宋体", serif;
  font-size: 31px;
  font-weight: 700;
  line-height: 1.65;
}

.cover-rule {
  width: 72px;
  height: 2px;
  margin: 35px 0;
  background: #202020;
}

.cover-subtitle {
  color: #333;
  font-family: "SimSun", "宋体", serif;
  font-size: 18px;
  letter-spacing: 0.16em;
}

.cover-meta {
  position: absolute;
  right: 0;
  bottom: 92px;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.page-header {
  position: absolute;
  top: 42px;
  right: 77px;
  left: 77px;
  display: flex;
  justify-content: center;
  padding-bottom: 5px;
  border-bottom: 1px solid #808080;
  color: #5b5b5b;
  font-size: 9px;
}

.page-footer {
  position: absolute;
  right: 0;
  bottom: 36px;
  left: 0;
  color: #333;
  text-align: center;
  font-size: 10px;
}

.toc-title {
  margin: 6px 0 30px;
  text-align: center;
  text-indent: 0;
  font-family: "SimSun", "宋体", serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.55em;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.toc-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 8px;
  font-family: "SimSun", "宋体", serif;
  font-size: 13px;
  line-height: 1.5;
}

.toc-row i {
  height: 1em;
  border-bottom: 1px dotted #555;
}

.toc-row strong {
  font-weight: 700;
}

.doc-block {
  position: relative;
  margin: 0;
  color: #000;
}

.doc-heading-1 {
  margin: 0 0 15px;
  text-align: center;
  text-indent: 0;
  font-family: "Times New Roman", "SimSun", "宋体", serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
}

.doc-heading-2 {
  margin: 8px 0;
  text-align: left;
  text-indent: 0;
  font-family: "Times New Roman", "SimSun", "宋体", serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.5;
}

.doc-heading-3,
.doc-heading-4,
.doc-heading-5,
.doc-heading-6 {
  margin: 6px 0;
  text-align: left;
  text-indent: 0;
  font-family: "Times New Roman", "SimSun", "宋体", serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
}

.doc-paragraph {
  margin: 0;
  text-align: justify;
  text-indent: 2em;
  font-family: "Times New Roman", "SimSun", "宋体", serif;
  font-size: 18.7px;
  line-height: 1.28;
}

.doc-paragraph + .doc-paragraph {
  margin-top: 1px;
}

.typing-caret {
  width: 1px;
  height: 1.05em;
  display: inline-block;
  margin-left: 1px;
  vertical-align: -0.12em;
  background: var(--word-blue);
  animation: caret-blink 0.76s steps(1, end) infinite;
}

.word-page--loading {
  padding-top: 105px;
}

.page-loading-line {
  height: 12px;
  margin-bottom: 14px;
  border-radius: 3px;
  background: linear-gradient(90deg, #f0f0f0, #fafafa, #f0f0f0);
  background-size: 220% 100%;
  animation: loading-sweep 1.6s ease-in-out infinite;
}

.page-loading-line--title {
  width: 52%;
  height: 20px;
  margin: 0 auto 36px;
}

.live-edit-badge {
  position: absolute;
  z-index: 15;
  top: 32px;
  right: 16px;
  min-width: 190px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid rgba(24, 90, 189, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
  backdrop-filter: blur(9px);
  pointer-events: none;
}

.live-edit-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--word-blue);
  box-shadow: 0 0 0 4px rgba(24, 90, 189, 0.1);
}

.live-edit-badge.is-writing .live-edit-dot {
  animation: live-pulse 1.3s ease-in-out infinite;
}

.live-edit-badge > div {
  display: flex;
  flex-direction: column;
}

.live-edit-badge strong {
  color: #222;
  font-size: 10px;
}

.live-edit-badge span:last-child {
  margin-top: 2px;
  color: #777;
  font-size: 8px;
}

.demo-transport {
  position: absolute;
  z-index: 20;
  right: 50%;
  bottom: 13px;
  width: min(720px, calc(100% - 26px));
  min-height: 45px;
  display: grid;
  grid-template-columns: auto auto minmax(170px, 1fr) auto auto auto;
  align-items: center;
  gap: 7px;
  padding: 6px 7px;
  border: 1px solid rgba(196, 196, 196, 0.94);
  border-radius: 12px;
  background: rgba(250, 250, 250, 0.96);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(14px);
  transform: translateX(50%);
}

.play-button,
.transport-button {
  height: 31px;
  border: 1px solid #c7c7c7;
  border-radius: 6px;
  padding: 0 9px;
  background: #fff;
  cursor: pointer;
  font-size: 9px;
  white-space: nowrap;
}

.play-button {
  border-color: var(--vela-accent);
  color: #fff;
  background: var(--vela-accent);
  font-weight: 650;
}

.play-button:disabled,
.transport-button:disabled,
select:disabled,
input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.follow-button.is-active {
  border-color: rgba(24, 90, 189, 0.38);
  color: var(--word-blue);
  background: var(--word-blue-soft);
}

.timeline-wrap {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 5px;
  color: #666;
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.timeline-control {
  position: relative;
}

#timeline-slider {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0;
  accent-color: var(--vela-accent);
  cursor: pointer;
}

.stage-markers {
  position: absolute;
  z-index: 1;
  inset: 8px 5px auto;
  height: 7px;
  pointer-events: none;
}

.stage-marker {
  position: absolute;
  width: 1px;
  height: 6px;
  background: rgba(63, 63, 70, 0.3);
}

#speed-select {
  height: 31px;
  border: 1px solid #c7c7c7;
  border-radius: 6px;
  background: #fff;
  padding: 0 5px;
  font-size: 9px;
}

.word-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 0 8px;
  color: #444;
  background: #f7f7f7;
  font-size: 8px;
}

.word-status-left,
.word-zoom {
  display: flex;
  align-items: center;
  gap: 13px;
}

.word-zoom {
  gap: 7px;
}

.zoom-track {
  position: relative;
  width: 72px;
  height: 3px;
  background: #c8c8c8;
}

.zoom-track i {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 9px;
  height: 9px;
  border: 1px solid #888;
  border-radius: 50%;
  background: #fff;
}

/* Vela chat */

.vela-chat-pane {
  flex: 0 0 440px;
  width: 440px;
  min-width: 390px;
  min-height: 0;
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr) auto;
  overflow: hidden;
  background: linear-gradient(180deg, var(--vela-panel), var(--vela-bg));
}

.chat-tabs {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border-bottom: 1px solid var(--vela-border);
}

.chat-tab {
  min-width: 0;
  height: 36px;
  flex: 1;
  overflow: hidden;
  border: 1px solid var(--vela-border);
  border-radius: 8px;
  background: #fff;
  padding: 0 11px;
  color: var(--vela-strong);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
}

.chat-new,
.chat-history {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--vela-muted);
  font-size: 15px;
}

.chat-scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px 26px 11px;
  scroll-behavior: smooth;
  scrollbar-color: #d2d2d2 transparent;
  scrollbar-width: thin;
}

.chat-message {
  margin-bottom: 14px;
  color: var(--vela-text);
  font-size: 12px;
  line-height: 1.55;
}

.chat-message--user {
  display: flex;
  justify-content: flex-end;
}

.chat-message--user p {
  width: fit-content;
  max-width: 92%;
  margin: 0;
  padding: 9px 11px;
  border-radius: 11px 11px 3px 11px;
  background: #ededed;
  color: var(--vela-strong);
}

.assistant-presence {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  color: var(--vela-muted);
  font-size: 10px;
}

.assistant-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vela-accent);
}

.reasoning-dots {
  display: inline-flex;
  gap: 2px;
}

.reasoning-dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #9ca3af;
  animation: reasoning-pulse 1.15s ease-in-out infinite;
}

.reasoning-dots i:nth-child(2) {
  animation-delay: 0.13s;
}

.reasoning-dots i:nth-child(3) {
  animation-delay: 0.26s;
}

.native-tool-stream {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stream-placeholder {
  padding: 8px 0;
  color: #8a8a92;
  font-size: 10px;
}

.reasoning-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 4px 1px;
  color: #696971;
  font-size: 10px;
}

.reasoning-row > span:first-child {
  color: var(--vela-accent);
}

.reasoning-row p {
  margin: 0;
}

.tool-card {
  border: 1px solid var(--vela-border);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.tool-card.is-running {
  border-color: rgba(220, 38, 38, 0.28);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.035);
}

.tool-card-header {
  min-height: 36px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
}

.tool-card-icon {
  color: var(--vela-accent);
  font-size: 10px;
}

.tool-card-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.tool-card-title strong {
  overflow: hidden;
  color: var(--vela-strong);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-card-title span {
  overflow: hidden;
  color: var(--vela-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-card-status {
  padding: 2px 6px;
  border-radius: 999px;
  color: #3f3f46;
  background: #f3f4f6;
  font-size: 7px;
}

.tool-card.is-running .tool-card-status {
  color: #b91c1c;
  background: #fef2f2;
}

.tool-card-result {
  padding: 7px 8px;
  border-top: 1px solid #eeeeef;
  color: #66666f;
  background: #fafafa;
  font-size: 9px;
}

.report-progress-card {
  margin-top: 10px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.92);
  overflow: hidden;
}

.progress-summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px 5px;
}

.tool-caret {
  color: #9ca3af;
}

.tool-icon {
  color: var(--vela-accent);
  font-size: 9px;
}

.progress-summary strong {
  color: var(--vela-strong);
  font-size: 11px;
}

.tool-phase {
  color: var(--vela-muted);
  font-size: 8px;
}

.tool-progress {
  margin-left: auto;
  color: var(--vela-accent);
  font-size: 9px;
  font-weight: 700;
}

.progress-track {
  height: 3px;
  margin: 0 9px;
  border-radius: 999px;
  background: #ededed;
  overflow: hidden;
}

.progress-track i {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--vela-accent);
  transition: width 180ms linear;
}

.report-kpis {
  display: grid;
  grid-template-columns: 1.1fr 0.75fr 0.7fr;
  gap: 5px;
  padding: 9px;
}

.report-kpis div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 7px;
  border-radius: 6px;
  background: #f7f7f7;
}

.report-kpis span {
  color: #8a8a92;
  font-size: 7px;
}

.report-kpis strong {
  overflow: hidden;
  color: #35353a;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-list {
  display: flex;
  flex-direction: column;
  padding: 0 9px 6px;
}

.stage-row {
  min-height: 26px;
  display: grid;
  grid-template-columns: 13px 1fr auto;
  align-items: center;
  gap: 6px;
  color: #72727a;
  font-size: 8px;
}

.stage-row i {
  width: 7px;
  height: 7px;
  border: 1px solid #c7c7cc;
  border-radius: 50%;
}

.stage-row.is-active {
  color: #27272a;
  font-weight: 650;
}

.stage-row.is-active i {
  border-color: var(--vela-accent);
  background: var(--vela-accent);
  box-shadow: 0 0 0 3px var(--vela-accent-soft);
}

.stage-row.is-complete i {
  border-color: #22a65a;
  background: #22a65a;
}

.stage-row small {
  color: #9a9aa1;
  font-size: 7px;
}

.truth-note {
  margin: 0;
  padding: 8px 9px 9px;
  border-top: 1px solid #eeeeef;
  color: #85858d;
  font-size: 8px;
  line-height: 1.55;
}

.completion-message {
  display: none;
  align-items: flex-start;
  gap: 9px;
  padding: 10px;
  border: 1px solid #d8eadf;
  border-radius: 9px;
  background: #f6fbf8;
}

.completion-message.is-visible {
  display: flex;
}

.completion-check {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: #22a65a;
  font-size: 10px;
}

.completion-message strong {
  color: #1f3f2b;
  font-size: 11px;
}

.completion-message p {
  margin: 3px 0 0;
  color: #587062;
  font-size: 9px;
}

.chat-composer {
  padding: 0 10px 10px;
}

.chat-compose-row {
  min-height: 96px;
  display: grid;
  grid-template-rows: minmax(40px, auto) 38px;
  padding: 8px;
  border: 1px solid var(--vela-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(24, 24, 27, 0.05);
}

.chat-compose-row textarea {
  width: 100%;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #777;
  font-size: 10px;
}

.chat-compose-actions {
  display: flex;
  align-items: flex-end;
}

.chat-compose-actions button {
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 9px;
}

.composer-model {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 6px;
  color: #65656d;
}

.composer-actions-spacer {
  flex: 1;
}

.composer-folder {
  color: #66666d;
}

.composer-send {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  color: #fff;
  background: var(--vela-accent) !important;
  font-weight: 650;
}

.composer-send kbd {
  font-family: inherit;
  font-size: 8px;
  opacity: 0.74;
}

@keyframes caret-blink {
  0%,
  45% {
    opacity: 1;
  }
  46%,
  100% {
    opacity: 0;
  }
}

@keyframes live-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(24, 90, 189, 0.08);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(24, 90, 189, 0.15);
  }
}

@keyframes loading-sweep {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

@keyframes reasoning-pulse {
  0%,
  70%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  35% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@media (max-width: 1100px) {
  .vela-chat-pane {
    flex-basis: 390px;
    width: 390px;
  }

  .word-navigation {
    flex-basis: 174px;
    width: 174px;
  }

  .document-viewport {
    padding-right: 12px;
    padding-left: 12px;
  }

  .word-page {
    padding-right: 72px;
    padding-left: 72px;
  }

  .styles-group {
    display: none;
  }
}

@media (max-width: 820px) {
  .demo-shell {
    min-width: 760px;
  }

  .truth-pill,
  .workspace-pane-toggle-group,
  .word-navigation {
    display: none;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   Vela desktop shell parity

   The replay uses the same three-pane information architecture as the real
   Vela desktop client: project space → central workspace → chat. Word remains
   a document surface inside the central workspace; it is not presented as a
   second top-level application window.
   ────────────────────────────────────────────────────────────────────────── */

.demo-shell {
  grid-template-rows: 32px minmax(0, 1fr);
}

.vela-titlebar {
  height: 32px;
  gap: 8px;
  padding: 0 14px 0 12px;
  border-bottom: 0;
  background: #fafafa;
  font-size: 12px;
}

.window-titlebar-title {
  min-width: 0;
  overflow: hidden;
  color: #27272a;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vela-runtime-status {
  height: 24px;
  padding: 0 8px;
  font-size: 10px;
}

.workspace-pane-toggle-group {
  height: 26px;
  gap: 2px;
  padding: 1px;
  border-radius: 8px;
}

.workspace-pane-toggle-group button {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.titlebar-theme {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  height: 26px;
  padding: 2px;
  border-radius: 8px;
  background: #f4f4f5;
}

.titlebar-theme button {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  color: #a1a1aa;
  background: transparent;
  font-size: 11px;
}

.titlebar-theme button.is-active {
  color: #3f3f46;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.workspace {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 404px;
  background: #fafafa;
}

.project-pane {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid #e4e4e7;
  background: #fafafa;
}

.project-pane__header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 12px 10px;
}

.project-back {
  align-self: flex-start;
  border: 0;
  padding: 0;
  color: #71717a;
  background: transparent;
  font-size: 10px;
}

.project-kicker {
  color: #71717a;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.project-pane__header strong {
  display: -webkit-box;
  overflow: hidden;
  color: #27272a;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.project-space-items {
  display: grid;
  gap: 5px;
  padding: 0 9px 10px;
  border-bottom: 1px solid #e4e4e7;
}

.project-space-items button {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 9px;
  color: #52525b;
  background: transparent;
  text-align: left;
}

.project-space-items button span {
  font-size: 11px;
  font-weight: 650;
}

.project-space-items button small {
  color: #8b8b95;
  font-size: 9px;
}

.project-space-items button.is-active {
  border-color: rgba(220, 38, 38, 0.22);
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.075);
}

.project-tree {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  padding: 12px 8px 64px;
}

.project-tree__title {
  padding: 0 8px 7px;
  color: #71717a;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.project-tree__row {
  min-width: 0;
  min-height: 29px;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  border-radius: 6px;
  padding: 5px 8px;
  color: #52525b;
  font-size: 10px;
}

.project-tree__row span:last-child,
.project-tree__row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-tree__row--file {
  padding-left: 20px;
}

.project-tree__row.is-active {
  color: #27272a;
  background: #ededee;
}

.docx-file-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 3px;
  color: #fff;
  background: #185abd;
  font-family: Georgia, serif;
  font-size: 9px;
  font-weight: 700;
}

.project-pane__footer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  gap: 8px;
  padding: 9px 12px 11px;
  background: linear-gradient(180deg, rgba(250, 250, 250, 0), #fafafa 35%);
}

.project-pane__footer button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  color: #52525b;
  background: #fff;
  font-size: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.word-pane {
  min-width: 0;
  grid-template-rows: 31px 38px 34px 82px minmax(0, 1fr) 25px;
  border-right: 1px solid #e4e4e7;
}

.vela-document-tabs {
  min-width: 0;
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #e4e4e7;
  background: #f5f5f5;
}

.vela-document-tab {
  min-width: 0;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid #e4e4e7;
  border-bottom: 2px solid transparent;
  padding: 0 9px;
  color: #52525b;
  background: transparent;
  font-size: 10px;
}

.vela-document-tab.is-active {
  border-bottom-color: #dc2626;
  color: #27272a;
  background: #fff;
}

.vela-document-tab > span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-tab-close {
  margin-left: auto;
  color: #a1a1aa;
  font-size: 13px;
}

.document-tabs-spacer {
  min-width: 8px;
  flex: 1 1 auto;
}

.document-channel {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  color: #71717a;
  font-size: 9px;
  white-space: nowrap;
}

.document-channel i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
}

.word-navigation {
  display: none;
}

.word-editor {
  min-width: 0;
}

.document-workbench {
  min-width: 0;
}

.word-search {
  width: min(150px, 22vw);
}

.word-window-actions,
.styles-group {
  display: none;
}

.font-group {
  width: 174px;
}

.paragraph-group {
  width: 150px;
}

.word-page {
  padding-right: 72px;
  padding-left: 72px;
}

.vela-chat-pane {
  width: auto;
  min-width: 0;
  border-left: 0;
  background: #fafafa;
}

.chat-tabs {
  padding-top: 4px;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 210px minmax(0, 1fr) 372px;
  }

  .word-ribbon {
    height: 68px;
  }

  .word-pane {
    grid-template-rows: 31px 38px 34px 68px minmax(0, 1fr) 25px;
  }

  .paragraph-group {
    display: none;
  }

  .word-page {
    padding-right: 58px;
    padding-left: 58px;
  }
}

/* Raw Vela transcript — every visible sentence and tool payload comes from the exam log. */

.transcript-proof {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 7px 9px;
  border: 1px solid #d9e8de;
  border-radius: 7px;
  color: #5e6b62;
  background: #f6faf7;
  font-size: 8px;
}

.transcript-proof strong {
  color: #274c33;
  font-size: 9px;
}

.transcript-proof code {
  padding: 2px 4px;
  border-radius: 4px;
  color: #526159;
  background: #e9f2ec;
  font:
    7px/1.2 Consolas,
    monospace;
}

.proof-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22a65a;
  box-shadow: 0 0 0 3px rgba(34, 166, 90, 0.1);
}

.chat-message--user {
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.message-kicker {
  color: #77777f;
  font-size: 8px;
  font-weight: 650;
}

.chat-message--user p {
  white-space: pre-wrap;
}

.chat-message--user small {
  max-width: 92%;
  color: #929299;
  text-align: right;
  font-size: 7px;
  line-height: 1.45;
}

.native-tool-stream {
  gap: 10px;
}

.turn-omitted {
  position: relative;
  padding: 4px 0 4px 18px;
  color: #96969e;
  font-size: 8px;
}

.turn-omitted::before {
  position: absolute;
  top: 50%;
  left: 1px;
  width: 11px;
  height: 1px;
  content: "";
  background: #d6d6da;
}

.chat-turn {
  padding-bottom: 10px;
  border-bottom: 1px solid #eeeeef;
}

.chat-turn:last-child {
  border-bottom: 0;
}

.turn-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  color: #8a8a92;
  font-size: 8px;
}

.turn-header strong {
  color: #303036;
  font-size: 10px;
}

.turn-header time {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.vela-avatar {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: #202024;
  font-size: 10px;
  font-weight: 750;
}

.assistant-copy {
  padding: 0 1px 8px 27px;
  color: #35353a;
  white-space: pre-wrap;
  font-size: 10px;
  line-height: 1.62;
}

.streaming-caret {
  width: 1px;
  height: 1.05em;
  display: inline-block;
  margin-left: 2px;
  vertical-align: -0.12em;
  background: #26262a;
  animation: caret-blink 0.85s step-end infinite;
}

.turn-tools {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-left: 27px;
}

.tool-card {
  border-radius: 7px;
}

.tool-card > summary {
  cursor: pointer;
  list-style: none;
}

.tool-card > summary::-webkit-details-marker {
  display: none;
}

.tool-card--running {
  border-color: rgba(30, 64, 175, 0.25);
  background: #fbfcff;
}

.tool-card--error {
  border-color: rgba(190, 24, 24, 0.25);
  background: #fffafa;
}

.tool-card--missing {
  border-style: dashed;
}

.tool-card-status {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.tool-card-status i {
  font-style: normal;
  font-weight: 800;
}

.tool-card--success .tool-card-status {
  color: #19703b;
  background: #ecf8f0;
}

.tool-card--running .tool-card-status {
  color: #3159a5;
  background: #edf3ff;
}

.tool-card--error .tool-card-status {
  color: #b42318;
  background: #fff0ef;
}

.tool-payload {
  padding: 7px 8px;
  border-top: 1px solid #eeeeef;
  background: #fafafa;
}

.tool-payload > span {
  display: block;
  margin-bottom: 4px;
  color: #85858d;
  font-size: 7px;
  font-weight: 650;
}

.tool-payload pre {
  max-height: 126px;
  margin: 0;
  overflow: auto;
  color: #4b4b52;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    8px/1.5 Consolas,
    "SFMono-Regular",
    monospace;
}

.tool-payload--result {
  background: #fff;
}

.truth-note {
  margin-top: 12px;
  border: 1px solid #ededee;
  border-radius: 7px;
  background: #fafafa;
}

/* Independent desktop windows: Word on the left, Vela on the right. */

.mobile-advisory {
  min-height: 100dvh;
  display: none;
  place-content: center;
  padding: 40px 28px;
  background:
    radial-gradient(circle at 18% 12%, rgba(216, 242, 79, 0.2), transparent 36%),
    #f5f9f8;
  color: #222;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  text-align: center;
}

.mobile-advisory__mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  border-radius: 15px;
  background: #281f17;
  color: #d8b56a;
  font: 700 25px/1 Georgia, serif;
}

.mobile-advisory__eyebrow {
  margin: 0;
  color: #68705f;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.mobile-advisory h1 {
  margin: 10px 0 0;
  font-size: 30px;
  line-height: 1.25;
}

.mobile-advisory p:not(.mobile-advisory__eyebrow) {
  max-width: 32em;
  margin: 18px auto 0;
  color: #666;
  font-size: 16px;
  line-height: 1.75;
}

.mobile-advisory a {
  display: inline-block;
  margin-top: 26px;
  padding: 11px 24px;
  border-radius: 999px;
  background: #222;
  color: #fff;
  font-size: 15px;
  text-decoration: none;
}

.demo-shell {
  min-width: 1040px;
  display: block;
  background: #d9dde3;
}

@media (max-width: 820px) {
  .mobile-advisory {
    display: grid;
  }

  .demo-shell {
    display: none;
  }
}

.workspace {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(630px, 1.72fr) 7px minmax(390px, 0.88fr);
  gap: 0;
  padding: 0;
  background: #d9dde3;
}

.workspace-resizer {
  position: relative;
  z-index: 30;
  width: 7px;
  min-width: 7px;
  height: 100%;
  display: grid;
  place-items: center;
  outline: none;
  background: #d9dde3;
  cursor: col-resize;
  touch-action: none;
  user-select: none;
}

.workspace-resizer::before {
  content: "";
  position: absolute;
  inset: 0 -3px;
}

.workspace-resizer span {
  width: 2px;
  height: 44px;
  border-radius: 999px;
  background: #aeb4ba;
  opacity: 0.72;
  transition: height 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.workspace-resizer:hover span,
.workspace-resizer:focus-visible span,
body.is-resizing .workspace-resizer span {
  height: 72px;
  background: #6f767d;
  opacity: 1;
}

body.is-resizing,
body.is-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

.word-pane {
  min-width: 0;
  grid-template-rows: 38px 34px 82px minmax(0, 1fr) 25px;
  border: 0;
  background: #f4f4f4;
  box-shadow: 1px 0 3px rgba(0, 0, 0, 0.16);
}

.word-navigation {
  display: flex;
}

.word-window-actions {
  display: flex;
}

.styles-group {
  display: flex;
}

.paragraph-group {
  display: flex;
}

.word-search {
  width: min(220px, 22vw);
}

.word-page {
  padding-right: 72px;
  padding-left: 72px;
}

.vela-chat-pane {
  width: auto;
  min-width: 0;
  grid-template-rows: 32px 48px minmax(0, 1fr) auto;
  border: 0;
  background: #fafafa;
  box-shadow: -1px 0 3px rgba(0, 0, 0, 0.12);
}

.vela-chat-pane > .vela-titlebar {
  min-width: 0;
  border-bottom: 1px solid #efeff0;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: minmax(630px, 1.6fr) 7px minmax(390px, 1fr);
  }

  .styles-group {
    display: none;
  }

  .word-navigation {
    flex-basis: 174px;
    width: 174px;
  }

  .word-page {
    padding-right: 58px;
    padding-left: 58px;
  }
}

/*
 * Real Vela transcript skin.
 *
 * These selectors and measurements mirror the live Control UI renderer
 * (`ui/src/ui/chat/grouped-render.ts` + `ui/src/styles/chat/reference-skin.css`):
 * one continuous left-aligned message column, a gutter glyph instead of a
 * named avatar card, and dense one-line tool disclosures. The replay keeps
 * its own data source, but no longer invents a second chat visual language.
 */

.chat-scroll.chat-thread {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 8px 4px 22px;
  overflow: hidden auto;
  border-radius: 14px;
  background: transparent;
  color: #3f3f46;
  font:
    14px/1.55 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  scroll-padding-bottom: 28px;
  scrollbar-color: #d4d4d8 transparent;
  scrollbar-width: thin;
}

.native-tool-stream {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-group {
  width: auto;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  margin: 0 6px;
  color: #3f3f46;
}

.chat-group.user {
  margin-top: 6px;
}

.chat-group-messages {
  min-width: 0;
  max-width: min(860px, 100%);
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
}

.chat-avatar {
  width: 16px;
  height: 20px;
  min-width: 16px;
  display: grid;
  align-self: flex-start;
  margin: 2px 0 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #71717a;
  font:
    600 13px/20px "JetBrains Mono",
    Consolas,
    monospace;
  text-align: center;
}

.chat-avatar::before {
  width: 100%;
  display: inline-block;
  text-align: center;
}

.chat-avatar.assistant::before {
  content: "●";
  color: #dc2626;
}

.chat-avatar.user::before {
  content: ">";
  color: #71717a;
}

.chat-bubble {
  position: relative;
  width: 100%;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.chat-bubble.streaming {
  box-shadow: inset 2px 0 0 rgba(220, 38, 38, 0.7);
}

.chat-text {
  min-height: 0;
  color: #18181b;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.chat-text :where(p, ul, ol, pre, blockquote, table) {
  margin: 0;
}

.chat-text :where(p + p, p + ul, p + ol, p + pre, p + blockquote) {
  margin-top: 0.75em;
}

.chat-text :where(ul, ol) {
  padding-left: 1.5em;
}

.chat-text :where(li + li) {
  margin-top: 0.25em;
}

.chat-text :where(code) {
  padding: 0.15em 0.4em;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
  font:
    0.9em "JetBrains Mono",
    Consolas,
    monospace;
}

.chat-sent-prompt {
  width: 100%;
  display: block;
  padding: 6px 8px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #f5f5f5;
  box-shadow: none;
}

.chat-sent-prompt__text {
  display: -webkit-box;
  padding: 4px 6px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  line-clamp: 6;
  color: #18181b;
  font-size: 14px;
  line-height: 1.5;
}

.stream-placeholder {
  margin: 0 6px 0 32px;
  padding: 0;
  color: #71717a;
  font:
    11px/20px "JetBrains Mono",
    Consolas,
    monospace;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.chat-tool-card {
  max-height: none;
  display: grid;
  gap: 4px;
  margin: 1px 0 0;
  padding: 0 0 0 14px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.chat-tool-card__line {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: #71717a;
  font-size: 11px;
  line-height: 1.55;
}

.chat-tool-card__summary {
  list-style: none;
  outline: none;
  cursor: pointer;
  user-select: none;
}

.chat-tool-card__summary::-webkit-details-marker {
  display: none;
}

.chat-tool-card__summary::marker {
  display: none;
  content: "";
}

.chat-tool-card__dot {
  width: 10px;
  min-width: 10px;
  color: #71717a;
}

.chat-tool-card__line-text {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  color: #52525b;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  line-height: 1.45;
}

.chat-tool-card__line-text strong {
  color: inherit;
  font-weight: 700;
}

.chat-tool-card__meta-chip {
  max-width: 86px;
  flex: 0 1 auto;
  margin-left: 8px;
  padding: 0 6px;
  overflow: hidden;
  border-radius: 4px;
  color: #71717a;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.6;
}

.chat-tool-card__result-chip {
  min-width: 0;
  max-width: 92px;
  flex: 0 1 auto;
  margin-left: 8px;
  padding: 1px 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(113, 113, 122, 0.08);
  color: #4a4a51;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.chat-tool-card__duration {
  flex: 0 0 auto;
  margin-left: 8px;
  color: rgba(113, 113, 122, 0.85);
  font:
    11px/1.55 "JetBrains Mono",
    Consolas,
    monospace;
  font-variant-numeric: tabular-nums;
}

.chat-tool-card__chevron {
  flex: 0 0 auto;
  margin-left: 10px;
  color: #71717a;
  opacity: 0.55;
  font:
    10px/1.45 "JetBrains Mono",
    Consolas,
    monospace;
}

.chat-tool-card__chevron::before {
  content: "▸";
}

details[open] > .chat-tool-card__summary .chat-tool-card__chevron::before {
  content: "▾";
}

.chat-tool-card__result {
  margin: 0 0 0 16px;
  padding: 1px 0 1px 10px;
  overflow: auto;
  border-left: 1px solid rgba(212, 212, 216, 0.75);
  color: #71717a;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.45;
}

.chat-tool-card__result--expanded {
  max-height: 480px;
  margin-top: 2px;
}

.chat-tool-card--merged[open] .chat-tool-card__result-chip {
  display: none;
}

.chat-tool-card--error {
  position: relative;
  padding-left: 10px;
  border-left: 2px solid #dc2626;
  border-radius: 2px;
}

.chat-tool-card--error .chat-tool-card__line-text {
  color: #dc2626;
}

.chat-tool-card--error .chat-tool-card__summary::after {
  flex-shrink: 0;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 4px;
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  content: "故障";
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.chat-tool-card--blocked {
  position: relative;
  padding-left: 10px;
  border-left: 2px solid #d97706;
  border-radius: 2px;
}

.chat-tool-card--blocked .chat-tool-card__line-text {
  color: #a16207;
}

.chat-tool-card--blocked .chat-tool-card__summary::after {
  flex-shrink: 0;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 4px;
  background: rgba(217, 119, 6, 0.12);
  color: #a16207;
  content: "等待条件";
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.6;
}

.chat-tool-card--retrying {
  position: relative;
  padding-left: 10px;
  border-left: 2px solid #2563eb;
  border-radius: 2px;
}

.chat-tool-card--retrying .chat-tool-card__line-text {
  color: #1d4ed8;
}

.chat-tool-card--retrying .chat-tool-card__summary::after {
  flex-shrink: 0;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.11);
  color: #1d4ed8;
  content: "正在恢复";
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.6;
}

.streaming-caret {
  width: 1px;
  height: 1.05em;
  display: inline-block;
  margin-left: 2px;
  vertical-align: -0.12em;
  background: #26262a;
  animation: caret-blink 0.85s step-end infinite;
}

.chat-composer {
  padding: 12px 4px 4px;
}

.chat-compose-row {
  min-height: 103px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #f5f5f5;
  box-shadow: none;
}

.chat-compose-row textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  resize: none;
  border: 0;
  border-radius: 9px;
  outline: 0;
  background: #fff;
  color: #3f3f46;
  font-size: 13.5px;
  line-height: 1.5;
}

.chat-compose-actions {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 2px;
}

.chat-compose-actions button {
  height: 28px;
  border: 0;
  background: transparent;
  font-size: 12px;
}

.composer-send {
  min-width: 64px;
  justify-content: center;
  color: #fff;
  background: #dc2626 !important;
}

/*
 * Word page geometry from 洪水影响评价报告0923.docx.
 *
 * The custom properties are populated from demo-bundle.format_profile, whose
 * values come from the OOXML style profile: A4, 2.54/3.17 cm margins,
 * 1.5/1.75 cm header/footer offsets, 312-twip document grid, 14/18/16 pt
 * body/H1/H2, and 12 pt TOC entries. The public demonstration delivery
 * profile applies the requested 2× body line spacing. Container units keep
 * those physical proportions intact when the split-screen demo scales the paper.
 */

.document-pages {
  width: min(650px, calc(100% - 18px));
  gap: 18px;
  container-type: inline-size;
}

.word-page {
  container-type: normal;
  width: 100%;
  min-height: 0;
  height: auto;
  aspect-ratio: var(--word-page-aspect, 21 / 29.7);
  padding: var(--word-margin-top, 12.0952%) var(--word-margin-inline, 15.0952%);
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.11),
    0 2px 7px rgba(0, 0, 0, 0.16);
  color: #000;
  font-family: "Times New Roman", "SimSun", "宋体", serif;
}

.page-header {
  top: var(--word-header-top, 7.1429%);
  right: var(--word-margin-inline, 15.0952%);
  left: var(--word-margin-inline, 15.0952%);
  height: 0;
  display: block;
  padding: 0;
  border-bottom: 0.7px solid #7f7f7f;
  color: transparent;
  font-size: 0;
}

.page-footer {
  right: var(--word-margin-inline, 15.0952%);
  bottom: var(--word-footer-bottom, 8.3333%);
  left: var(--word-margin-inline, 15.0952%);
  color: #000;
  font-family: "Times New Roman", "SimSun", "宋体", serif;
  font-size: var(--word-footer-size, 1.7639cqw);
  line-height: 1;
}

.doc-block {
  margin: 0;
  color: #000;
  overflow-wrap: break-word;
  word-break: normal;
}

.doc-heading-1 {
  margin: 0;
  color: #000;
  text-align: center;
  text-indent: 0;
  font-family: "Times New Roman", "SimSun", "宋体", serif;
  font-size: var(--word-heading-1-size, 3.0238cqw);
  font-weight: 700;
  line-height: var(--word-heading-1-line, 4.5357cqw);
}

.doc-heading-2 {
  margin: var(--word-heading-2-space, 1.0079cqw) 0;
  color: #000;
  text-align: left;
  text-indent: 0;
  font-family: "Times New Roman", "SimSun", "宋体", serif;
  font-size: var(--word-heading-2-size, 2.6878cqw);
  font-weight: 700;
  line-height: var(--word-heading-2-line, 4.0317cqw);
}

.doc-heading-3,
.doc-heading-4,
.doc-heading-5,
.doc-heading-6 {
  margin: 0;
  color: #000;
  text-align: left;
  text-indent: 0;
  font-family: "Times New Roman", "SimSun", "宋体", serif;
  font-size: 2.5198cqw;
  font-weight: 700;
  line-height: 3.7798cqw;
}

.heading-number {
  margin-right: 0.55em;
  font-variant-numeric: tabular-nums;
}

.doc-paragraph {
  margin: 0;
  color: #000;
  text-align: justify;
  text-justify: inter-ideograph;
  text-indent: 2em;
  font-family: "Times New Roman", "SimSun", "宋体", serif;
  font-size: var(--word-body-size, 2.3519cqw);
  font-weight: 400;
  line-height: var(--word-body-line, 4.7037cqw);
}

.doc-paragraph + .doc-paragraph {
  margin-top: 0;
}

.doc-technical {
  margin: 1.35cqw 0 1.7cqw;
  color: #000;
  font-family: "Times New Roman", "SimSun", "宋体", serif;
  break-inside: avoid;
}

.doc-technical-kicker {
  margin-bottom: 0.7cqw;
  color: #555;
  font-size: 1.5119cqw;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.doc-technical figcaption {
  margin-top: 0.65cqw;
  color: #222;
  font-size: 1.5119cqw;
  line-height: 2.1167cqw;
  text-align: center;
}

.doc-formula {
  padding: 0.55cqw 0 0.3cqw;
}

.formula-intro,
.formula-result {
  margin: 0;
  font-family: "宋体", SimSun, serif;
  font-size: var(--word-body-size, 2.3519cqw);
  line-height: var(--word-body-line, 4.7038cqw);
  text-align: justify;
  text-indent: 2em;
}

.formula-row {
  width: 92%;
  margin: 1.3cqw auto 1.15cqw;
}

.formula-equation-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: "Times New Roman", serif;
}

.formula-svg-variable {
  fill: #000;
  font-family: "Times New Roman", serif;
  font-size: 32px;
  font-style: italic;
}

.formula-svg-subscript {
  fill: #000;
  font-family: "Times New Roman", serif;
  font-size: 18px;
  font-style: italic;
}

.formula-svg-roman {
  fill: #000;
  font-family: "Times New Roman", serif;
  font-size: 30px;
  font-style: normal;
}

.formula-svg-coefficient {
  font-size: 28px;
}

.formula-svg-denominator {
  text-anchor: middle;
}

.formula-svg-fraction-bar {
  stroke: #000;
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}

.formula-svg-number {
  fill: #000;
  font-family: "Times New Roman", serif;
  font-size: 18px;
  font-style: normal;
  text-anchor: middle;
}

.formula-legend {
  display: grid;
  gap: 0.32cqw;
  margin: 0.55cqw 0 0.55cqw 3.6cqw;
  color: #000;
  font-family: "宋体", SimSun, serif;
  font-size: var(--word-body-size, 2.3519cqw);
  line-height: 3.3591cqw;
  text-align: left;
}

.formula-definition {
  display: grid;
  grid-template-columns: 7.1cqw minmax(0, 1fr);
  align-items: baseline;
}

.formula-definition strong {
  font-weight: 400;
  white-space: nowrap;
}

.formula-symbol {
  display: inline-flex;
  align-items: baseline;
  min-width: 1.1em;
  font-family: "Times New Roman", serif;
  line-height: 1;
  text-indent: 0;
  vertical-align: baseline;
  white-space: nowrap;
}

.formula-symbol i {
  font-family: "Times New Roman", serif;
  font-style: italic;
  line-height: 1;
}

.formula-symbol-sub {
  margin-left: 0.02em;
  font-family: "Times New Roman", serif;
  font-size: 0.64em;
  font-style: italic;
  line-height: 1;
  transform: translateY(0.3em);
}

.formula-result {
  margin-top: 0.45cqw;
  text-align: left;
  white-space: nowrap;
}

.formula-result strong {
  font-family: "Times New Roman", serif;
  font-weight: 700;
}

.doc-curve svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.curve-grid line {
  stroke: #d8d8d8;
  stroke-width: 0.65;
}

.curve-grid text,
.curve-axis-title {
  fill: #333;
  font-family: "Times New Roman", "SimSun", "宋体", serif;
  font-size: 8px;
}

.curve-axis-title {
  font-size: 8.5px;
  font-weight: 700;
}

.curve-line {
  fill: none;
  stroke: #222;
  stroke-width: 2;
}

.curve-points circle {
  fill: #222;
  stroke: #fff;
  stroke-width: 1;
}

.curve-points circle.is-design-point {
  fill: #b42318;
}

.doc-data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: #000;
  font-size: 1.4278cqw;
  line-height: 1.931cqw;
}

.doc-data-table th,
.doc-data-table td {
  padding: 0.52cqw 0.42cqw;
  border: 0.7px solid #555;
  text-align: center;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.doc-data-table th {
  background: #eeeeee;
  font-weight: 700;
}

.doc-data-table th:first-child,
.doc-data-table td:first-child {
  width: 28%;
  text-align: left;
}

.toc-title {
  margin: 0;
  color: #000;
  text-align: center;
  text-indent: 0;
  white-space: pre;
  font-family: "Times New Roman", "SimSun", "宋体", serif;
  font-size: var(--word-toc-title-size, 3.0238cqw);
  font-weight: 700;
  letter-spacing: 0;
  line-height: var(--word-toc-title-line, 4.5357cqw);
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.toc-row {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(12px, 1fr) auto;
  align-items: end;
  gap: 0.45cqw;
  color: #000;
  font-family: "Times New Roman", "SimSun", "宋体", serif;
  font-size: var(--word-toc-entry-size, 2.0159cqw);
  font-weight: 400;
  line-height: var(--word-toc-entry-line, 3.0238cqw);
}

.toc-entry-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.toc-row--level-1 .toc-entry-text {
  font-weight: 700;
}

.toc-row--level-2 {
  padding-left: var(--word-toc-level-2-indent, 2.3519cqw);
}

.toc-row i {
  height: 0.65em;
  border: 0;
  border-bottom: 1px dotted #333;
}

.toc-page-number {
  min-width: 1.5em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.typing-caret {
  height: var(--word-body-line, 4.7037cqw);
}

.outline-item {
  min-height: 25px;
  gap: 2px;
  padding: 4px 7px;
  border-radius: 0;
  color: #404040;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 10px;
  line-height: 1.35;
}

.outline-item::before {
  display: none;
}

.outline-item.is-active {
  color: #1b1b1b;
  background: #e6f0fb;
  font-weight: 400;
}

.outline-chevron {
  width: 12px;
  flex: 0 0 12px;
  color: #6b6b6b;
  font-family: "Segoe UI Symbol", sans-serif;
  font-size: 9px;
  line-height: 1;
}
