/* ==========================================================================
   Tokens / base
   ========================================================================== */

:root {
  --ink: #20231f;
  --muted: #74776f;
  --line: #e7e5de;
  --paper: #f7f7f3;
  --white: #fff;
  --violet: #6252a4;
  --violet-soft: #eeebf8;
  --green: #23785e;
  --green-soft: #e5f4ed;
  --orange: #a8652b;
  --orange-soft: #fff0df;
  --shadow: 0 10px 30px rgba(34,37,31,.06)
}

.nav-item.disabled {
  opacity: .45
}

/* ==========================================================================
   Dashboard / workspace index foundations
   ========================================================================== */

.workspace-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 15px
}

.workspace-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow)
}

.workspace-card>div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.workspace-card h3 {
  font: 700 15px Manrope;
  margin: 16px 0 5px
}

.workspace-card p {
  min-height: 38px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5
}

.workspace-card small {
  display: block;
  color: #999;
  font-size: 8px;
  margin-bottom: 15px
}

.sample-badge,.owned-badge {
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .05em
}

.sample-badge {
  background: var(--orange-soft);
  color: var(--orange)
}

.owned-badge {
  background: var(--green-soft);
  color: var(--green)
}

.empty-state {
  text-align: center;
  padding: 60px 20px
}

.empty-state>span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 14px;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 25px
}

.empty-state p {
  color: var(--muted)
}

/* ==========================================================================
   Modals
   ========================================================================== */

dialog {
  width: min(520px,calc(100% - 30px));
  padding: 0;
  border: 0;
  border-radius: 13px;
  box-shadow: 0 24px 80px #25231f55
}

dialog::backdrop {
  background: #29272299;
  backdrop-filter: blur(3px)
}

.modal-form {
  padding: 25px
}

.modal-head,.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px
}

.modal-head h2 {
  font: 700 20px Manrope;
  margin: 3px 0 18px
}

.icon-button {
  border: 0;
  background: #f1f0eb;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px
}

.modal-form label,.agent-chat label,.agent-tools label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin: 12px 0
}

.modal-form input,.modal-form textarea,.agent-chat textarea,.agent-tools input,.agent-tools textarea,.agent-tools select,.agent-chat select {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  background: #fafaf7;
  border-radius: 7px;
  padding: 10px;
  margin-top: 5px;
  resize: vertical
}

.modal-form textarea,.agent-chat textarea,.agent-tools textarea {
  min-height: 85px
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 20px
}

/* ==========================================================================
   Chat
   ========================================================================== */

.agent-layout {
  display: grid;
  grid-template-columns: 1.35fr .75fr;
  gap: 15px
}

.agent-chat .panel-head select {
  width: auto;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 6px
}

.agent-messages {
  display: grid;
  gap: 10px;
  min-height: 260px;
  max-height: 440px;
  overflow: auto;
  padding: 8px 0
}

.agent-message {
  max-width: 82%;
  padding: 11px 13px;
  border-radius: 10px;
  background: #f1f0ed;
  color: var(--ink)
}

.agent-message.user {
  justify-self: end;
  background: var(--violet-soft);
  color: var(--ink)
}

.agent-message.assistant {
  color: var(--ink)
}

.agent-message.error {
  background: #fae9e7;
  border: 1px solid #e6b8b3
}

.agent-message small {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase
}

.agent-message p {
  font-size: 10px;
  line-height: 1.55;
  margin: 5px 0 0;
  white-space: pre-wrap
}

.tool-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 14px 0
}

.tool-tabs button {
  border: 1px solid var(--line);
  background: #fafaf7;
  border-radius: 6px;
  padding: 8px;
  font-size: 9px
}

.tool-tabs button.active {
  border-color: var(--violet);
  background: var(--violet-soft);
  color: var(--violet)
}

.agent-actions {
  display: grid;
  gap: 6px;
  margin-top: 16px
}

.agent-action {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 9px;
  font-size: 9px
}

.agent-action small {
  grid-column: 1/-1;
  color: var(--muted)
}

/* ==========================================================================
   Responsive states
   ========================================================================== */

@media(max-width:1000px) {
  .workspace-grid {
    grid-template-columns: repeat(2,1fr)
  }

}

@media(max-width:720px) {
  .workspace-grid,.agent-layout {
    grid-template-columns: 1fr
  }

}

/* ==========================================================================
   Base elements and shared controls
   ========================================================================== */

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans",sans-serif;
  font-size: 14px
}

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

button,a {
  transition: .18s ease
}

button {
  cursor: pointer
}

.app-shell {
  min-height: 100vh
}

/* ==========================================================================
   Layout / sidebar
   ========================================================================== */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 244px;
  background: #252720;
  color: #e9e9e2;
  padding: 26px 18px 20px;
  display: flex;
  flex-direction: column;
  z-index: 4
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: white;
  text-decoration: none;
  font: 600 17px Manrope,sans-serif;
  padding: 0 8px 32px
}

.brand b {
  color: #beb2ef
}

.brand-mark {
  width: 25px;
  height: 25px;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  align-items: end;
  gap: 2px
}

.brand-mark i {
  display: block;
  background: #9987df;
  border-radius: 2px
}

.brand-mark i:nth-child(1) {
  height: 12px
}

.brand-mark i:nth-child(2) {
  height: 23px
}

.brand-mark i:nth-child(3) {
  height: 17px
}

.workspace-label {
  padding: 0 9px 8px;
  color: #999c91;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase
}

.project-switcher {
  border: 1px solid #41443a;
  background: #30322b;
  color: #fff;
  border-radius: 9px;
  padding: 10px;
  display: flex;
  align-items: center;
  text-align: left;
  width: 100%;
  gap: 9px
}

.project-switcher:hover {
  background: #393b33
}

.project-switcher>span:nth-child(2) {
  min-width: 0;
  flex: 1
}

.project-switcher b,.project-switcher small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.project-switcher b {
  font-size: 12px
}

.project-switcher small {
  color: #aeb0a8;
  font-size: 10px;
  margin-top: 2px
}

.project-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: #6252a4;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 700
}

.chevron {
  color: #aaa
}

nav {
  display: grid;
  gap: 4px;
  margin-top: 24px
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #afb1aa;
  text-decoration: none;
  padding: 10px 11px;
  border-radius: 7px;
  font-size: 13px
}

.nav-item>span {
  font-size: 17px;
  width: 18px;
  text-align: center;
  color: #8f9289
}

.nav-item em {
  font-style: normal;
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 8px;
  background: #3c3e36;
  font-size: 9px
}

.nav-item:hover,.nav-item.active {
  color: #fff;
  background: #393b33
}

.nav-item.active>span {
  color: #b9a9ed
}

.sidebar-foot {
  margin-top: auto
}

.evidence-health {
  padding: 13px;
  border: 1px solid #41443b;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 11px
}

.evidence-health>span {
  color: #aaa
}

.evidence-health>b {
  float: right
}

.evidence-health>div {
  height: 4px;
  background: #4b4d45;
  border-radius: 4px;
  margin-top: 10px;
  overflow: hidden
}

.evidence-health i {
  display: block;
  width: 75%;
  height: 100%;
  background: #9b89db
}

.sidebar .user {
  border: 0;
  background: transparent;
  color: white;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  padding: 7px
}

.sidebar .user>span:first-child {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: #555946;
  border-radius: 50%;
  font-size: 10px
}

.sidebar .user>span:nth-child(2) {
  flex: 1
}

.sidebar .user b,.sidebar .user small {
  display: block
}

.sidebar .user b {
  font-size: 11px
}

.sidebar .user small {
  font-size: 9px;
  color: #999
}

.sidebar .user i {
  color: #888;
  font-style: normal
}

main {
  margin-left: 244px;
  min-height: 100vh
}

.topbar {
  height: 83px;
  padding: 17px 34px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(247,247,243,.94);
  position: sticky;
  top: 0;
  z-index: 3;
  backdrop-filter: blur(12px)
}

.eyebrow {
  color: #999c94;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 9px;
  font-weight: 700;
  margin: 0 0 4px
}

.topbar h1 {
  font: 700 20px Manrope,sans-serif;
  margin: 0
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px
}

.saved {
  color: #6d756b;
  font-size: 10px
}

.saved::first-letter {
  color: #4b987d
}

.button {
  border: 1px solid var(--line);
  background: white;
  padding: 9px 13px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,.02)
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow)
}

.button.primary {
  background: #6854aa;
  border-color: #6854aa;
  color: white
}

.button.dark {
  background: #282b25;
  border-color: #282b25;
  color: #fff
}

.button.full {
  width: 100%
}

.view {
  display: none;
  padding: 30px 34px 60px;
  max-width: 1500px;
  margin: auto
}

.view.active {
  display: block
}

/* ==========================================================================
   Dashboard
   ========================================================================== */

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 25px
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 600;
  font-size: 10px
}

.status-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #42a17e
}

.hero h2,.page-intro h2 {
  font: 700 28px/1.2 Manrope,sans-serif;
  margin: 10px 0 7px;
  letter-spacing: -.03em
}

.hero>div:first-child>p,.page-intro>div>p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 13px
}

.review-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow)
}

.review-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--green);
  background: var(--green-soft);
  font-weight: 700
}

.review-card div:nth-child(2) {
  min-width: 105px
}

.review-card span,.review-card b,.review-card small {
  display: block
}

.review-card span {
  font-size: 9px;
  color: #999
}

.review-card b {
  font-size: 11px;
  margin: 2px 0
}

.review-card small {
  font-size: 9px;
  color: var(--orange)
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 12px;
  margin-bottom: 15px
}

.metrics article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  position: relative
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 16px
}

.lavender {
  background: var(--violet-soft);
  color: var(--violet)
}

.mint {
  background: var(--green-soft);
  color: var(--green)
}

.peach {
  background: var(--orange-soft);
  color: var(--orange)
}

.blue {
  background: #e5f0f6;
  color: #477891
}

.metrics small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-bottom: 3px
}

.metrics b {
  font: 700 20px Manrope,sans-serif
}

.metrics b i {
  font: 500 9px "DM Sans";
  color: #91948d;
  font-style: normal
}

.trend {
  position: absolute;
  right: 12px;
  bottom: 13px;
  color: #989b93;
  font-size: 8px
}

.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(20,20,15,.02);
  padding: 20px
}

.route-notice {
  margin-bottom: 20px;
  border-color: #e3a5a5;
  background: #fff7f7;
}

.route-notice p { margin: 6px 0 0; }

.content-grid {
  display: grid;
  grid-template-columns: minmax(0,1.65fr) minmax(260px,.8fr);
  gap: 15px
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 15px
}

.panel h3 {
  font: 700 14px Manrope,sans-serif;
  margin: 0 0 3px
}

.panel-head p {
  color: #969990;
  font-size: 10px;
  margin: 0
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--violet);
  font-size: 10px;
  font-weight: 600
}

/* ==========================================================================
   Workflow graph and editor
   ========================================================================== */

.gate-list {
  display: grid
}

.gate-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #efeee9;
  padding: 11px 2px
}

.gate-item:first-child {
  border-top: 0
}

.gate-state {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-size: 10px
}

.gate-state.pending {
  background: #f1f0ed;
  color: #999
}

.gate-copy {
  flex: 1
}

.gate-copy b,.gate-copy small {
  display: block
}

.gate-copy b {
  font-size: 11px
}

.gate-copy small {
  color: #8d9089;
  font-size: 9px;
  margin-top: 2px
}

.evidence-tag {
  padding: 4px 7px;
  border-radius: 5px;
  color: var(--violet);
  background: var(--violet-soft);
  font-size: 8px;
  font-weight: 600
}

.gate-arrow {
  color: #bbb
}

.new-pill {
  float: right;
  border-radius: 8px;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 8px;
  padding: 3px 6px
}

.suggestion {
  padding: 12px 0;
  border-top: 1px solid #efeee9
}

.suggestion:first-of-type {
  border-top: 0
}

.suggestion>span {
  display: inline-block;
  color: var(--violet);
  background: var(--violet-soft);
  font-size: 8px;
  padding: 3px 6px;
  border-radius: 4px;
  margin-bottom: 7px
}

.suggestion b {
  display: block;
  font-size: 10px;
  line-height: 1.35
}

.suggestion p {
  font-size: 9px;
  color: #858880;
  line-height: 1.45;
  margin: 4px 0 8px
}

.suggestion button {
  border: 0;
  background: transparent;
  color: var(--violet);
  padding: 0;
  font-weight: 600;
  font-size: 9px
}

.model-panel {
  margin-top: 15px
}

.model-panel .panel-head label {
  font-size: 9px;
  color: #888
}

.model-panel select {
  display: block;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 6px;
  margin-top: 3px;
  font-size: 9px
}

.model-tabs {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 8px
}

.model-tabs button {
  border: 1px solid var(--line);
  background: #fafaf7;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  gap: 8px;
  text-align: left
}

.model-tabs button.active {
  border-color: #9485cd;
  background: #f7f5fd;
  box-shadow: inset 0 0 0 1px #9485cd
}

.model-tabs i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 3px
}

.model-tabs i.sol {
  background: #df8a52
}

.model-tabs i.luna {
  background: #7663bd
}

.model-tabs i.terra {
  background: #4d9278
}

.model-tabs span,.model-tabs small {
  display: block
}

.model-tabs span {
  font-size: 10px;
  font-weight: 700
}

.model-tabs small {
  font-weight: 400;
  color: #8d9089;
  font-size: 8px;
  margin-top: 2px
}

.model-output {
  margin-top: 10px;
  background: #292c27;
  color: #e9ebe5;
  border-radius: 8px;
  padding: 14px
}

.output-head {
  display: flex;
  justify-content: space-between;
  color: #9fa39b;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em
}

.output-head .pass {
  color: #83c5aa;
  letter-spacing: 0
}

.model-output p {
  font-size: 10px;
  line-height: 1.55;
  color: #dcdfd8
}

.check-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap
}

.check-chips span {
  background: #343b34;
  color: #8fc5ae;
  border: 1px solid #455249;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 8px
}

.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 25px
}

.editor-grid,.review-layout {
  display: grid;
  grid-template-columns: 1.35fr .75fr;
  gap: 15px
}

.editor-gate {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer
}

.editor-gate.active {
  border-color: #8978c2;
  background: #faf8ff
}

.editor-gate div {
  flex: 1
}

.editor-gate b,.editor-gate small {
  display: block
}

.editor-gate small {
  color: #92958e;
  font-size: 9px;
  margin-top: 3px
}

.badge {
  display: inline-block;
  background: var(--violet-soft);
  color: var(--violet);
  padding: 4px 6px;
  font-size: 8px;
  border-radius: 4px;
  margin-bottom: 8px
}

.detail-panel label,.signoff label {
  display: block;
  font-size: 9px;
  color: #868981;
  margin-top: 14px
}

.detail-panel input,.detail-panel textarea,.detail-panel select,.signoff textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  background: #fafaf7;
  border-radius: 6px;
  padding: 9px;
  margin: 5px 0 11px;
  font-size: 10px;
  resize: vertical
}

.detail-panel textarea {
  height: 70px
}

.prompt-layout {
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: 15px
}

.fragment {
  display: grid;
  grid-template-columns: 25px 1fr auto;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 14px 0;
  align-items: start
}

.fragment>span {
  color: #aaa;
  font: 10px monospace
}

.fragment p {
  margin: 0;
  font: 11px/1.55 monospace
}

.fragment button {
  border: 0;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 8px;
  border-radius: 4px;
  padding: 4px 6px
}

.add-fragment {
  width: 100%;
  border: 1px dashed #cbc8bd;
  background: #fafaf7;
  border-radius: 7px;
  padding: 9px;
  color: #7c7f77;
  font-size: 10px
}

.evidence-detail p:not(.eyebrow) {
  color: #74776f;
  font-size: 11px;
  line-height: 1.55
}

.evidence-detail a {
  color: var(--violet);
  font-size: 10px
}

/* ==========================================================================
   Sandbox
   ========================================================================== */

.scenario-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px;
  border-bottom: 1px solid var(--line)
}

.scenario-row>div {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto
}

.scenario-row b,.scenario-row small {
  display: block
}

.scenario-row small {
  color: #888;
  font-size: 9px;
  margin-top: 3px
}

.scenario-icon {
  display: grid;
  place-items: center;
  background: var(--violet-soft);
  color: var(--violet);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-weight: 700
}

.result-pass,.result-warn {
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 9px
}

.result-pass {
  background: var(--green-soft);
  color: var(--green)
}

.result-warn {
  background: var(--orange-soft);
  color: var(--orange)
}

.run-progress {
  margin-top: 15px;
  padding: 12px;
  background: #f4f2fb;
  border-radius: 7px;
  color: var(--violet);
  font-size: 10px
}

.run-progress i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 2px solid #c7bee8;
  border-top-color: var(--violet);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin-right: 7px;
  vertical-align: middle
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }

}

/* ==========================================================================
   Research
   ========================================================================== */

.search {
  width: 260px;
  border: 1px solid var(--line);
  background: white;
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 10px
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 12px
}

.research-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 17px
}

.research-card .tags span {
  display: inline-block;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 8px;
  padding: 3px 5px;
  border-radius: 4px;
  margin-right: 4px
}

.research-card h3 {
  font: 700 13px/1.4 Manrope;
  margin: 10px 0 4px
}

.research-card small {
  color: #90938b
}

.research-card p {
  color: #6f726b;
  font-size: 10px;
  line-height: 1.5
}

.research-card a {
  color: var(--violet);
  text-decoration: none;
  font-size: 9px;
  font-weight: 600
}

.change {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--line)
}

.change>span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--violet-soft);
  color: var(--violet);
  border-radius: 7px
}

.change b {
  font-size: 10px
}

.change p {
  font-size: 9px;
  color: #888;
  margin: 4px 0
}

.change time {
  font-size: 8px;
  color: #aaa
}

.signoff {
  text-align: center;
  padding: 28px
}

.signoff .review-icon {
  margin: 0 auto 12px
}

.signoff p {
  color: #858880;
  font-size: 10px
}

.signoff label {
  text-align: left
}

.toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  padding: 11px 15px;
  background: #292c27;
  color: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 10px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: .2s;
  z-index: 10
}

.toast.show {
  opacity: 1;
  transform: none
}

@media(max-width:1000px) {
  .sidebar {
    width: 200px
  }

  .project-switcher span:nth-child(2) {
    display: none
  }

  main {
    margin-left: 200px
  }

  .metrics {
    grid-template-columns: repeat(2,1fr)
  }

  .content-grid {
    grid-template-columns: 1fr
  }

  .top-actions .saved {
    display: none
  }

  .view {
    padding: 24px
  }

  .topbar {
    padding: 15px 24px
  }

}

@media(max-width:720px) {
  .sidebar {
    position: fixed;
    top: auto;
    right: 0;
    width: auto;
    height: 60px;
    padding: 6px 8px;
    flex-direction: row
  }

  .brand,.workspace-label,.project-switcher,.sidebar-foot {
    display: none
  }

  .sidebar nav {
    display: flex;
    margin: 0;
    width: 100%;
    justify-content: space-around
  }

  .nav-item {
    padding: 8px;
    flex-direction: column;
    gap: 1px;
    font-size: 8px
  }

  .nav-item>span {
    font-size: 14px
  }

  .nav-item em {
    display: none
  }

  main {
    margin-left: 0;
    margin-bottom: 60px
  }

  .topbar {
    height: auto;
    padding: 12px 16px
  }

  .topbar h1 {
    font-size: 15px
  }

  .top-actions .secondary {
    display: none
  }

  .button {
    padding: 8px 10px
  }

  .view {
    padding: 20px 15px
  }

  .hero,.page-intro {
    align-items: flex-start;
    gap: 16px
  }

  .hero .review-card {
    display: none
  }

  .hero h2,.page-intro h2 {
    font-size: 23px
  }

  .metrics {
    grid-template-columns: 1fr 1fr
  }

  .content-grid,.editor-grid,.prompt-layout,.review-layout,.research-grid {
    grid-template-columns: 1fr
  }

  .model-tabs small {
    display: none
  }

  .model-panel .panel-head {
    display: block
  }

  .model-panel .panel-head label {
    display: block;
    margin-top: 10px
  }

  .top-actions .primary span {
    display: none
  }

  .search {
    width: 100%;
    margin-top: 10px
  }

  .page-intro {
    display: block
  }

}

/* ==========================================================================
   Auth
   ========================================================================== */

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 15% 15%,#eeeafa,transparent 35%),var(--paper)
}

.auth-screen[hidden],.app-shell[hidden] {
  display: none
}

.auth-card {
  width: min(430px,100%);
  padding: 34px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow)
}

.auth-card .brand {
  color: var(--ink);
  padding: 0 0 30px
}

.auth-card h1 {
  font: 700 28px/1.2 Manrope;
  margin: 8px 0
}

.auth-card>p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 24px 0 16px;
  border-bottom: 1px solid var(--line)
}

.auth-tabs button {
  padding: 10px;
  border: 0;
  background: transparent;
  color: var(--muted)
}

.auth-tabs button.active {
  color: var(--violet);
  border-bottom: 2px solid var(--violet)
}

.auth-card label,.run-prompt {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin: 12px 0
}

.auth-card input,.run-prompt textarea {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafaf7
}

.run-prompt textarea {
  min-height: 90px;
  resize: vertical
}

.auth-card .secondary {
  margin-top: 8px
}

.form-error {
  min-height: 18px;
  color: #a23f3f;
  font-size: 10px
}

.model-panel>#runPromptBtn {
  margin-top: 10px
}

.model-output.error {
  background: #392828
}

.run-history {
  display: grid;
  gap: 6px;
  margin-top: 10px
}

.run-history>button {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  text-align: left;
  border: 1px solid var(--line);
  background: #fafaf7;
  border-radius: 6px;
  padding: 8px;
  font-size: 9px
}

.run-history small {
  color: var(--muted)
}

.run-error {
  color: #ad4646
}

/* Dashboard / workspace index refinements. */

.workspace-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(220px,1fr));
  gap: 14px
}

.workspace-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 18px;
  box-shadow: var(--shadow)
}

.workspace-card>div {
  display: flex;
  justify-content: space-between;
  align-items: center
}

.workspace-card h3 {
  font: 700 15px Manrope;
  margin: 15px 0 5px
}

.workspace-card p {
  color: var(--muted);
  min-height: 38px;
  font-size: 11px
}

.workspace-card small {
  display: block;
  color: #92958e;
  font-size: 9px;
  margin-bottom: 15px
}

.sample-badge,.owned-badge {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .06em;
  border-radius: 10px;
  padding: 4px 7px
}

.sample-badge {
  background: var(--orange-soft);
  color: var(--orange)
}

.owned-badge {
  background: var(--green-soft);
  color: var(--green)
}

.empty-state {
  text-align: center;
  padding: 55px
}

.empty-state>span {
  font-size: 30px;
  color: var(--violet)
}

.empty-state p {
  color: var(--muted)
}

.nav-item.disabled {
  opacity: .45;
  pointer-events: none
}

/* Modal refinements. */

dialog {
  width: min(520px,calc(100% - 32px));
  border: 0;
  border-radius: 13px;
  padding: 0;
  box-shadow: 0 24px 80px rgba(20,20,15,.25)
}

dialog::backdrop {
  background: rgba(24,26,22,.55);
  backdrop-filter: blur(2px)
}

.modal-form {
  padding: 24px
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start
}

.modal-head h2 {
  font: 700 22px Manrope;
  margin: 4px 0 15px
}

.icon-button {
  border: 0;
  background: transparent;
  font-size: 24px;
  color: var(--muted)
}

.modal-form label,.agent-chat label,.agent-tools label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin: 12px 0
}

.modal-form input,.modal-form textarea,.agent-chat textarea,.agent-tools input,.agent-tools textarea,.agent-tools select {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafaf7;
  padding: 10px;
  margin-top: 5px;
  resize: vertical
}

.modal-form textarea,.agent-chat textarea,.agent-tools textarea {
  min-height: 85px
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px
}

/* Chat refinements. */

.agent-layout {
  display: grid;
  grid-template-columns: minmax(0,1.25fr) minmax(300px,.75fr);
  gap: 15px
}

.agent-messages {
  display: grid;
  gap: 9px;
  min-height: 260px;
  max-height: 480px;
  overflow: auto;
  padding: 4px
}

.agent-message {
  max-width: 85%;
  padding: 11px 13px;
  border-radius: 9px;
  background: #f2f1ec;
  color: var(--ink)
}

.agent-message.user {
  justify-self: end;
  background: var(--violet-soft);
  color: var(--ink)
}

.agent-message.assistant {
  color: var(--ink)
}

.agent-message.error {
  border: 1px solid #e5bebe;
  background: #fff2f2
}

.agent-message small {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase
}

.agent-message p,.agent-message li,.agent-message pre {
  font-size: 11px;
  line-height: 1.5;
  margin: 5px 0
}

.agent-message time,.agent-tool-call>time {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 8px
}

.agent-message-body>:first-child {
  margin-top: 5px
}

.agent-message-body>:last-child {
  margin-bottom: 0
}

.agent-message-body pre {
  max-width: 100%;
  padding: 8px;
  border-radius: 6px;
  background: #292c27;
  color: #e9ebe5;
  white-space: pre-wrap;
  overflow: auto
}

.agent-tool-call {
  width: min(92%,680px);
  justify-self: center;
  padding: 12px 14px;
  border: 1px solid #dcd6ef;
  border-radius: 9px;
  background: #faf9ff;
  color: var(--ink)
}

.agent-tool-call.error {
  border-color: #e5bebe;
  background: #fff7f7
}

.agent-tool-call>header {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 9px
}

.agent-tool-call header div {
  display: grid;
  gap: 2px
}

.agent-tool-call header small,.agent-tool-call>time {
  color: var(--muted);
  font-size: 8px
}

.agent-tool-call header b {
  font-size: 11px;
  text-transform: capitalize
}

.agent-tool-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: var(--violet-soft);
  color: var(--violet)
}

.agent-tool-status {
  padding: 3px 7px;
  border-radius: 999px;
  background: #eceae3;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase
}

.agent-tool-summary {
  display: grid;
  gap: 7px;
  margin: 11px 0 0
}

.agent-tool-summary>div {
  padding: 8px 9px;
  border: 1px solid #e8e6de;
  border-radius: 7px;
  background: #fff
}

.agent-tool-summary dt,.agent-tool-records>b {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase
}

.agent-tool-summary dd {
  margin: 3px 0 0;
  font-size: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere
}

.agent-tool-summary dd p,.agent-tool-summary dd ul,.agent-tool-summary dd dl {
  margin: 2px 0
}

.agent-tool-error dd {
  color: #9c2929
}

.agent-tool-records {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px
}

.agent-tool-records a {
  padding: 4px 7px;
  border: 1px solid #dcd6ef;
  border-radius: 5px;
  color: var(--violet);
  background: #fff;
  font-size: 9px;
  text-decoration: none
}

.agent-tool-raw {
  margin-top: 9px;
  font-size: 9px
}

.agent-tool-raw summary {
  width: max-content;
  color: var(--violet);
  cursor: pointer;
  font-weight: 700
}

.agent-tool-raw pre {
  max-height: 300px;
  margin: 8px 0 0;
  padding: 10px;
  border-radius: 7px;
  background: #292c27;
  color: #e9ebe5;
  font: 10px/1.5 monospace;
  white-space: pre-wrap;
  overflow: auto
}

.agent-chat form {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 8px
}

.agent-chat .panel-head select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px;
  background: #fff;
  font-size: 9px
}

.agent-tools>p {
  color: var(--muted);
  font-size: 10px
}

.agent-actions-title {
  margin: 20px 0 0;
  font-size: 10px
}

.tool-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(65px,1fr));
  gap: 5px;
  margin: 14px 0
}

.tool-tabs button {
  border: 1px solid var(--line);
  background: #fafaf7;
  border-radius: 6px;
  padding: 7px 4px;
  font-size: 9px
}

.tool-tabs button.active {
  color: var(--violet);
  border-color: #9485cd;
  background: var(--violet-soft)
}

.agent-actions {
  display: grid;
  gap: 6px;
  margin-top: 7px
}

.agent-action {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px;
  border-top: 1px solid var(--line);
  padding-top: 9px
}

.agent-action b {
  font-size: 10px;
  text-transform: capitalize
}

.agent-action span,.agent-action small {
  font-size: 8px
}

.agent-action small {
  grid-column: 1/-1;
  color: var(--muted)
}

@media(max-width:1000px) {
  .workspace-grid {
    grid-template-columns: repeat(2,1fr)
  }

  .agent-layout {
    grid-template-columns: 1fr
  }

}

@media(max-width:720px) {
  .workspace-grid {
    grid-template-columns: 1fr
  }

  .agent-layout {
    grid-template-columns: 1fr
  }

}

/* Sandbox run results and controls. */

.sandbox-actions {
  display: flex;
  gap: 8px
}

.scenario-select {
  accent-color: var(--violet)
}

.scenario-run-summary,.generation-status {
  padding: 10px;
  border-radius: 7px;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 10px
}

.generation-status {
  margin: 12px 0
}

.scenario-row .button {
  white-space: nowrap
}

.scenario-processing {
  background: var(--violet-soft);
  color: var(--violet)
}

.scenario-run-result {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid #d9d5e8;
  border-radius: 8px;
  background: #faf9fe
}

.scenario-run-result.error {
  border-color: #e4c8b8;
  background: #fff8f3
}

.scenario-run-result h3 {
  margin: 0 0 10px;
  font: 700 12px Manrope,sans-serif
}

.scenario-run-metadata {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
  margin: 0 0 12px
}

.scenario-run-metadata div {
  min-width: 0
}

.scenario-run-metadata dt {
  color: #858880;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .06em
}

.scenario-run-metadata dd {
  margin: 3px 0 0;
  font-size: 10px;
  overflow-wrap: anywhere
}

.scenario-run-body b,.scenario-run-error b {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .06em
}

.scenario-run-body pre {
  margin: 6px 0 0;
  padding: 11px;
  border-radius: 6px;
  background: #292c27;
  color: #e9ebe5;
  font: 10px/1.55 monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere
}

.scenario-run-error {
  margin-top: 10px;
  padding: 10px;
  border-radius: 6px;
  background: #f8e8de;
  color: #8d482d
}

.scenario-run-error p {
  margin: 5px 0 0;
  font-size: 10px;
  line-height: 1.45
}

@media(max-width:900px) {
  .scenario-row {
    align-items: flex-start;
    flex-wrap: wrap
  }

  .scenario-row>div {
    width: calc(100% - 35px);
    margin-right: 0
  }

  .sandbox-actions {
    flex-wrap: wrap;
    justify-content: flex-end
  }

  .scenario-run-metadata {
    grid-template-columns: 1fr
  }

}

/* Workflow graph contracts and prompt components. */

.gate-contract {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 10px;
  margin: 10px 0;
  padding: 10px;
  background: #fafaf7;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 9px
}

.gate-contract p {
  margin: 0;
  color: var(--muted)
}

.prompt-component {
  padding: 9px 0;
  border-top: 1px solid var(--line)
}

.prompt-component b,.prompt-component small {
  font-size: 9px
}

.prompt-component p {
  font-size: 9px;
  line-height: 1.4;
  margin: 4px 0;
  color: var(--muted)
}

.prompt-component small {
  color: var(--violet)
}

.contract-editor {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 11px;
  background: #fafaf7;
  border: 1px solid var(--line);
  border-radius: 7px
}

.contract-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.contract-help {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4
}

.output-contract-row {
  display: grid;
  grid-template-columns: 1fr repeat(3,28px);
  gap: 5px;
  margin-bottom: 6px
}

.output-contract-row input {
  margin: 0!important
}

.output-contract-row button {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--muted)
}

.output-contract-row button[data-output-delete] {
  color: #a23f3f
}

.output-contract-row button:disabled {
  opacity: .35
}

.contract-editor label {
  display: block;
  margin: 5px 0!important
}

.contract-editor select {
  margin-bottom: 5px!important
}

/* ==========================================================================
   Execute agent workflow
   ========================================================================== */

.gate-execution-panel {
  margin-top: 15px
}

.gate-run-cards {
  display: grid;
  gap: 16px
}

.gate-run-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #d8d3e6;
  border-radius: 11px;
  background: #faf9fd;
  box-shadow: 0 4px 14px rgba(54,43,91,.1)
}

.gate-run-accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: #6854aa
}

.gate-run-header {
  padding: 12px 16px 13px 20px;
  background: #e9e4f5
}

.gate-run-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px
}

.gate-run-step {
  color: #45357d;
  font: 700 10px Manrope,sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase
}

.gate-run-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700
}

.gate-run-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor
}

.gate-run-chip.waiting {
  color: #5b5e57;
  background: #e5e5df
}

.gate-run-chip.ready {
  color: #694018;
  background: #f5dfc5
}

.gate-run-chip.running {
  color: #45357d;
  background: #ddd5f2
}

.gate-run-chip.complete {
  color: #285e4c;
  background: #dceee6
}

.gate-run-chip.failed {
  color: #853f32;
  background: #f3dcd6
}

.execution-running .gate-run-accent {
  background: #8a72d5
}

.execution-complete .gate-run-accent {
  background: #2f8267
}

.execution-failed .gate-run-accent {
  background: #ad5947
}

.gate-run-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0
}

.gate-run-head>div {
  flex: 1;
  min-width: 0
}

.gate-run-head b,.gate-run-head small {
  display: block;
  overflow-wrap: anywhere
}

.gate-run-head b {
  font: 700 13px/1.35 Manrope,sans-serif
}

.gate-run-head small {
  color: #625976;
  font-size: 9px;
  line-height: 1.4;
  margin-top: 3px
}

.gate-run-head .button {
  flex: 0 0 auto
}

.gate-run-body {
  padding: 4px 16px 16px 20px
}

.gate-input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(210px,1fr));
  gap: 11px;
  margin-top: 11px
}

.gate-input-grid label {
  min-width: 0;
  font-size: 9px;
  color: var(--muted);
  overflow-wrap: anywhere
}

.gate-input-grid textarea {
  display: block;
  width: 100%;
  min-height: 58px;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  resize: vertical;
  font: 10px/1.4 "DM Sans",sans-serif
}

.gate-run-status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
  overflow-wrap: anywhere
}

.gate-output {
  margin-top: 10px
}

.parsed-output {
  font-size: 10px;
  line-height: 1.55;
  overflow-wrap: anywhere
}

.parsed-output h1,.parsed-output h2,.parsed-output h3,.parsed-output h4,.parsed-output h5,.parsed-output h6 {
  font-family: Manrope,sans-serif;
  margin: 12px 0 6px
}

.parsed-output h1 {
  font-size: 18px
}

.parsed-output h2 {
  font-size: 15px
}

.parsed-output h3,.parsed-output h4 {
  font-size: 12px
}

.parsed-output p {
  margin: 6px 0
}

.parsed-output ul,.parsed-output ol {
  padding-left: 20px
}

.parsed-output pre {
  padding: 11px;
  border-radius: 6px;
  background: #292c27;
  color: #e9ebe5;
  white-space: pre-wrap;
  overflow: auto
}

.parsed-output.error {
  padding: 11px;
  border: 1px solid #e4c8b8;
  border-radius: 7px;
  background: #fff3ed;
  color: #8d482d
}

.run-metadata {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 6px;
  margin: 10px 0 0
}

.run-metadata div {
  min-width: 0
}

.run-metadata dt {
  font-size: 7px;
  text-transform: uppercase;
  color: var(--muted)
}

.run-metadata dd {
  margin: 2px 0;
  font-size: 8px;
  overflow-wrap: anywhere
}

.whole-flow-result:not(:empty) {
  margin-top: 13px;
  padding: 13px;
  border-top: 1px solid var(--line)
}

.whole-flow-result details {
  margin-top: 7px;
  padding: 7px;
  background: #f6f5f0;
  border-radius: 5px
}

.flow-processing {
  color: var(--violet);
  font-size: 10px
}

.button:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none
}

@media(max-width:720px) {
  .gate-run-cards {
    gap: 14px
  }

  .gate-run-header {
    padding: 11px 12px 12px 17px
  }

  .gate-run-meta {
    margin-bottom: 9px
  }

  .gate-run-head {
    align-items: stretch;
    flex-direction: column;
    gap: 10px
  }

  .gate-run-head .button {
    align-self: flex-start
  }

  .gate-run-body {
    padding: 3px 12px 14px 17px
  }

  .gate-input-grid {
    grid-template-columns: minmax(0,1fr)
  }

  .run-metadata {
    grid-template-columns: 1fr 1fr
  }

}

/* Execute summaries and raw provider responses. */

.response-summary {
  color: var(--ink)
}

.response-summary>h4 {
  margin: 0 0 10px!important;
  font-size: 13px!important
}

.response-summary-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
  margin: 0
}

.response-summary-grid>div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e8e6de;
  border-radius: 7px;
  background: #fff
}

.response-summary-grid .summary-wide {
  grid-column: 1/-1
}

.response-summary-grid dt {
  color: #777b72;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase
}

.response-summary-grid dd {
  margin: 4px 0 0;
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere
}

.response-summary-grid dd p {
  margin: 0
}

.response-summary-grid dd ul {
  margin: 3px 0;
  padding-left: 18px
}

.summary-object {
  display: grid;
  gap: 5px;
  margin: 0
}

.summary-object>div {
  display: grid;
  grid-template-columns: minmax(90px,.35fr) 1fr;
  gap: 8px
}

.summary-object dt {
  font-size: 9px;
  letter-spacing: 0;
  text-transform: none
}

.summary-object dd {
  margin: 0
}

.summary-empty {
  color: #8e9189;
  font-style: italic
}

.raw-response-toggle {
  margin-top: 10px
}

.response-summary>[data-raw-response] {
  max-height: 360px;
  margin: 8px 0 0;
  padding: 12px;
  border-radius: 7px;
  background: #292c27;
  color: #e9ebe5;
  font: 10px/1.5 monospace;
  white-space: pre-wrap;
  overflow: auto
}

.response-summary>[data-raw-response][hidden] {
  display: none
}

.model-output .response-summary-grid>div {
  background: #333630;
  border-color: #464940;
  color: #e9ebe5
}

.model-output .response-summary-grid dt,.model-output .summary-empty {
  color: #aeb2aa
}

.model-output .response-summary>.run-metadata {
  color: #e9ebe5
}

@media(max-width:720px) {
  .response-summary-grid {
    grid-template-columns: 1fr
  }

  .response-summary-grid .summary-wide {
    grid-column: auto
  }

}

/* Provider-backed work stays visibly alive while preserving the result surface beneath it. */
.operation-progress {
  position: relative;
  overflow: hidden;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid #dcd6ef;
  border-radius: 9px;
  background: linear-gradient(135deg,#faf9ff,#f1eefb);
  color: var(--ink);
  font-size: 10px
}

.progress-heading {
  display: flex;
  align-items: center;
  gap: 8px
}

.progress-heading>b {
  font: 700 10px Manrope,sans-serif
}

.progress-heading>i {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border: 2px solid #c8bfeb;
  border-top-color: var(--violet);
  border-radius: 50%;
  animation: atlas-spin .8s linear infinite
}

.operation-progress ol {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(115px,1fr));
  gap: 7px;
  margin: 11px 0 2px;
  padding: 0;
  list-style: none
}

.operation-progress li {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #96928f;
  font-size: 9px;
  line-height: 1.3
}

.operation-progress li>i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #d7d3df
}

.operation-progress li.active {
  color: var(--violet);
  font-weight: 700
}

.operation-progress li.active>i {
  background: var(--violet);
  box-shadow: 0 0 0 4px rgba(98,82,164,.13);
  animation: atlas-pulse 1.1s ease-in-out infinite
}

.operation-progress li.complete {
  color: var(--green)
}

.operation-progress li.complete>i {
  background: var(--green)
}

.progress-shimmer {
  position: absolute;
  inset: 0 auto 0 -45%;
  width: 35%;
  pointer-events: none;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,.72),transparent);
  transform: skewX(-15deg);
  animation: atlas-shimmer 1.45s ease-in-out infinite
}

.operation-progress.progress-success {
  border-color: #b9ddcf;
  background: var(--green-soft);
  color: var(--green)
}

.operation-progress.progress-error {
  border-color: #e4c8b8;
  background: #fff3ed;
  color: #8d482d
}

.operation-progress.progress-success .progress-heading>i,.operation-progress.progress-error .progress-heading>i {
  border: 0;
  animation: none
}

.operation-progress.progress-success .progress-heading>i {
  background: var(--green)
}

.operation-progress.progress-error .progress-heading>i {
  background: #b65c3d
}

.button.is-processing:disabled {
  opacity: .88
}

.button.is-processing::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -1px;
  animation: atlas-spin .75s linear infinite
}

.output-skeleton {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff
}

.output-skeleton i {
  display: block;
  height: 8px;
  border-radius: 6px;
  background: linear-gradient(90deg,#eeece7 20%,#faf9f6 45%,#eeece7 70%);
  background-size: 220% 100%;
  animation: atlas-skeleton 1.3s ease-in-out infinite
}

.output-skeleton i:nth-child(2) {
  width: 86%
}

.output-skeleton i:nth-child(3) {
  width: 62%
}

.scenario-row>.scenario-status {
  display: block;
  width: auto;
  margin-right: 0
}

.scenario-row>.scenario-status.operation-progress {
  flex: 1 1 100%;
  order: 10;
  margin: 3px 0 0
}

.scenario-row>.scenario-status.operation-progress ol {
  grid-template-columns: repeat(4,minmax(95px,1fr))
}

#agentChatProgress.operation-progress,#agentToolProgress.operation-progress,#reviewProgress.operation-progress,#promptRunProgress.operation-progress {
  margin-top: 12px
}

.whole-flow-result.operation-progress {
  border-top: 1px solid #dcd6ef
}

@keyframes atlas-spin {
  to {
    transform: rotate(360deg)
  }

}

@keyframes atlas-pulse {
  50% {
    opacity: .45;
    transform: scale(.82)
  }

}

@keyframes atlas-shimmer {
  to {
    left: 120%
  }

}

@keyframes atlas-skeleton {
  to {
    background-position: -220% 0
  }

}

/* ==========================================================================
   Accessibility states
   ========================================================================== */

@media(prefers-reduced-motion:reduce) {
  .progress-heading>i,.operation-progress li.active>i,.progress-shimmer,.button.is-processing::before,.output-skeleton i {
    animation-duration: 2.5s
  }

}

@media(max-width:720px) {
  .operation-progress ol,.scenario-row>.scenario-status.operation-progress ol {
    grid-template-columns: 1fr 1fr
  }

}

.run-model-control>div:first-child {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 14px 0 7px
}

.run-model-control>div:first-child b {
  font: 700 11px Manrope,sans-serif
}

.run-model-control>div:first-child small {
  color: var(--muted);
  font-size: 9px
}

.response-editor {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e8e6de
}

.response-editor textarea {
  min-height: 120px;
  font: 10px/1.5 monospace
}

.response-editor [role=status] {
  font-size: 10px;
  color: var(--muted)
}

.gate-input-source {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 18px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px
}

.gate-input-source.auto {
  color: #466d5b
}

.gate-input-source.auto::before {
  content: "↳";
  font-weight: 700
}

.gate-input-source.manual {
  color: var(--violet)
}

.gate-input-source button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer
}

/* Workflow graph nodes use hierarchy, status, tint, and an accent—not a border alone. */
#gateEditor {
  display: grid;
  gap: 12px;
  margin-top: 14px
}

.editor-gate {
  position: relative;
  isolation: isolate;
  display: grid;
  width: 100%;
  margin: 0;
  padding: 0 0 14px 5px;
  overflow: hidden;
  border: 1px solid #d8d3e6;
  border-radius: 10px;
  background: #f7f5fc;
  box-shadow: 0 3px 10px rgba(54,43,91,.09);
  text-align: left
}

.editor-gate:hover {
  transform: translateY(-1px);
  background: #f2effa;
  box-shadow: 0 5px 14px rgba(54,43,91,.14)
}

.editor-gate:focus-visible {
  outline: 3px solid rgba(98,82,164,.3);
  outline-offset: 2px
}

.editor-gate.active {
  border-color: #7563b4;
  background: #eeeafa;
  box-shadow: 0 5px 16px rgba(54,43,91,.17)
}

.editor-gate .node-accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #6854aa
}

.editor-gate.active .node-accent {
  background: #45357d
}

.editor-gate .node-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px 13px;
  background: #e8e3f5
}

.editor-gate.active .node-header {
  background: #ddd5f2
}

.editor-gate .node-step {
  color: #45357d;
  font: 700 10px Manrope,sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase
}

.editor-gate .node-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700
}

.editor-gate .node-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor
}

.editor-gate .node-status.ready {
  color: #694018;
  background: #f5dfc5
}

.editor-gate .node-status.complete {
  color: #285e4c;
  background: #dceee6
}

.editor-gate .node-body {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: start;
  gap: 12px;
  min-width: 0;
  padding: 13px 13px 0
}

.editor-gate .node-copy {
  display: grid;
  min-width: 0;
  gap: 4px
}

.editor-gate .node-copy b {
  color: #292c27;
  font: 700 13px/1.35 Manrope,sans-serif;
  overflow-wrap: anywhere
}

.editor-gate .node-copy small {
  color: #666a62;
  font-size: 9px;
  line-height: 1.45;
  overflow-wrap: anywhere
}

.editor-gate .node-copy .node-handoff {
  color: #51457b;
  font-weight: 600
}

.editor-gate .evidence-tag {
  align-self: start;
  max-width: 150px;
  overflow-wrap: anywhere;
  text-align: center
}

@media(max-width:720px) {
  .editor-gate .node-header {
    padding: 10px 11px
  }

  .editor-gate .node-body {
    grid-template-columns: 1fr;
    padding: 12px 11px 0
  }

  .editor-gate .evidence-tag {
    max-width: 100%;
    justify-self: start
  }

}

/* Project initials stay readable on the shared dark icon surface in every context. */
.project-icon {
  color: var(--white)
}
