/* src/webui/styles.css */
:root {
  color-scheme: light;
  --bg-a: #f4f5f3;
  --bg-b: #ecefed;
  --panel: #eff6f7;
  --panel-strong: #e5f0f2;
  --panel-soft: #dcebee;
  --panel-border: #bfd1d7;
  --panel-border-strong: #8ea8b2;
  --panel-border-deep: #2c3f4a;
  --panel-highlight: transparent;
  --ink: #0d1020;
  --muted: #4b616b;
  --field-bg: #f7faf9;
  --blue: #d5e7eb;
  --blue-deep: #80bbc7;
  --violet: #456874;
  --violet-deep: #18222c;
  --rose: #e63d7a;
  --shadow: 0 8px 20px rgba(12, 16, 31, 0.06);
  --workflow-card-bg: rgba(255, 255, 255, 0.88);
  --workflow-card-bg-subtle: rgba(247, 252, 252, 0.92);
  --workflow-card-border: rgba(142, 168, 178, 0.42);
  --workflow-title-ink: #10202a;
  --workflow-badge-ink: #f8fcfc;
  --workflow-badge-bg:
    linear-gradient(
      135deg,
      #345766,
      #80bbc7);
  --workflow-graph-edge: #9eb4c1;
  --workflow-graph-loop: #d38a17;
  --workflow-graph-node-bg: rgba(255, 255, 255, 0.98);
  --workflow-graph-node-text: #1e293b;
  --workflow-graph-node-muted: #64748b;
  --notice-text: #f7fbfb;
  --notice-bg: var(--violet-deep);
  --progress-success: #1f8f64;
  --progress-error: #c94d72;
  --gap-md: 0.9rem;
  font-family:
    "Space Grotesk",
    "Avenir Next",
    "Segoe UI",
    sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg-a: #0f151c;
    --bg-b: #131c25;
    --panel: #18222c;
    --panel-strong: #1d2833;
    --panel-soft: #141d26;
    --panel-border: #2d3f4c;
    --panel-border-strong: #4d6975;
    --panel-border-deep: #9ecdd7;
    --ink: #edf3f5;
    --muted: #9fb1b8;
    --field-bg: #111922;
    --blue: #23343d;
    --blue-deep: #80bbc7;
    --violet: #80bbc7;
    --violet-deep: #80bbc7;
    --shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
    --workflow-card-bg: rgba(20, 29, 38, 0.94);
    --workflow-card-bg-subtle: rgba(16, 24, 32, 0.96);
    --workflow-card-border: rgba(128, 187, 199, 0.26);
    --workflow-title-ink: #edf3f5;
    --workflow-badge-ink: #0e171d;
    --workflow-badge-bg:
      linear-gradient(
        135deg,
        #a7d9e3,
        #7ab5c1);
    --workflow-graph-edge: #5f7b89;
    --workflow-graph-loop: #f3b24b;
    --workflow-graph-node-bg: rgba(24, 34, 44, 0.98);
    --workflow-graph-node-text: #edf3f5;
    --workflow-graph-node-muted: #9fb1b8;
    --notice-text: #f7fbfb;
    --notice-bg: var(--violet-deep);
    --progress-success: #1f8f64;
    --progress-error: #c94d72;
  }
}
:root[data-theme-mode=light] {
  color-scheme: light;
  --bg-a: #f4f5f3;
  --bg-b: #ecefed;
  --panel: #eff6f7;
  --panel-strong: #e5f0f2;
  --panel-soft: #dcebee;
  --panel-border: #bfd1d7;
  --panel-border-strong: #8ea8b2;
  --panel-border-deep: #2c3f4a;
  --ink: #0d1020;
  --muted: #4b616b;
  --field-bg: #f7faf9;
  --blue: #d5e7eb;
  --blue-deep: #80bbc7;
  --violet: #456874;
  --violet-deep: #18222c;
  --shadow: 0 8px 20px rgba(12, 16, 31, 0.06);
  --workflow-card-bg: rgba(255, 255, 255, 0.88);
  --workflow-card-bg-subtle: rgba(247, 252, 252, 0.92);
  --workflow-card-border: rgba(142, 168, 178, 0.42);
  --workflow-title-ink: #10202a;
  --workflow-badge-ink: #f8fcfc;
  --workflow-badge-bg:
    linear-gradient(
      135deg,
      #345766,
      #80bbc7);
  --workflow-graph-edge: #9eb4c1;
  --workflow-graph-loop: #d38a17;
  --workflow-graph-node-bg: rgba(255, 255, 255, 0.98);
  --workflow-graph-node-text: #1e293b;
  --workflow-graph-node-muted: #64748b;
  --notice-text: #f7fbfb;
  --notice-bg: var(--violet-deep);
}
:root[data-theme-mode=dark] {
  color-scheme: dark;
  --bg-a: #0f151c;
  --bg-b: #131c25;
  --panel: #18222c;
  --panel-strong: #1d2833;
  --panel-soft: #141d26;
  --panel-border: #2d3f4c;
  --panel-border-strong: #4d6975;
  --panel-border-deep: #9ecdd7;
  --ink: #edf3f5;
  --muted: #9fb1b8;
  --field-bg: #111922;
  --blue: #23343d;
  --blue-deep: #80bbc7;
  --violet: #80bbc7;
  --violet-deep: #80bbc7;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  --workflow-card-bg: rgba(20, 29, 38, 0.94);
  --workflow-card-bg-subtle: rgba(16, 24, 32, 0.96);
  --workflow-card-border: rgba(128, 187, 199, 0.26);
  --workflow-title-ink: #edf3f5;
  --workflow-badge-ink: #0e171d;
  --workflow-badge-bg:
    linear-gradient(
      135deg,
      #a7d9e3,
      #7ab5c1);
  --workflow-graph-edge: #5f7b89;
  --workflow-graph-loop: #f3b24b;
  --workflow-graph-node-bg: rgba(24, 34, 44, 0.98);
  --workflow-graph-node-text: #edf3f5;
  --workflow-graph-node-muted: #9fb1b8;
  --notice-text: #f7fbfb;
  --notice-bg: var(--violet-deep);
  --progress-success: #1f8f64;
  --progress-error: #c94d72;
}
* {
  box-sizing: border-box;
}
html,
body,
#root {
  margin: 0;
  min-height: 100%;
}
body {
  color: var(--ink);
  background:
    linear-gradient(
      180deg,
      var(--bg-a),
      var(--bg-b));
}
h1,
h2,
p {
  margin: 0;
}
h1,
h2 {
  letter-spacing: -0.04em;
}
h1 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.03;
}
h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  line-height: 1.08;
}
button,
input,
select,
textarea {
  font: inherit;
}
.brandTitle {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: -0.01em;
}
.brandTitleLine {
  display: block;
  white-space: nowrap;
}
.sessionTitle {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.shell {
  min-height: 100vh;
  padding: 1.25rem;
}
.shellHome {
  display: grid;
  grid-template-columns: minmax(14rem, 16rem) minmax(0, 1fr);
  gap: 1.25rem;
  height: calc(100vh - 2.5rem);
  overflow: hidden;
}
.shellSetup {
  display: block;
}
.sidebar,
.chatStage,
.setupStage {
  min-width: 0;
}
.sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 1rem;
  align-content: stretch;
  min-height: 0;
  overflow: hidden;
}
.sidebarHome {
  grid-template-rows: auto minmax(0, 1fr);
}
.panel {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.brandCard,
.chatHero,
.chatPanel,
.formPanel,
.sessionPanel,
.setupHero {
  padding: 1.15rem;
}
.brandCard {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 1rem;
  align-items: start;
}
.brandCardTopRight {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.brandCopy {
  padding-top: 0.15rem;
  padding-right: 7.25rem;
}
.brandMark {
  display: block;
  width: clamp(2.8rem, 6vw, 3.8rem);
  height: auto;
  opacity: 0.92;
}
.themeControl {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.themeButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--panel-border);
  border-radius: 0.4rem;
  background: transparent;
  color: var(--muted);
}
.themeButton:hover {
  background: var(--panel-soft);
  border-color: var(--panel-border);
  color: var(--ink);
}
.themeButton:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--blue-deep) 52%, transparent);
  outline-offset: 2px;
}
.themeIcon {
  width: 0.95rem;
  height: 0.95rem;
  display: block;
}
.brandTitleAccent {
  color: var(--violet);
}
.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--violet-deep);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.lede,
.muted,
.hint,
label span,
.infoLabel {
  color: var(--muted);
}
.lede {
  margin-top: 0.45rem;
  line-height: 1.65;
}
.sectionHeader,
.chatHero,
.chatHeroActions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.composerActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}
.chatHero,
.setupHeroBody {
  align-items: start;
}
.chatHeroActions {
  flex-wrap: wrap;
}
.setupHero {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.setupHeroTopbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.setupHeroTopbarRight {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.backButton {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem 0.45rem 0.5rem;
  border: none;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.backButton svg {
  width: 1rem;
  height: 1rem;
  display: block;
  flex-shrink: 0;
}
.backButton:hover {
  background: var(--panel-strong);
}
.backButton:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--blue-deep) 52%, transparent);
  outline-offset: 2px;
}
.setupHeroBody {
  padding: 1.15rem;
}
.setupHeroMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.sessionPanel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.6rem;
  min-height: 0;
}
.sessionFacts {
  display: grid;
  gap: 0;
}
.factCard {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 0.45rem;
  min-height: 1.9rem;
  padding: 0.28rem 1rem;
  border-radius: 0;
  background: transparent;
  border: none;
  width: 100%;
}
.factCard .infoLabel {
  flex: 0 0 5rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.factCard strong {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.8rem;
}
.factCard .muted {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.72rem;
  margin-left: auto;
  padding-left: 0.4rem;
}
.historyPanel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  padding: 1.15rem;
}
.historyList {
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  align-content: start;
  gap: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--panel-border-strong) transparent;
}
.historyEmpty {
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
}
.historyItem {
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--panel-border);
}
.historyItem:first-child {
  border-top: none;
}
.historyItem:hover {
  background: color-mix(in srgb, var(--blue-deep) 8%, transparent);
}
.historyItemActive {
  background: color-mix(in srgb, var(--blue-deep) 12%, transparent);
}
.historyItemRunning .historyItemTitle {
  color: var(--blue-deep);
}
.historyItemMain {
  flex: 1 1 0;
  display: grid;
  gap: 0.12rem;
  padding: 0.55rem 0.75rem;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.1s;
  min-width: 0;
}
.historyItemDelete {
  flex: 0 0 auto;
  display: none;
  align-items: center;
  justify-content: center;
  width: 2rem;
  padding: 0;
  margin: 0.3rem 0.5rem 0.3rem 0;
  background: transparent;
  border: none;
  border-radius: 0.35rem;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.historyItem:hover .historyItemDelete {
  display: inline-flex;
}
.historyItemDelete:hover {
  background: var(--panel-strong);
  color: #d94778;
}
.historyItemDelete:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--blue-deep) 52%, transparent);
  outline-offset: 2px;
  display: inline-flex;
}
.historyItemDelete svg {
  width: 0.9rem;
  height: 0.9rem;
  display: block;
}
.runningDot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--blue-deep);
  margin-right: 0.35rem;
  vertical-align: middle;
  animation: pulse-dot 1.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
.composerBrowsing {
  display: flex;
  align-items: center;
  justify-content: center;
}
.browseOverlay {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
}
.historyItemTitle {
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.historyItemMeta {
  font-size: 0.7rem;
  color: var(--muted);
}
.newChatButton {
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.1rem 0.45rem;
  border-radius: 0.35rem;
}
.chatStage {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}
.chatPanelSingleScroll {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 1rem;
  overflow: hidden;
}
.chatLog {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 0.35rem;
  margin-right: -0.7rem;
  padding-right: 0.7rem;
  padding-bottom: 0.2rem;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--panel-border-strong) transparent;
}
.chatLog::-webkit-scrollbar {
  width: 10px;
}
.chatLog::-webkit-scrollbar-track {
  background: transparent;
}
.chatLog::-webkit-scrollbar-thumb {
  background: var(--panel-border-strong);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}
.composerDocked {
  display: grid;
  gap: 0.35rem;
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin: 0 -1.15rem -1.15rem;
  padding: 0.6rem 1.15rem 1.15rem;
  background: var(--panel);
}
.composerBottom {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-size: 0.72rem;
  flex-shrink: 0;
}
.composerBottom strong {
  font-weight: 600;
}
.footerSep {
  color: var(--muted);
}
.setupStage {
  max-width: 1120px;
  margin: 0 auto;
}
.setupGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.formPanel {
  display: grid;
  gap: 0.8rem;
  background: var(--panel-strong);
}
label {
  display: grid;
  gap: 0.35rem;
}
label span,
.infoLabel {
  font-size: 0.83rem;
  font-weight: 600;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--panel-border-strong);
  border-radius: 0.4rem;
  padding: 0.72rem 0.85rem;
  color: var(--ink);
  background: var(--field-bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}
textarea {
  min-height: 7rem;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue-deep);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue-deep) 18%, transparent);
}
button {
  border: none;
  cursor: pointer;
}
.primaryButton,
.ghostButton,
.linkButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 0.45rem;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    opacity 0.15s ease;
  cursor: pointer;
}
.primaryButton {
  padding: 0.6rem 1rem;
  color: #f0f6f7;
  background: var(--violet-deep);
  border: 1px solid var(--panel-border-deep);
}
.ghostButton,
.linkButton {
  padding: 0.55rem 0.9rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--panel-border-strong);
}
.dangerButton {
  color: #d94778;
}
.stopButton {
  min-width: 7.25rem;
}
.stopButtonSymbol {
  font-size: 0.88rem;
  line-height: 1;
}
.primaryButton:hover {
  opacity: 0.88;
}
.ghostButton:hover,
.linkButton:hover {
  background: var(--panel-strong);
  border-color: var(--panel-border-strong);
}
.checkboxRow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}
.checkboxRow input {
  width: auto;
}
.disabledRow {
  opacity: 0.52;
}
.infoList {
  display: grid;
  gap: 0.75rem;
}
.infoList > div {
  display: grid;
  gap: 0.2rem;
}
.message {
  display: grid;
  gap: 0.65rem;
  padding: 1rem 1.1rem;
  border-radius: 0.5rem;
  background: var(--panel);
  border: 1px solid var(--panel-border);
}
.message.user {
  background: var(--panel-strong);
  border-color: var(--panel-border);
}
.message.assistant {
  background: var(--panel);
}
.message.system {
  padding: 0.1rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.message.system .messageTopline {
  margin-bottom: 0.15rem;
}
.message.system .messageText {
  max-width: 70ch;
}
.message.streaming {
  background: var(--panel);
  border-color: color-mix(in srgb, var(--blue-deep) 30%, var(--panel-border));
}
.messageTopline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.8rem;
}
.messageRole {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet);
}
.messageBadges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: end;
}
.messageBadge {
  display: inline-flex;
  align-items: center;
  border-radius: 0.35rem;
  padding: 0.22rem 0.52rem;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel-strong);
  border: 1px solid var(--panel-border);
}
.phaseBadge {
  color: var(--violet-deep);
  background: rgba(128, 187, 199, 0.16);
}
.quietBadge {
  color: var(--muted);
}
.workbench {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.95rem;
  align-items: center;
  border-radius: 0.45rem;
  padding: 0.75rem 0.9rem;
  background: var(--panel-strong);
  border: 1px solid var(--panel-border);
}
.compactWorkbench {
  padding: 0.82rem 0.95rem;
}
.workMeta {
  display: grid;
  gap: 0.2rem;
}
.contextStatus {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--panel-border);
}
.contextStatusLeft {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
}
.contextStatusTrack {
  width: 120px;
  height: 5px;
  border-radius: 999px;
  background: var(--panel-soft);
  flex-shrink: 0;
  overflow: hidden;
}
.contextStatusFill {
  height: 100%;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      var(--blue),
      #1cc98a);
  transition: width 0.4s ease, background 0.4s ease;
  min-width: 2px;
}
.contextStatusFill[data-warn] {
  background:
    linear-gradient(
      90deg,
      #f5a623,
      #e07b00);
}
.contextStatusFill[data-high] {
  background:
    linear-gradient(
      90deg,
      #ff7f9a,
      #d94778);
}
.contextStatusLabel {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}
.compactButton {
  font-size: 0.82rem;
  padding: 0.25rem 0.65rem;
  border-radius: 0.35rem;
  flex-shrink: 0;
}
.workGlyph {
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.workGlyphSvg {
  width: 1.3rem;
  aspect-ratio: 1;
  display: block;
}
.progressTicker {
  display: grid;
  gap: 0.45rem;
}
.progressTickerEntry {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 0.35rem;
  background: var(--panel-strong);
  border: 1px solid var(--panel-border);
  font-size: 0.9rem;
}
.progressTickerEntry.info .progressDot {
  background:
    linear-gradient(
      135deg,
      var(--blue),
      var(--blue-deep));
}
.progressTickerEntry.success .progressDot {
  background:
    linear-gradient(
      135deg,
      #1cc98a,
      #08956b);
}
.progressTickerEntry.error .progressDot {
  background:
    linear-gradient(
      135deg,
      #ff7f9a,
      #d94778);
}
.progressDot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  box-shadow: 0 0 0 6px rgba(184, 236, 239, 0.18);
}
.opRow {
  border-radius: 0.5rem;
  border: 1px solid var(--panel-border);
  background: var(--panel-strong);
  font-size: 0.86rem;
}
.opRow[open] {
  border-color: var(--blue);
}
.opRow.running {
  animation: opBorderPulse 1.6s ease-in-out infinite;
}
.opRow.error {
  border-color: #d94778;
}
.opRow.thinking {
  opacity: 0.62;
}
.opRow.thinking .opLabel {
  font-style: italic;
}
@keyframes opBorderPulse {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(56, 139, 253, 0.10);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(56, 139, 253, 0.22);
  }
}
.opRowHeader {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.42rem 0.75rem;
  cursor: pointer;
  list-style: none;
}
.opRowHeader::-webkit-details-marker {
  display: none;
}
.opRowHeader:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}
.opIcon {
  font-size: 0.9rem;
  line-height: 1;
  flex-shrink: 0;
}
.opLabel {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 450;
}
.opMeta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.opDuration {
  font-size: 0.74rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.opStatusIcon {
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.opStatusIcon.done {
  color: #1cc98a;
}
.opStatusIcon.error {
  color: #d94778;
}
@keyframes opSpin {
  to {
    transform: rotate(360deg);
  }
}
.opSpinner {
  width: 0.8rem;
  height: 0.8rem;
  border: 1.5px solid var(--panel-border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: opSpin 0.7s linear infinite;
  flex-shrink: 0;
}
.opBody {
  margin: 0;
  padding: 0.55rem 0.85rem 0.65rem;
  border-top: 1px solid var(--panel-border);
  font-size: 0.8rem;
  font-family: var(--mono-font, "ui-monospace", "SFMono-Regular", monospace);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--muted);
}
.assistantHeader {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 0.82rem 0.95rem;
  border-radius: 0.45rem;
  background: var(--panel-strong);
  border: 1px solid var(--panel-border);
}
.assistantHeader.streaming {
  border-color: color-mix(in srgb, var(--blue-deep) 30%, var(--panel-border));
}
.streamPreview {
  display: grid;
  gap: 0.32rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.35rem;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.messageText {
  white-space: pre-wrap;
  line-height: 1.7;
}
.messageText.placeholder {
  color: var(--muted);
  font-style: italic;
}
.markdownBody {
  display: grid;
  gap: 0.7rem;
}
.markdownBody > :first-child {
  margin-top: 0;
}
.markdownBody > :last-child {
  margin-bottom: 0;
}
.markdownBody p,
.markdownBody ul,
.markdownBody ol,
.markdownBody blockquote,
.markdownBody pre,
.markdownBody table,
.markdownBody hr {
  margin: 0;
}
.markdownBody h1,
.markdownBody h2,
.markdownBody h3,
.markdownBody h4,
.markdownBody h5,
.markdownBody h6 {
  margin: 0;
  line-height: 1.2;
}
.markdownBody h1 {
  font-size: 1.45rem;
}
.markdownBody h2 {
  font-size: 1.25rem;
}
.markdownBody h3 {
  font-size: 1.08rem;
}
.markdownBody ul,
.markdownBody ol {
  padding-left: 1.4rem;
}
.markdownBody li + li {
  margin-top: 0.24rem;
}
.markdownBody a {
  color: var(--violet);
  text-decoration: underline;
  text-underline-offset: 0.14em;
  word-break: break-word;
}
.markdownBody code {
  padding: 0.1rem 0.32rem;
  border-radius: 0.3rem;
  background: var(--panel-strong);
  border: 1px solid var(--panel-border);
  font-family:
    "IBM Plex Mono",
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: 0.9em;
}
.markdownBody pre {
  overflow: auto;
  padding: 0.85rem 1rem;
  border-radius: 0.45rem;
  background: var(--panel-strong);
  border: 1px solid var(--panel-border);
}
.markdownBody pre code {
  padding: 0;
  background: transparent;
}
.markdownBody blockquote {
  padding-left: 0.9rem;
  border-left: 3px solid rgba(128, 187, 199, 0.38);
  color: var(--muted);
}
.markdownBody hr {
  border: 0;
  border-top: 1px solid var(--panel-border);
}
.notice {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 20;
  max-width: 24rem;
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  color: var(--notice-text, #f7fbfb);
  background: var(--notice-bg, var(--violet-deep));
  border: 1px solid var(--panel-border-deep);
  box-shadow: 0 8px 20px rgba(12, 16, 31, 0.2);
}
.brandTitleAccent,
.messageRole,
.markdownBody a {
  color: var(--blue-deep);
}
.composerButtonGroup {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.resetChatButton {
  background: transparent;
  border-color: transparent;
}
.sessionFacts {
  gap: 0;
  border-top: 1px solid var(--panel-border);
}
.factCard + .factCard {
  border-top: 1px solid var(--panel-border);
}
.message.system .messageText,
.message.system .markdownBody,
.message.system .markdownBody p {
  background: transparent;
}
.messageBadge.quietBadge {
  color: var(--muted);
}
.phaseBadge {
  color: var(--blue-deep);
  background: color-mix(in srgb, var(--blue-deep) 10%, transparent);
  border-color: color-mix(in srgb, var(--blue-deep) 22%, transparent);
}
.progressTickerEntry.info .progressDot {
  background: var(--blue-deep);
}
.progressTickerEntry.success .progressDot {
  background: var(--progress-success, #1f8f64);
}
.progressTickerEntry.error .progressDot {
  background: var(--progress-error, #c94d72);
}
.workflowBadge {
  background: var(--workflow-badge-bg);
}
.gearButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--panel-border);
  border-radius: 0.4rem;
  background: transparent;
  color: var(--muted);
  flex-shrink: 0;
  cursor: pointer;
}
.gearButton svg {
  width: 1rem;
  height: 1rem;
  display: block;
}
.gearButton:hover {
  background: var(--panel-strong);
  color: var(--ink);
  border-color: var(--panel-border-strong);
}
.gearButton:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--blue-deep) 52%, transparent);
  outline-offset: 2px;
}
@keyframes pixelBlink {
  0% {
    opacity: 0;
  }
  4% {
    opacity: 1;
  }
  10% {
    opacity: 0;
  }
  14% {
    opacity: 1;
  }
  19% {
    opacity: 0.25;
  }
  23% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  74% {
    opacity: 0;
  }
  77% {
    opacity: 0.45;
  }
  81% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.workGlyphPixel {
  fill: var(--blue-deep);
  opacity: 0;
  animation: pixelBlink 2.4s steps(1, end) infinite;
  animation-fill-mode: backwards;
}
@media (max-width: 1120px) {
  .shellHome {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
  .setupGrid {
    grid-template-columns: 1fr;
  }
  .chatStage {
    min-height: auto;
    height: auto;
    overflow: visible;
  }
  .chatPanelSingleScroll {
    height: auto;
    overflow: visible;
  }
  .sidebar {
    overflow: visible;
  }
  .brandTitle {
    max-width: none;
  }
  .brandTitleLine {
    white-space: normal;
  }
}
@media (max-width: 720px) {
  .shell {
    padding: 0.85rem;
  }
  .brandCard {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }
  .brandCopy {
    padding-right: 0;
    padding-top: 0;
  }
  .brandCardTopRight {
    position: static;
    margin-top: 0.9rem;
  }
  .themeControl {
    position: static;
    margin-top: 0;
  }
  .chatHero,
  .sectionHeader,
  .chatHeroActions,
  .composerActions,
  .messageTopline {
    flex-direction: column;
    align-items: stretch;
  }
  .workbench {
    grid-template-columns: 1fr;
  }
  .messageBadges {
    justify-content: start;
  }
  .primaryButton,
  .ghostButton,
  .linkButton {
    width: 100%;
  }
}
.workflowCard {
  margin-top: 0.75rem;
  border-radius: 0.45rem;
  background: var(--workflow-card-bg);
  border: 1px solid var(--workflow-card-border);
  overflow: hidden;
}
.workflowHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
}
.workflowHeaderLeft {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}
.workflowBadge {
  display: inline-block;
  padding: 0.12rem 0.48rem;
  border-radius: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--workflow-badge-ink);
  background: var(--workflow-badge-bg);
}
.workflowTitle {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--workflow-title-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workflowHeader .primaryButton {
  flex-shrink: 0;
  width: auto;
}
.workflowGraphWrap {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--workflow-card-border);
  overflow-x: auto;
  background: var(--workflow-card-bg-subtle);
  max-height: 640px;
  overflow-y: auto;
}
.workflowGraph {
  display: block;
}
.workflowDiagram {
  margin: 0;
  color: var(--workflow-title-ink);
}
.executionResult {
  padding: 0.5rem 0.875rem;
  border-top: 1px solid var(--workflow-card-border);
  font-size: 0.8rem;
}
.executionResultHeader {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.executionBadge {
  font-weight: 600;
}
.executionBadge.execSuccess {
  color: #1cc98a;
}
.executionBadge.execError {
  color: #d94778;
}
.executionBadge.execWaiting {
  color: var(--muted);
}
.executionSummary {
  color: var(--muted);
}
.executionData {
  margin: 0.5rem 0 0;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 0.3rem;
  font-size: 0.75rem;
  overflow-x: auto;
}
.msgSimple {
  padding: 0.5rem 0.75rem;
  line-height: 1.6;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}
.msgUser {
  background: var(--panel-soft);
  border-left: 3px solid var(--blue-deep);
  color: var(--ink);
  margin-right: 2rem;
}
.msgAssistant {
  background: var(--panel);
  border-left: 3px solid var(--violet);
  color: var(--ink);
}
.msgSystem {
  color: var(--muted);
  font-size: 0.9rem;
  background: transparent;
  border-left: 3px solid var(--muted);
  margin-left: 2rem;
  margin-right: 2rem;
}
.msgStreaming {
  color: var(--muted);
  font-style: italic;
  background: var(--panel);
  border-left: 3px solid var(--muted);
}
.msgIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
  vertical-align: middle;
  flex-shrink: 0;
}
.msgIconAssistant .workGlyphSvg {
  width: 16px;
  height: 16px;
}
.msgIconAssistant .workGlyphPixel {
  fill: var(--violet);
}
.msgIconAssistant .workGlyphSvg:not(.animated) .workGlyphPixel {
  animation: none;
  opacity: 1;
}
.collapsible {
  margin-top: 0.1rem;
}
.collapsibleTrigger {
  cursor: pointer;
  list-style: none;
  font-size: 0.75rem;
  color: var(--muted);
}
.collapsibleTrigger::-webkit-details-marker {
  display: none;
}
.collapsibleContent {
  padding-left: 0.2rem;
  margin: 0.1rem 0 0;
}
.collapsible .opBody {
  font-size: 0.8rem;
  word-break: break-word;
  color: var(--muted);
}
.collapsible .opSummary {
  font-size: 0.8rem;
  color: var(--muted);
}
.workflowSimple {
  padding: 0.2rem 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.execStatus.success {
  color: #1cc98a;
}
.execStatus.error {
  color: #d94778;
}
.execStatus.waiting {
  color: var(--muted);
}
.workflowSimple a {
  color: var(--violet);
}
/*# sourceMappingURL=styles.css.map */
