:root {
  --bg-top: #04150f;
  --bg-bottom: #082117;
  --surface: #0d2a1f;
  --surface-2: #0f3325;
  --text: #ecfff6;
  --muted: #9ac9b6;
  --line: #1f5f49;
  --accent: #2fcf8e;
  --accent-soft: #a1f0cd;
  --field-bg: #061a12;
  --output-bg: #04120d;
  --brand-sign-bg: rgba(6, 31, 23, 0.82);
  --brand-sign-border: rgba(88, 173, 137, 0.56);
  --brand-sign-title: var(--text);
  --brand-sign-meta: var(--accent-soft);
  --brand-sign-separator: var(--accent);
  --panel-visualize-target-height: auto;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 720px at -10% -20%, rgba(40, 147, 106, 0.34) 0, transparent 62%),
    radial-gradient(980px 660px at 110% -10%, rgba(71, 208, 160, 0.2) 0, transparent 58%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  position: relative;
}

body.sssom-overlay-active {
  overflow: hidden;
}

body.no-select,
body.no-select * {
  user-select: none;
}

body::before {
  content: "";
  position: fixed;
  right: -120px;
  bottom: -120px;
  width: 520px;
  height: 520px;
  pointer-events: none;
  opacity: 0.06;
  background: url("./assets/brand/Knowledge3_Logo_FullColor_small.png") no-repeat center / contain;
  z-index: 0;
}

.brand-header {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 57, 42, 0.88), rgba(7, 30, 22, 0.94));
  box-shadow: 0 10px 28px rgba(1, 10, 7, 0.34);
}

.brand-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
}

.brand-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.brand-wordmark {
  display: block;
  height: 30px;
  width: auto;
  max-width: min(60vw, 820px);
  object-fit: contain;
}

.brand-identity-wrap {
  margin-left: auto;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  flex: 0 0 auto;
}

.brand-headings {
  margin-left: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 4px;
}

.brand-top .theme-switch {
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
  align-self: flex-start;
}

.brand-top .theme-switch-label {
  font-size: 11px;
  letter-spacing: 0.05em;
}

.brand-top .theme-select {
  min-width: 148px;
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.brand-sign {
  border: 1px solid var(--brand-sign-border);
  background: var(--brand-sign-bg);
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: 0 4px 14px rgba(1, 10, 7, 0.24);
}

.graph-title {
  margin: 0;
  font-size: 15px !important;
  letter-spacing: 0.02em;
  text-align: right;
  line-height: 1.2;
  color: var(--brand-sign-title);
}

.brand-meta-line {
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 5px;
  font-size: 11px;
  line-height: 1.2;
  color: var(--brand-sign-meta);
}

.brand-meta-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.92;
}

.brand-meta-separator {
  color: var(--brand-sign-separator);
  opacity: 0.9;
}

header .sub {
  margin-top: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  text-align: left;
  max-width: min(72vw, 900px);
}

header code {
  color: #d4ffee;
  background: rgba(6, 28, 20, 0.8);
  border: 1px solid #28694f;
  border-radius: 6px;
  padding: 2px 5px;
}

.runtime-backend-notice {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(113, 197, 160, 0.5);
  background: rgba(7, 28, 20, 0.78);
  color: #d8fff0;
  font-size: 12px;
  line-height: 1.45;
}

main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(380px, 460px) minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  align-items: stretch;
}

.panel {
  background: linear-gradient(180deg, rgba(12, 42, 31, 0.92), rgba(9, 34, 25, 0.94));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(1, 10, 7, 0.34);
  position: relative;
  overflow: hidden;
}

.panel-run,
.panel-visualize {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.panel-run {
  overflow-y: scroll;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(133, 163, 209, 0.72) rgba(12, 21, 36, 0.68);
}

@media (min-width: 981px) {
  .panel-run,
  .panel-visualize {
    height: var(--panel-visualize-target-height, auto);
    max-height: var(--panel-visualize-target-height, none);
  }
}

.panel::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -30px;
  width: 106px;
  height: 106px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 45% 35%, rgba(47, 207, 142, 0.28), rgba(47, 207, 142, 0.02) 72%);
}

.panel::before {
  content: "";
  position: absolute;
  left: -18px;
  bottom: -22px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 60% 40%, rgba(161, 240, 205, 0.16), rgba(161, 240, 205, 0.01) 72%);
}

.panel h2 {
  margin: 0 0 10px 0;
  font-size: 16px;
}

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

.panel-visualize-head h2 {
  margin: 0;
}

.panel-visualize-links {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.panel-visualize-links select {
  min-width: 320px;
  max-width: min(52vw, 520px);
}

.panel-visualize-links button {
  white-space: nowrap;
}

.row {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.label-with-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hover-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(111, 201, 161, 0.78);
  color: #c4f6df;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
  cursor: help;
}

.hover-info-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  min-width: 240px;
  max-width: 320px;
  padding: 8px 10px;
  border: 1px solid rgba(103, 191, 152, 0.6);
  border-radius: 8px;
  background: rgba(6, 26, 19, 0.97);
  color: #d6ffee;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 10px 20px rgba(1, 10, 7, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 6;
}

.hover-info:hover .hover-info-tip,
.hover-info:focus .hover-info-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.text-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.text-action-btn {
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1;
}

.small-note {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.pipeline-organizer-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.pipeline-organizer-status-row .small-note {
  margin-bottom: 0;
}

.pipeline-auth-action {
  min-width: 124px;
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

.data-keys-summary-line {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}

.data-keys-summary-runid {
  color: var(--accent-soft);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.data-keys-summary-separator {
  color: var(--accent);
}

.panel-wide {
  grid-column: 1 / -1;
}

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

.actions-row-data-keys {
  margin-top: 4px;
}

.actions-row button {
  min-width: 130px;
}

.visualize-actions-row {
  display: grid;
  grid-template-columns: auto auto minmax(220px, 1fr);
  align-items: center;
  gap: 8px;
}

.visualize-actions-row .cq-visualize-inline {
  width: auto;
  min-width: 0;
}

.visualize-actions-row .visualize-cq-select {
  width: clamp(220px, 36vw, 620px);
  min-width: 200px;
  max-width: 620px;
  flex: 0 1 460px;
}

.visualize-cq-select {
  min-width: 200px;
  max-width: 620px;
  flex: 0 1 460px;
}

.cq-visualize-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.cq-inline-label {
  margin: 0;
  color: var(--accent-soft);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: none;
  white-space: nowrap;
}

.cq-inline-manage-btn {
  min-width: 92px;
  padding: 6px 10px;
}

.cq-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.required-star {
  color: #ff6b6b;
  font-weight: 700;
}

.cq-auto-id-input {
  background: rgba(148, 168, 160, 0.18) !important;
  border-color: rgba(168, 189, 180, 0.38) !important;
  color: rgba(231, 244, 238, 0.82) !important;
  cursor: not-allowed;
}

.pipeline-interrupt-panel {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(226, 182, 102, 0.62);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(45, 31, 10, 0.86), rgba(26, 19, 7, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255, 222, 164, 0.08);
}

.pipeline-interrupt-title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffe3b2;
}

.pipeline-interrupt-message {
  font-size: 13px;
  color: #ffeccc;
  line-height: 1.4;
  margin-bottom: 6px;
}

.pipeline-interrupt-hint {
  font-size: 12px;
  color: #ffd99f;
  line-height: 1.35;
  margin-bottom: 8px;
}

.pipeline-interrupt-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11px;
  color: #ffc984;
}

.pipeline-interrupt-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 210, 136, 0.35);
  background: rgba(30, 21, 8, 0.72);
}

.pipeline-interrupt-ui-url {
  margin-top: 6px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 11px;
  color: #f6d8a8;
  word-break: break-all;
}

.pipeline-interrupt-confirm {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 210, 136, 0.32);
  background: rgba(35, 24, 9, 0.7);
  font-size: 12px;
  line-height: 1.38;
  color: #ffe4b8;
}

.pipeline-interrupt-confirm input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  flex: 0 0 auto;
  accent-color: #f3bf62;
}

.pipeline-interrupt-panel .actions-row {
  margin-top: 8px;
}

.pipeline-interrupt-panel .row {
  min-width: 0;
}

#pipelineInterruptUriSelect {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-right: 36px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(180deg, rgba(8, 32, 23, 0.35), rgba(5, 18, 13, 0.15)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffd9a3' d='M1.4 1.4a1 1 0 0 1 1.4 0L6 4.6l3.2-3.2a1 1 0 1 1 1.4 1.4L6.7 6.7a1 1 0 0 1-1.4 0L1.4 2.8a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, calc(100% - 12px) center;
  background-size: auto, 12px 8px;
}

#pipelineInterruptUriSelect:disabled {
  cursor: not-allowed;
}

.sssom-floating-overlay {
  position: fixed;
  inset: 0;
  z-index: 3200;
  padding: 16px;
  background:
    radial-gradient(circle at 16% 14%, rgba(84, 212, 163, 0.2), transparent 44%),
    rgba(3, 11, 8, 0.84);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
}

.sssom-floating-overlay[hidden] {
  display: none !important;
}

.sssom-floating-window {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(1280px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  height: min(90vh, 900px);
  min-width: 640px;
  min-height: 420px;
  border-radius: 14px;
  border: 1px solid rgba(84, 191, 150, 0.58);
  background: linear-gradient(180deg, rgba(7, 30, 22, 0.98), rgba(4, 19, 14, 0.985));
  box-shadow: 0 20px 48px rgba(1, 8, 6, 0.58);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.sssom-floating-window.sssom-dragging {
  opacity: 0.96;
}

.sssom-floating-window.sssom-resizing {
  opacity: 0.98;
}

.sssom-floating-window.sssom-minimized {
  width: min(760px, calc(100vw - 32px));
  min-height: 0;
  height: auto;
}

.sssom-floating-window.sssom-minimized .sssom-floating-body {
  display: none;
}

.sssom-floating-window.sssom-minimized .sssom-floating-resize-handle {
  display: none;
}

.sssom-floating-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(78, 168, 132, 0.38);
  background: rgba(6, 24, 18, 0.9);
  cursor: move;
}

.sssom-floating-heading {
  min-width: 0;
}

.sssom-floating-kicker {
  margin: 0 0 4px;
  color: #9ce9c7;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sssom-floating-heading h3 {
  margin: 0;
  font-size: 17px;
  color: #e7fff5;
}

.sssom-floating-meta {
  margin: 4px 0 0;
  color: #afdcc8;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.sssom-floating-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sssom-floating-actions button {
  min-width: 96px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 9px;
}

.sssom-floating-body {
  display: flex;
  min-height: 0;
  min-width: 0;
  border-top: 1px solid rgba(72, 156, 122, 0.24);
  background: rgba(3, 14, 10, 0.96);
  overflow: hidden;
}

#sssomFloatingFrame {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  background: rgba(3, 14, 10, 1);
}

.sssom-floating-resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 22px;
  height: 22px;
  cursor: se-resize;
  z-index: 8;
  border-bottom-right-radius: 14px;
  background:
    linear-gradient(135deg, transparent 0 45%, rgba(143, 228, 190, 0.82) 46% 52%, transparent 53% 100%),
    linear-gradient(135deg, transparent 0 58%, rgba(143, 228, 190, 0.62) 59% 65%, transparent 66% 100%),
    linear-gradient(135deg, transparent 0 72%, rgba(143, 228, 190, 0.42) 73% 79%, transparent 80% 100%);
}

.pipeline-service-status-panel {
  margin-top: 8px;
  border-top: 1px solid rgba(78, 157, 122, 0.34);
  padding-top: 8px;
}

.pipeline-service-status-title {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pipeline-service-status-rows {
  display: grid;
  gap: 6px;
  max-height: clamp(180px, 34vh, 360px);
  overflow-y: scroll;
  overflow-x: hidden;
  padding-right: 2px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(133, 163, 209, 0.72) rgba(12, 21, 36, 0.68);
}

.pipeline-service-status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 6px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid rgba(138, 164, 177, 0.36);
  border-radius: 9px;
  background: rgba(9, 17, 24, 0.72);
}

.pipeline-service-status-row.is-green {
  border-color: rgba(74, 148, 114, 0.42);
  background: rgba(5, 20, 15, 0.62);
}

.pipeline-service-status-row.is-red {
  border-color: rgba(194, 88, 88, 0.54);
  background: rgba(27, 13, 13, 0.72);
}

.pipeline-service-status-left {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.pipeline-service-status-light {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(150, 224, 192, 0.62);
  background: rgba(132, 151, 142, 0.76);
  box-shadow: 0 0 0 1px rgba(7, 22, 16, 0.84);
}

.pipeline-service-status-light.is-green {
  border-color: rgba(97, 221, 164, 0.92);
  background: rgba(80, 220, 158, 0.95);
}

.pipeline-service-status-light.is-red {
  border-color: rgba(255, 145, 145, 0.92);
  background: rgba(239, 78, 78, 0.95);
}

.pipeline-service-status-light.is-neutral {
  border-color: rgba(168, 185, 177, 0.74);
  background: rgba(120, 137, 130, 0.9);
}

.pipeline-service-status-name {
  min-width: 0;
  font-size: 12px;
  color: var(--accent-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pipeline-service-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(133, 152, 165, 0.42);
  background: rgba(11, 20, 29, 0.82);
  color: #cfdae1;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.pipeline-service-status-chip.is-green {
  border-color: rgba(78, 169, 132, 0.46);
  background: rgba(7, 28, 20, 0.78);
  color: #c9efe0;
}

.pipeline-service-status-chip.is-red {
  border-color: rgba(215, 109, 109, 0.56);
  background: rgba(37, 14, 14, 0.8);
  color: #ffd0d0;
}

.pipeline-service-status-chip.is-amber {
  border-color: rgba(205, 164, 90, 0.52);
  background: rgba(36, 27, 10, 0.78);
  color: #f4dfb7;
}

.pipeline-service-status-details {
  min-height: 22px;
  border: 0;
  background: transparent;
  color: #9bd7be;
  font-size: 12px;
  text-decoration: underline;
  padding: 0 2px;
  min-width: 0;
}

.pipeline-service-status-details:hover {
  color: #ffffff;
}

.pipeline-service-status-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  padding: 4px 0;
}

.cq-dialog {
  width: min(980px, 95vw);
  max-height: 88vh;
  border: 1px solid rgba(74, 148, 114, 0.62);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(9, 34, 25, 0.98), rgba(5, 20, 15, 0.99));
  color: var(--text);
  padding: 12px;
  box-shadow: 0 18px 38px rgba(1, 10, 7, 0.52);
}

.cq-dialog::backdrop {
  background: rgba(2, 9, 7, 0.66);
}

.cq-dialog-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.cq-dialog-header h3 {
  margin: 0;
  font-size: 15px;
  color: var(--accent-soft);
  flex: 1 1 auto;
}

.cq-dialog-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cq-dialog-wordmark {
  display: block;
  height: 16px;
  width: auto;
}

.cq-dialog-badge {
  border: 1px solid rgba(173, 242, 214, 0.62);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #dbfff0;
  background: rgba(32, 95, 71, 0.58);
}

.cq-close-btn {
  appearance: none;
  border: 1px solid rgba(142, 220, 186, 0.78);
  background: linear-gradient(180deg, rgba(34, 112, 82, 0.92), rgba(24, 78, 58, 0.96));
  color: #ecfff6;
  border-radius: 10px;
  min-height: 36px;
  min-width: 110px;
  padding: 7px 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 14px rgba(2, 16, 11, 0.42);
}

.cq-close-btn:hover {
  border-color: rgba(180, 247, 219, 0.95);
  background: linear-gradient(180deg, rgba(44, 139, 102, 0.98), rgba(28, 96, 69, 0.98));
}

.cq-close-btn:focus-visible {
  outline: 2px solid rgba(182, 251, 224, 0.92);
  outline-offset: 1px;
}

.cq-close-btn:active {
  transform: translateY(1px);
}

.cq-dialog-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

.cq-tab-btn {
  appearance: none;
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: rgba(7, 28, 20, 0.86);
  color: var(--accent-soft);
  padding: 6px 12px;
  font-size: 12px;
  margin: 0 0 -1px 0;
  position: relative;
  top: 1px;
  min-width: 72px;
  text-transform: lowercase;
}

.cq-tab-btn:hover {
  border-color: rgba(136, 231, 190, 0.72);
  background: rgba(47, 207, 142, 0.2);
}

.cq-tab-btn.is-active {
  border-color: rgba(164, 245, 210, 0.82);
  background: rgba(77, 187, 145, 0.44);
  color: #ffffff;
}

.cq-dialog-body {
  display: grid;
  gap: 10px;
  max-height: calc(88vh - 140px);
  overflow: auto;
  padding-right: 2px;
}

.cq-tab-panel[hidden] {
  display: none !important;
}

.cq-sparql-input {
  min-height: 230px;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  line-height: 1.35;
}

.cq-delete-preview {
  margin: 0 0 8px;
  border: 1px solid rgba(72, 150, 114, 0.38);
  border-radius: 8px;
  background: rgba(4, 13, 10, 0.84);
  color: #d4f7e9;
  padding: 10px;
  min-height: 56px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.35;
}

.auth-token-dialog {
  width: min(560px, 94vw);
  border: 1px solid rgba(74, 148, 114, 0.62);
  border-radius: 16px;
  padding: 0;
  background: linear-gradient(180deg, rgba(9, 34, 25, 0.98), rgba(5, 20, 15, 0.99));
  color: var(--text);
  box-shadow: 0 22px 48px rgba(1, 10, 7, 0.56);
}

.auth-token-dialog::backdrop {
  background:
    radial-gradient(circle at top, rgba(47, 207, 142, 0.14), transparent 44%),
    rgba(2, 9, 7, 0.74);
}

.auth-token-card {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 18px;
}

.auth-token-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-token-wordmark {
  display: block;
  height: 30px;
  width: auto;
  max-width: min(62vw, 280px);
  object-fit: contain;
}

.auth-token-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(108, 201, 158, 0.42);
  background: rgba(7, 28, 20, 0.82);
  color: var(--accent-soft);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-token-card h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.auth-token-detail {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.auth-token-label {
  margin-top: 2px;
}

.auth-token-input {
  width: 100%;
  font-size: 14px;
  padding: 12px;
}

.auth-token-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(214, 100, 126, 0.54);
  background: rgba(63, 14, 24, 0.86);
  color: #ffd0db;
  line-height: 1.4;
}

.auth-token-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.auth-token-note {
  margin: 0;
  color: #8fc5b0;
  font-size: 12px;
  line-height: 1.35;
}

.service-run-detail-dialog {
  width: min(920px, 95vw);
  max-height: 88vh;
  border: 1px solid rgba(74, 148, 114, 0.62);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(9, 34, 25, 0.98), rgba(5, 20, 15, 0.99));
  color: var(--text);
  padding: 12px;
  box-shadow: 0 18px 38px rgba(1, 10, 7, 0.52);
}

.service-run-detail-dialog::backdrop {
  background: rgba(2, 9, 7, 0.66);
}

.service-run-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.service-run-detail-header h3 {
  margin: 0;
  font-size: 15px;
  color: var(--accent-soft);
}

.service-run-detail-meta {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.service-run-detail-json {
  margin: 0;
  border: 1px solid rgba(74, 148, 114, 0.4);
  border-radius: 8px;
  background: rgba(4, 13, 10, 0.84);
  color: #d4f7e9;
  padding: 10px;
  overflow: auto;
  max-height: 62vh;
  font-size: 11.5px;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.pipeline-organizer {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(86, 168, 130, 0.34);
}

.panel-wide .pipeline-organizer {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.pipeline-organizer h2,
.pipeline-organizer h3 {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.organizer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inline-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.service-order-rows {
  display: grid;
  gap: 6px;
  max-height: clamp(170px, 32vh, 340px);
  overflow-y: scroll;
  overflow-x: hidden;
  padding-right: 2px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(133, 163, 209, 0.72) rgba(12, 21, 36, 0.68);
}

.panel-run::-webkit-scrollbar,
.pipeline-service-status-rows::-webkit-scrollbar,
.service-order-rows::-webkit-scrollbar {
  width: 10px;
}

.panel-run::-webkit-scrollbar-track,
.pipeline-service-status-rows::-webkit-scrollbar-track,
.service-order-rows::-webkit-scrollbar-track {
  background: rgba(12, 21, 36, 0.68);
  border-radius: 10px;
}

.panel-run::-webkit-scrollbar-thumb,
.pipeline-service-status-rows::-webkit-scrollbar-thumb,
.service-order-rows::-webkit-scrollbar-thumb {
  background: rgba(133, 163, 209, 0.72);
  border-radius: 10px;
  border: 2px solid rgba(12, 21, 36, 0.68);
}

.panel-run::-webkit-scrollbar-thumb:hover,
.pipeline-service-status-rows::-webkit-scrollbar-thumb:hover,
.service-order-rows::-webkit-scrollbar-thumb:hover {
  background: rgba(165, 193, 236, 0.88);
}

.service-order-row {
  display: grid;
  grid-template-columns: 26px 1fr auto auto auto;
  gap: 6px;
  align-items: center;
}

.service-order-step {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.service-order-select {
  width: 100%;
}

.service-io-rows {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.service-io-card {
  border: 1px solid rgba(86, 168, 130, 0.5);
  border-radius: 12px;
  background: rgba(5, 20, 15, 0.62);
  outline: 1px solid rgba(64, 145, 109, 0.35);
  outline-offset: 0;
  overflow: hidden;
}

.service-io-collapsible {
  margin: 0;
}

.service-io-collapsible > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  user-select: none;
}

.service-io-collapsible > summary::-webkit-details-marker {
  display: none;
}

.service-io-collapsible > summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border-radius: 6px;
  border: 1px solid rgba(90, 180, 145, 0.6);
  background: rgba(7, 32, 24, 0.82);
  color: #ccf5e6;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
}

.service-io-collapsible[open] > summary::before {
  content: "-";
}

.service-io-step > summary {
  padding: 10px 12px;
}

.service-io-step[open] > summary {
  border-bottom: 1px solid rgba(87, 170, 133, 0.34);
  background: rgba(7, 27, 20, 0.34);
}

.service-io-summary-main {
  min-width: 0;
  display: grid;
  gap: 2px;
  flex: 1 1 auto;
}

.service-io-summary-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-io-summary-meta {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-io-summary-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.service-io-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(90, 180, 145, 0.6);
  background: rgba(7, 32, 24, 0.84);
  color: #ccf5e6;
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
}

.service-io-meta {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.service-io-body {
  padding: 8px 10px 10px;
  display: grid;
  gap: 8px;
}

.service-io-sections {
  display: grid;
  gap: 6px;
}

.service-io-section {
  border: 1px solid rgba(72, 150, 114, 0.44);
  border-radius: 10px;
  background: rgba(4, 13, 10, 0.42);
}

.service-io-section > summary {
  font-size: 12px;
  color: var(--accent-soft);
}

.service-io-section[open] > summary {
  border-bottom: 1px solid rgba(72, 150, 114, 0.32);
}

.service-io-section-body {
  padding: 8px;
  display: grid;
  gap: 6px;
}

.service-io-json {
  margin: 0;
  border: 1px solid rgba(72, 150, 114, 0.28);
  border-radius: 8px;
  padding: 8px;
  min-height: 72px;
  max-height: 220px;
  overflow: auto;
  background: rgba(4, 13, 10, 0.86);
  color: #cff6e7;
  font-size: 11.5px;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.service-io-copy-wrap .service-io-json {
  padding-right: 80px;
}

.service-io-links {
  display: grid;
  gap: 6px;
}

.service-io-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.service-io-link-meta {
  min-width: 0;
}

.service-io-link-path {
  color: #aee8cd;
  font-size: 11px;
  line-height: 1.3;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.service-io-link-raw {
  color: #c6efe0;
  font-size: 11px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.service-io-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #327959;
  background: rgba(7, 28, 20, 0.86);
  color: var(--accent-soft);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1;
}

.service-io-link-btn:hover {
  border-color: var(--accent);
  color: #ffffff;
}

.service-io-empty {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.icon-btn {
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1;
  margin: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.lambda-rows {
  display: grid;
  gap: 10px;
}

.lambda-row {
  border: 1px solid rgba(86, 168, 130, 0.5);
  border-radius: 12px;
  padding: 10px;
  background: rgba(5, 20, 15, 0.62);
  outline: 1px solid rgba(64, 145, 109, 0.35);
  outline-offset: 0;
}

.lambda-row.lambda-row-error {
  border-color: rgba(212, 95, 121, 0.82);
  outline-color: rgba(212, 95, 121, 0.55);
}

.lambda-row-title {
  margin: 0;
  font-size: 12px;
  color: var(--accent-soft);
}

.lambda-row-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.lambda-input-wrap {
  position: relative;
}

.lambda-row-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
}

.lambda-action-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  font-size: 14px;
  border-radius: 8px;
  margin: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  vertical-align: middle;
}

.lambda-save-btn {
  height: 30px;
  min-width: 68px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1;
}

.lambda-row .lambda-input {
  width: 100%;
  min-height: 220px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  line-height: 1.35;
  border: 1px solid rgba(86, 168, 130, 0.45);
  background: rgba(4, 13, 10, 0.9);
  color: #cff7e6;
  padding: 42px 212px 10px 10px;
}

.lambda-row-error-text {
  margin-top: 6px;
  color: #ffb5c4;
  font-size: 12px;
  line-height: 1.35;
}

.lambda-row-actions .copy-json-btn,
.lambda-row-actions .fullscreen-json-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
}

.lambda-fullscreen-btn.is-active {
  border-color: var(--accent);
  color: #ffffff;
}

.lambda-row:fullscreen,
.lambda-row:-webkit-full-screen,
.lambda-row.lambda-force-fullscreen,
.lambda-row.lambda-native-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 14px;
  border-radius: 0;
  border: 0;
  outline: 2px solid rgba(74, 203, 147, 0.52);
  z-index: 2147482600;
  display: flex;
  flex-direction: column;
  background: var(--output-bg);
}

.lambda-row:fullscreen .lambda-input,
.lambda-row:-webkit-full-screen .lambda-input,
.lambda-row.lambda-force-fullscreen .lambda-input,
.lambda-row.lambda-native-fullscreen .lambda-input {
  flex: 1 1 auto;
  width: 100%;
  min-height: calc(100vh - 86px);
  height: calc(100vh - 86px);
  max-height: none;
  resize: none;
}

.numbered-textarea-shell:fullscreen,
.numbered-textarea-shell:-webkit-full-screen,
.numbered-textarea-shell.text-shell-force-fullscreen,
.numbered-textarea-shell.text-shell-native-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  border-radius: 0;
  border: 0;
  z-index: 2147482500;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
}

.numbered-textarea-shell:fullscreen .line-numbers,
.numbered-textarea-shell:-webkit-full-screen .line-numbers,
.numbered-textarea-shell.text-shell-force-fullscreen .line-numbers,
.numbered-textarea-shell.text-shell-native-fullscreen .line-numbers {
  padding-top: 16px;
  font-size: 14px;
}

.numbered-textarea-shell:fullscreen textarea,
.numbered-textarea-shell:-webkit-full-screen textarea,
.numbered-textarea-shell.text-shell-force-fullscreen textarea,
.numbered-textarea-shell.text-shell-native-fullscreen textarea {
  height: 100vh;
  min-height: 100vh;
  max-height: none;
  resize: none;
  padding: 16px;
  font-size: 14px;
}

#dataKeysShell:fullscreen .line-numbers,
#dataKeysShell:-webkit-full-screen .line-numbers,
#dataKeysShell.text-shell-force-fullscreen .line-numbers,
#dataKeysShell.text-shell-native-fullscreen .line-numbers {
  padding-top: 16px;
}

#dataKeysShell:fullscreen textarea,
#dataKeysShell:-webkit-full-screen textarea,
#dataKeysShell.text-shell-force-fullscreen textarea,
#dataKeysShell.text-shell-native-fullscreen textarea {
  padding-top: 16px;
  padding-right: 136px;
}

#dataKeysShell:fullscreen .text-shell-actions,
#dataKeysShell:-webkit-full-screen .text-shell-actions,
#dataKeysShell.text-shell-force-fullscreen .text-shell-actions,
#dataKeysShell.text-shell-native-fullscreen .text-shell-actions {
  top: 12px;
  right: 12px;
}

label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input, textarea, select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  background: var(--field-bg);
  color: var(--text);
}

input::placeholder, textarea::placeholder { color: #6f9f8b; }

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

.numbered-textarea-shell {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--field-bg);
}

.numbered-textarea-shell .line-numbers {
  margin: 0;
  padding: 10px 6px 10px 8px;
  border-right: 1px solid rgba(58, 111, 86, 0.55);
  color: #81b89f;
  background: rgba(6, 21, 16, 0.95);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.4;
  text-align: right;
  user-select: none;
  overflow: hidden;
  white-space: pre;
}

.numbered-textarea-shell textarea {
  border: 0;
  border-radius: 0;
  margin: 0;
  min-height: 130px;
  resize: vertical;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  line-height: 1.4;
  white-space: pre;
}

.text-shell-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.text-shell-action-btn {
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  border-radius: 8px;
}

#dataKeysShell .line-numbers {
  padding-top: 16px;
}

#dataKeysShell textarea {
  padding-top: 16px;
  padding-right: 128px;
  padding-left: 10px;
  font-size: 13px;
  line-height: 1.4;
  font-variant-ligatures: none;
}

#dataKeysShell textarea::placeholder {
  font-size: 13px;
  line-height: 1.4;
  font-family: inherit;
  font-variant-ligatures: none;
}

#dataKeysShell textarea[readonly] {
  cursor: default;
}

.out-profiles {
  min-height: 44px;
  max-height: 180px;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

button {
  border: 1px solid #2b7457;
  background: linear-gradient(180deg, #1b5b44, #123f2f);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}

button:hover {
  border-color: var(--accent);
}

button.secondary {
  background: rgba(7, 28, 20, 0.86);
  color: var(--accent-soft);
  border-color: #327959;
}

.out {
  background: var(--output-bg);
  color: #d5f9e9;
  border: 1px solid var(--line);
  padding: 10px;
  margin: 0;
  border-radius: 10px;
  overflow: auto;
  max-height: 220px;
  font-size: 12px;
}

.output-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0 0 8px;
}

.output-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.output-toolbar label {
  margin: 0;
}

.output-mode {
  display: inline-flex;
  align-items: flex-end;
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.output-mode-btn {
  appearance: none;
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: rgba(7, 28, 20, 0.86);
  color: var(--accent-soft);
  padding: 6px 10px;
  font-size: 12px;
  min-width: 58px;
  margin: 0 0 -1px 0;
  position: relative;
  top: 1px;
}

.output-mode-btn:hover {
  border-color: rgba(136, 231, 190, 0.72);
  background: rgba(47, 207, 142, 0.2);
}

.output-mode-btn.is-active {
  border-color: rgba(164, 245, 210, 0.82);
  background: rgba(77, 187, 145, 0.44);
  color: #ffffff;
}

.out-main {
  min-height: 300px;
  max-height: min(68vh, 760px);
  margin: 0 0 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.panel-visualize .out-copy-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-visualize .out-copy-wrap .out {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.panel-visualize .out-main {
  height: 100%;
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  margin-bottom: 0;
  width: 100%;
}

.out-chain {
  min-height: 140px;
  max-height: 260px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.out-main:fullscreen {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  margin: 0;
  padding: 16px;
}

.out-copy-wrap:fullscreen,
.out-copy-wrap:-webkit-full-screen,
.out-copy-wrap.out-force-fullscreen,
.out-copy-wrap.out-native-fullscreen {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: var(--output-bg);
}

.out-copy-wrap:fullscreen .out-main,
.out-copy-wrap:-webkit-full-screen .out-main,
.out-copy-wrap.out-force-fullscreen .out-main,
.out-copy-wrap.out-native-fullscreen .out-main {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  max-height: none;
  margin: 0;
  border-radius: 0;
  padding: 16px;
}

.out-copy-wrap:fullscreen .out-copy-actions,
.out-copy-wrap:-webkit-full-screen .out-copy-actions,
.out-copy-wrap.out-force-fullscreen .out-copy-actions,
.out-copy-wrap.out-native-fullscreen .out-copy-actions {
  top: 12px;
  right: 12px;
  z-index: 2;
}

.out-copy-wrap {
  position: relative;
}

.out-copy-wrap .out {
  padding-right: 80px;
}

.out-copy-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
}

.copy-json-btn,
.fullscreen-json-btn {
  width: 26px;
  min-width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 26, 19, 0.92);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-sizing: border-box;
  margin: 0;
  vertical-align: middle;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
  padding: 0;
}

.copy-json-btn:hover,
.fullscreen-json-btn:hover,
.fullscreen-json-btn.is-active {
  border-color: var(--accent);
  background: rgba(20, 64, 47, 0.96);
  color: #ffffff;
}

.out-copy-actions[hidden] {
  display: none;
}

.copy-json-icon {
  position: relative;
  width: 12px;
  height: 12px;
  display: inline-block;
}

.copy-json-icon::before,
.copy-json-icon::after {
  content: "";
  position: absolute;
  border: 1px solid currentColor;
  border-radius: 2px;
  width: 8px;
  height: 8px;
  background: transparent;
}

.copy-json-icon::before {
  left: 2px;
  top: 0;
  opacity: 0.9;
}

.copy-json-icon::after {
  left: 0;
  top: 3px;
  opacity: 0.75;
}

.fullscreen-json-icon {
  position: relative;
  width: 12px;
  height: 12px;
  display: inline-block;
}

.fullscreen-json-icon::before,
.fullscreen-json-icon::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-color: currentColor;
  border-style: solid;
}

.fullscreen-json-icon::before {
  left: 0;
  top: 0;
  border-width: 1px 0 0 1px;
  box-shadow: 8px 0 0 0 currentColor, 0 8px 0 0 currentColor;
  opacity: 0.95;
}

.fullscreen-json-icon::after {
  right: 0;
  bottom: 0;
  border-width: 0 1px 1px 0;
  box-shadow: -8px 0 0 0 currentColor, 0 -8px 0 0 currentColor;
  opacity: 0.95;
}

footer {
  position: relative;
  z-index: 1;
  padding: 14px 18px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #2f6d54;
}

footer code {
  color: #d4ffef;
  background: rgba(6, 27, 20, 0.78);
  border: 1px solid #2b6f53;
  border-radius: 6px;
  padding: 2px 5px;
}

.copyright {
  font-weight: 600;
}

.footer-tip {
  opacity: 0.95;
}

@media (max-width: 980px) {
  main {
    grid-template-columns: 1fr;
  }
  .visualize-actions-row {
    grid-template-columns: auto auto minmax(200px, 1fr);
  }
  .cq-visualize-inline {
    width: 100%;
    min-width: 0;
  }
  .visualize-cq-select {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    flex: 1 1 auto;
  }
  .cq-inline-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .visualize-actions-row .cq-visualize-inline {
    width: auto;
    min-width: 200px;
  }
  .visualize-actions-row .visualize-cq-select {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  .actions-row button {
    min-width: 0;
  }
  .pipeline-interrupt-panel .actions-row button {
    width: 100%;
  }
  .sssom-floating-overlay {
    padding: 8px;
  }
  .sssom-floating-window {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    border-radius: 12px;
  }
  .sssom-floating-window.sssom-minimized {
    width: 100%;
  }
  .sssom-floating-header {
    cursor: default;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .sssom-floating-actions {
    justify-content: flex-start;
  }
  .sssom-floating-actions button {
    min-width: 0;
    flex: 1 1 120px;
  }
  .sssom-floating-resize-handle {
    display: none;
  }
  .lambda-row-header {
    flex-direction: column;
    align-items: stretch;
  }
  .lambda-row-actions {
    justify-content: flex-end;
  }
  .service-io-collapsible > summary {
    align-items: flex-start;
  }
  .service-io-summary-right {
    margin-left: 0;
  }
  .service-io-link-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .service-io-link-btn {
    justify-self: start;
  }
  .pipeline-service-status-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
  .pipeline-service-status-left {
    width: 100%;
  }
  .pipeline-service-status-chip {
    justify-self: start;
  }
  .pipeline-service-status-details {
    justify-self: start;
  }
  .panel-visualize-head {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .panel-visualize-links {
    width: 100%;
    margin-left: 0;
  }
  .panel-visualize-links select {
    min-width: 0;
    width: 100%;
  }
  .cq-dialog {
    width: min(96vw, 96vw);
    padding: 10px;
  }
  .cq-dialog-header {
    flex-direction: column;
    align-items: stretch;
  }
  .cq-dialog-brand {
    justify-content: flex-start;
  }
  .cq-dialog-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .cq-tab-btn {
    width: 100%;
    min-width: 0;
  }
  .service-run-detail-dialog {
    width: min(96vw, 96vw);
    padding: 10px;
  }
  .auth-token-card {
    padding: 16px;
  }
  .auth-token-brand,
  .auth-token-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .auth-token-badge {
    justify-content: center;
  }
  .service-run-detail-header {
    flex-direction: column;
    align-items: stretch;
  }
  .row-head {
    flex-direction: column;
    align-items: stretch;
  }
  .pipeline-organizer-status-row {
    flex-direction: column;
    align-items: stretch;
  }
  .text-actions {
    justify-content: flex-end;
  }
  .brand-top {
    flex-wrap: wrap;
  }
  .brand-left {
    width: 100%;
  }
  header .sub {
    max-width: 100%;
  }
  .brand-identity-wrap {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
    align-items: flex-start;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 6px;
  }
  .brand-headings {
    width: auto;
    margin-left: 0;
    align-items: flex-end;
  }
  .brand-top .theme-switch {
    justify-content: flex-start;
  }
  .brand-top .theme-select {
    min-width: 132px;
  }
  .brand-wordmark {
    height: 24px;
    max-width: 100%;
  }
  .graph-title {
    font-size: 13px !important;
  }
  .brand-meta-line {
    font-size: 10px;
  }
}

@media (max-width: 640px) {
  .visualize-actions-row {
    grid-template-columns: 1fr 1fr;
  }
  .visualize-actions-row .cq-visualize-inline {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }
  .cq-inline-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .cq-inline-manage-btn {
    min-width: 0;
    flex: 1 1 110px;
  }
}
