:root {
  color-scheme: dark;
  --site-banner-offset: 84px;
  --site-sticky-top: 0px;
  --bg: #020713;
  --bg-2: #06152b;
  --bg-3: #0a2146;
  --panel: rgba(8, 24, 56, 0.78);
  --panel-soft: rgba(7, 20, 47, 0.68);
  --panel-strong: rgba(12, 33, 74, 0.92);
  --line: rgba(94, 156, 255, 0.24);
  --line-strong: rgba(86, 181, 255, 0.58);
  --text: #f7fbff;
  --muted: #aab9d7;
  --faint: #6f82a6;
  --blue: #1d7bff;
  --cyan: #28d9ff;
  --green: #42f2b2;
  --amber: #ffcb66;
  --red: #ff8e9d;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --shadow-blue: rgba(24, 119, 255, 0.42);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --font-display: "Avenir Next", "Trebuchet MS", Verdana, sans-serif;
  --font-body: "Avenir Next", "Segoe UI", Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 84% 8%, rgba(31, 124, 255, 0.24), transparent 24rem),
    radial-gradient(circle at 8% 20%, rgba(48, 80, 255, 0.18), transparent 26rem),
    radial-gradient(circle at 52% 100%, rgba(19, 205, 255, 0.12), transparent 30rem),
    linear-gradient(180deg, var(--bg) 0%, #041021 44%, var(--bg) 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(86, 145, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(86, 145, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 18%, black, transparent 74%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 0%, rgba(26, 118, 255, 0.14), transparent 34rem);
  mix-blend-mode: screen;
}

.site-header.banner-variant-console {
  position: static;
}

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

:dir(rtl) .project-sidebar,
:dir(rtl) .workspace-panel,
:dir(rtl) .activity-panel,
:dir(rtl) .orchestrator-panel,
:dir(rtl) .modal-card,
:dir(rtl) .project-metric-card {
  text-align: right;
}

:dir(rtl) .project-option,
:dir(rtl) .stage-card,
:dir(rtl) .client-card,
:dir(rtl) .workbench-card,
:dir(rtl) .activity-card,
:dir(rtl) .chat-message {
  text-align: right;
}

button {
  cursor: pointer;
}

button[disabled] {
  cursor: not-allowed;
  opacity: 0.62;
}

[hidden] {
  display: none !important;
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  font-family: var(--font-display);
  letter-spacing: -0.045em;
}

h1 {
  font-size: clamp(36px, 5.2vw, 62px);
  line-height: 0.94;
}

h2 {
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: 0.98;
}

p {
  color: var(--muted);
  line-height: 1.5;
}

.page-shell {
  position: relative;
  width: min(1400px, calc(100% - 32px));
  margin-inline: auto;
  padding: 14px 0 28px;
}

.page-shell::before {
  content: "";
  position: absolute;
  top: 48px;
  right: 10%;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(36, 128, 255, 0.2), transparent 66%);
  filter: blur(8px);
  pointer-events: none;
}

.card-surface,
.card-surface-soft {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, rgba(12, 34, 78, 0.72), rgba(5, 15, 38, 0.8)),
    rgba(7, 22, 53, 0.72);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
}

.card-surface-soft {
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(9, 28, 66, 0.72), rgba(4, 14, 35, 0.72)),
    rgba(7, 20, 47, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.app-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.project-sidebar {
  position: sticky;
  top: var(--site-sticky-top);
  display: grid;
  gap: 12px;
  max-height: calc(100vh - var(--site-sticky-top) - 20px);
  overflow-y: auto;
  padding: 16px;
  overscroll-behavior: contain;
}

.sidebar-head {
  display: grid;
  gap: 8px;
}

.sidebar-meta {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(94, 156, 255, 0.18);
  border-radius: 18px;
  background: rgba(7, 22, 53, 0.42);
}

.sidebar-head p,
.sidebar-meta p,
.section-head-note,
.meta-line,
.pipeline-group-head span,
.pipeline-group-head p,
.client-domain,
.client-meta,
.client-metric,
.panel-description,
.activity-time,
.activity-detail,
.artifacts-head span {
  color: var(--muted);
}

.eyebrow,
.hero-kpi-label,
.stat-label,
.field label,
.field span:first-child {
  display: inline-flex;
  width: fit-content;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  border: 1px solid rgba(49, 134, 255, 0.44);
  border-radius: 999px;
  background: rgba(21, 70, 170, 0.2);
  padding: 8px 12px;
}

.project-list {
  display: grid;
  gap: 10px;
}

.project-option {
  position: relative;
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 14px;
  text-align: left;
  border: 1px solid rgba(88, 148, 255, 0.24);
  border-radius: 22px;
  background: rgba(7, 22, 53, 0.58);
  color: var(--text);
  overflow: hidden;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
}

.project-option::after {
  content: "";
  position: absolute;
  inset: auto -20% -50% 35%;
  height: 130px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(40, 217, 255, 0.18), transparent 68%);
  pointer-events: none;
}

.project-option:hover,
.project-option.is-active {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: linear-gradient(145deg, rgba(12, 36, 84, 0.86), rgba(8, 22, 53, 0.8));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28), 0 0 26px rgba(40, 217, 255, 0.12);
}

.project-option.is-active {
  box-shadow: 0 0 0 1px rgba(86, 181, 255, 0.34), 0 20px 44px rgba(0, 0, 0, 0.32), 0 0 30px rgba(29, 123, 255, 0.18);
}

.project-option-kicker,
.stage-index {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-option strong {
  font-size: 16px;
  line-height: 1.2;
}

.project-option-segment {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.project-option-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-option-meta span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid rgba(88, 148, 255, 0.24);
  background: rgba(14, 63, 149, 0.32);
  color: #dce9ff;
  font-size: 11px;
  font-weight: 850;
}

.sidebar-status {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 14px;
  overflow: hidden;
}

.sidebar-status::after {
  content: "";
  position: absolute;
  inset: auto -30px -45px auto;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(40, 217, 255, 0.18), transparent 68%);
  pointer-events: none;
}

.sidebar-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-status strong {
  position: relative;
  z-index: 1;
  font-size: 17px;
  line-height: 1.25;
}

.sidebar-meta strong {
  font-size: 17px;
  line-height: 1.25;
}

.sidebar-actions {
  display: grid;
  gap: 10px;
}

.project-sidebar .control,
.project-sidebar .button {
  width: 100%;
  min-width: 0;
}

.main-content {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.signed-out-state h1 {
  font-size: clamp(28px, 3.2vw, 46px);
  line-height: 1;
}

.signed-out-state p {
  margin-top: 6px;
  color: var(--muted);
}

.signed-out-state {
  display: grid;
  gap: 16px;
  max-width: 680px;
  padding: 34px;
}

#workspaceContent {
  display: grid;
  gap: 14px;
}

.pipeline-section-head {
  margin-bottom: 14px;
}

.section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head > div {
  min-width: 0;
}

.section-head-note {
  max-width: 320px;
  font-size: 12px;
  line-height: 1.4;
}

.field {
  display: grid;
  gap: 8px;
}

.control {
  min-height: 46px;
  min-width: 220px;
  border: 1px solid rgba(106, 164, 255, 0.26);
  border-radius: 14px;
  background: rgba(3, 12, 31, 0.66);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}

.control::placeholder {
  color: var(--faint);
}

.control:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(40, 217, 255, 0.12);
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(5, 14, 34, 0.52);
  color: var(--text);
  padding: 12px 16px;
  font-weight: 900;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
}

.button:hover,
.icon-button:hover,
.stage-card:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, #1d7bff 0%, #3a6dff 48%, #794cff 100%);
  box-shadow: 0 16px 36px rgba(33, 117, 255, 0.34);
}

.button-primary:hover {
  box-shadow: 0 18px 46px rgba(33, 117, 255, 0.52);
}

.button-secondary {
  border-color: rgba(182, 209, 255, 0.34);
  background: rgba(5, 14, 34, 0.56);
}

.button-secondary:hover,
.icon-button:hover {
  border-color: var(--line-strong);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.icon-button {
  width: 46px;
  padding: 0;
  font-size: 26px;
}

.pipeline-section,
.activity-panel,
.orchestrator-panel {
  padding: 16px;
}

.workspace-tabs {
  position: sticky;
  top: var(--site-sticky-top);
  z-index: 34;
  display: flex;
  gap: 8px;
  padding: 8px;
  backdrop-filter: blur(18px);
}

.workspace-tab {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 10px 16px;
  font-weight: 950;
}

.workspace-tab.is-active {
  border-color: rgba(40, 217, 255, 0.34);
  background: linear-gradient(135deg, rgba(22, 85, 196, 0.78), rgba(8, 24, 56, 0.82));
  color: var(--text);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.workspace-tab-panel {
  display: grid;
  gap: 14px;
}

.orchestrator-panel {
  min-height: 660px;
}

.orchestrator-head {
  margin-bottom: 8px;
}

.orchestrator-intro {
  margin-bottom: 14px;
}

.orchestrator-messages {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 360px;
  max-height: 58vh;
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(94, 156, 255, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(3, 12, 31, 0.42);
}

.chat-message {
  display: grid;
  gap: 7px;
  max-width: min(820px, 92%);
  border: 1px solid rgba(94, 156, 255, 0.18);
  border-radius: 20px;
  padding: 13px 15px;
  background: rgba(7, 22, 53, 0.62);
}

.chat-message.user {
  justify-self: end;
  background: rgba(29, 123, 255, 0.2);
}

.chat-message.failed {
  border-color: rgba(255, 142, 157, 0.45);
}

.chat-message-meta {
  color: var(--faint);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-message-body {
  white-space: pre-wrap;
  line-height: 1.55;
}

.chat-message-error,
.chat-error-banner {
  color: var(--red);
  font-weight: 850;
}

.chat-error-banner {
  border: 1px solid rgba(255, 142, 157, 0.35);
  border-radius: 16px;
  padding: 11px 13px;
  background: rgba(255, 142, 157, 0.1);
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.orchestrator-composer {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.orchestrator-input {
  min-height: 128px;
  resize: vertical;
}

.orchestrator-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.pipeline-scene {
  position: relative;
  display: grid;
  gap: 14px;
  overflow: hidden;
  padding-bottom: 24px;
}

.pipeline-scene::after {
  content: "";
  position: absolute;
  inset: auto 10% -90px;
  height: 160px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(29, 123, 255, 0.12), transparent 70%);
  pointer-events: none;
}

.pipeline-scene-stack {
  grid-template-columns: 1fr;
}

.pipeline-scene-stack .pipeline-group {
  min-width: 0;
}

.pipeline-scene-stack .pipeline-bridge {
  min-width: 0;
  grid-auto-flow: column;
  align-content: center;
  justify-content: center;
  padding: 2px 0;
}

.pipeline-scene-stack .bridge-label {
  writing-mode: initial;
}

.pipeline-scene-stack .bridge-arrow {
  transform: rotate(90deg);
}

.pipeline-group {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(11, 29, 64, 0.82), rgba(5, 16, 40, 0.72));
  border: 1px solid rgba(94, 156, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.pipeline-group-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 4px 0;
}

.pipeline-group-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
  max-width: 420px;
}

.pipeline-group-actions p {
  text-align: right;
}

.group-toggle {
  min-height: 38px;
  padding: 8px 14px;
}

.pipeline-group.is-collapsed {
  gap: 0;
}

.pipeline-group.is-collapsed .pipeline-group-head {
  margin-bottom: 0;
}

.pipeline-group-head div {
  display: grid;
  gap: 4px;
}

.pipeline-group-head strong {
  font-size: 19px;
}

.pipeline-group-head span,
.pipeline-group-head p {
  font-size: 13px;
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
}

.stage-grid-delivery {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stage-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 164px;
  padding: 14px;
  text-align: left;
  border: 1px solid rgba(94, 156, 255, 0.24);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(11, 34, 78, 0.88), rgba(7, 21, 49, 0.74));
  color: var(--text);
  overflow: hidden;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
}

.stage-card::before {
  content: "";
  position: absolute;
  top: -24px;
  right: -10px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(40, 217, 255, 0.12), transparent 66%);
  pointer-events: none;
}

.stage-card::after {
  content: "";
  position: absolute;
  top: 34px;
  right: -13px;
  width: 24px;
  height: 2px;
  background: rgba(86, 181, 255, 0.52);
}

.stage-card:last-child::after {
  display: none;
}

.stage-card:hover,
.stage-card.is-active {
  border-color: var(--line-strong);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.26), 0 0 26px rgba(29, 123, 255, 0.12);
}

.stage-card.is-active {
  background:
    radial-gradient(circle at top right, rgba(40, 217, 255, 0.14), transparent 40%),
    linear-gradient(145deg, rgba(13, 38, 88, 0.92), rgba(8, 23, 54, 0.84));
  box-shadow: 0 0 0 1px rgba(86, 181, 255, 0.28), 0 24px 50px rgba(0, 0, 0, 0.32), 0 0 32px rgba(29, 123, 255, 0.14);
}

.stage-card-top,
.client-head,
.activity-top,
.artifacts-head,
.workbench-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.stage-card-top > div {
  display: grid;
  gap: 6px;
}

.stage-label {
  font-size: 18px;
  line-height: 1.15;
}

.stage-description {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.48;
}

.stage-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(94, 156, 255, 0.18);
}

.stage-metric-label,
.stage-card-bottom {
  color: var(--muted);
  font-size: 12px;
}

.stage-metric-value {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.stage-card-bottom {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.pipeline-bridge {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  min-width: 92px;
  color: var(--cyan);
}

.bridge-label {
  writing-mode: vertical-rl;
  color: var(--faint);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bridge-arrow {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #1d7bff 0%, #28d9ff 100%);
  box-shadow: 0 0 30px rgba(40, 217, 255, 0.26);
  font-size: 26px;
}

.loop-connector {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.loop-connector path {
  fill: none;
  stroke: rgba(40, 217, 255, 0.62);
  stroke-width: 3;
  stroke-dasharray: 10 8;
  marker-end: url(#loopArrowHead);
}

.loop-connector marker path {
  fill: var(--cyan);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(0, 1.08fr);
  gap: 14px;
  align-items: start;
}

.stage-quick-nav {
  position: sticky;
  top: calc(var(--site-sticky-top) + 70px);
  z-index: 32;
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  padding: 12px 14px;
  margin-top: 0;
  backdrop-filter: blur(18px);
}

.stage-quick-nav-label {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stage-quick-nav-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-stage-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid rgba(88, 148, 255, 0.26);
  border-radius: 999px;
  background: rgba(7, 22, 53, 0.58);
  color: #dce9ff;
  padding: 8px 12px;
  font-weight: 850;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.quick-stage-btn:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.quick-stage-btn.is-active {
  border-color: rgba(40, 217, 255, 0.42);
  background: linear-gradient(135deg, rgba(22, 85, 196, 0.8), rgba(16, 45, 111, 0.84));
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(40, 217, 255, 0.22), 0 16px 34px rgba(0, 0, 0, 0.24);
}

.quick-stage-index {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(40, 217, 255, 0.16);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 950;
}

.workspace-panel {
  padding: 16px;
  min-width: 0;
}

.project-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.project-metric-card {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.project-metric-label {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-metric-value {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.project-metric-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.detail-chip {
  display: grid;
  gap: 5px;
  padding: 13px;
  border-radius: 18px;
  background: rgba(8, 25, 61, 0.74);
  border: 1px solid rgba(96, 156, 255, 0.18);
}

.detail-chip span {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-chip strong {
  font-size: 15px;
}

.client-list,
.workbench-panels,
.activity-list {
  display: grid;
  gap: 10px;
}

.client-card,
.activity-card {
  border: 1px solid rgba(94, 156, 255, 0.2);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(10, 29, 69, 0.72), rgba(6, 19, 45, 0.7));
  padding: 14px;
}

.client-head strong {
  display: block;
  font-size: 16px;
}

.client-domain,
.client-meta,
.client-metric {
  font-size: 13px;
  line-height: 1.48;
}

.client-meta {
  margin-top: 8px;
}

.client-metric {
  margin-top: 10px;
}

.chip-row,
.artifact-list,
.panel-metrics,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-row {
  margin-top: 10px;
}

.chip,
.artifact-chip,
.action-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 850;
}

.chip {
  border: 1px solid rgba(88, 148, 255, 0.28);
  background: rgba(14, 63, 149, 0.32);
  color: #dce9ff;
}

.action-chip {
  border: 1px solid rgba(61, 212, 255, 0.26);
  background: rgba(8, 31, 79, 0.66);
  color: var(--cyan);
}

.artifact-chip {
  font-family: "SFMono-Regular", Consolas, monospace;
  border: 1px solid rgba(126, 174, 255, 0.22);
  background: rgba(3, 10, 26, 0.82);
  color: #eff6ff;
}

.workbench-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 14px;
  overflow: hidden;
}

.workbench-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -54px 40%;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(29, 123, 255, 0.14), transparent 68%);
  pointer-events: none;
}

.panel-description {
  margin-top: 5px;
  line-height: 1.48;
}

.panel-metric {
  display: grid;
  gap: 4px;
  min-width: 132px;
  padding: 11px 12px;
  border-radius: 16px;
  background: rgba(4, 15, 38, 0.56);
  border: 1px solid rgba(96, 156, 255, 0.18);
}

.panel-metric span {
  color: var(--faint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 850;
}

.panel-metric strong {
  font-size: 15px;
}

.panel-metric.good strong {
  color: var(--green);
}

.panel-metric.warn strong {
  color: var(--amber);
}

.panel-metric.bad strong {
  color: var(--red);
}

.panel-bullets {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: #dce6ff;
  line-height: 1.5;
}

.artifacts {
  margin-top: 12px;
  padding: 14px;
}

.artifacts-head {
  margin-bottom: 12px;
}

.activity-card {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 14px;
}

.activity-badge {
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(29, 123, 255, 0.16), 0 0 18px rgba(29, 123, 255, 0.38);
}

.activity-card.good .activity-badge {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(66, 242, 178, 0.14), 0 0 18px rgba(66, 242, 178, 0.26);
}

.activity-card.warn .activity-badge {
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(255, 203, 102, 0.14), 0 0 18px rgba(255, 203, 102, 0.24);
}

.activity-card.bad .activity-badge {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(255, 142, 157, 0.14), 0 0 18px rgba(255, 142, 157, 0.24);
}

.activity-title {
  font-size: 15px;
}

.activity-time,
.activity-detail {
  font-size: 13px;
}

.activity-detail {
  margin-top: 5px;
  line-height: 1.48;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 11px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.pill-neutral,
.pill.waiting {
  color: #d3ddef;
  background: rgba(120, 139, 172, 0.18);
  border-color: rgba(120, 139, 172, 0.22);
}

.pill.complete,
.pill.good,
.pill.approved,
.pill.sent,
.pill.queued {
  color: var(--green);
  background: rgba(66, 242, 178, 0.12);
  border-color: rgba(66, 242, 178, 0.22);
}

.pill.active,
.pill.watch,
.pill.info {
  color: var(--cyan);
  background: rgba(40, 217, 255, 0.12);
  border-color: rgba(40, 217, 255, 0.22);
}

.pill.warn,
.pill.review,
.pill.hold,
.pill.manual,
.pill.needs {
  color: var(--amber);
  background: rgba(255, 203, 102, 0.12);
  border-color: rgba(255, 203, 102, 0.22);
}

.pill.bad,
.pill.rejected,
.pill.blocked,
.pill.suppressed {
  color: var(--red);
  background: rgba(255, 142, 157, 0.12);
  border-color: rgba(255, 142, 157, 0.22);
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 30;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 5, 16, 0.72);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  padding: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid .field {
  display: grid;
}

.form-grid .control {
  min-width: 0;
  width: 100%;
}

.form-actions,
.import-preview {
  grid-column: 1 / -1;
}

.import-preview {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.import-preview p {
  line-height: 1.48;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.loading,
.empty-state {
  padding: 18px;
  border: 1px dashed rgba(96, 156, 255, 0.28);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(7, 22, 53, 0.38);
}

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

  .project-sidebar {
    position: static;
  }

  .stage-grid,
  .stage-grid-delivery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .loop-connector {
    display: none;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 18px, 1480px);
    padding: 10px 0 28px;
  }

  .page-shell::before {
    right: 0;
    width: 180px;
    height: 180px;
  }

  .project-sidebar,
  .pipeline-section,
  .workspace-panel,
  .activity-panel,
  .modal-card {
    padding: 16px;
    border-radius: 24px;
  }

  h2 {
    font-size: clamp(28px, 9vw, 36px);
  }

  .section-head,
  .pipeline-group-head,
  .sidebar-status-head {
    align-items: stretch;
    flex-direction: column;
  }

  .pipeline-group-actions {
    justify-items: stretch;
    max-width: none;
  }

  .pipeline-group-actions p {
    text-align: left;
  }

  .stage-quick-nav {
    top: calc(var(--site-sticky-top) + 70px);
    padding: 12px 14px;
  }

  .workspace-tabs {
    overflow-x: auto;
  }

  .chat-message {
    max-width: 100%;
  }

  .section-actions,
  .orchestrator-actions,
  .form-actions {
    width: 100%;
  }

  .orchestrator-actions {
    flex-direction: column-reverse;
  }

  .button,
  .control {
    width: 100%;
    min-width: 0;
  }

  .stage-grid,
  .stage-grid-delivery,
  .detail-summary,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .stage-card::after {
    display: none;
  }
}
