.sf {
  --sf-ink: #23303c;
  --sf-muted: #5d6b76;
  --sf-line: #d6dfe4;
  --sf-accent: #20665d;
  --sf-tint: #e6f4ee;
  color: var(--sf-ink);
  min-width: 0;
}
.sf * {
  box-sizing: border-box;
}
.sf h1,
.sf h2,
.sf h3,
.sf p {
  margin: 0;
}
.sf h1 {
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.15;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}
.sf h2 {
  font-size: 1.15rem;
}
.sf h3 {
  font-size: 1.05rem;
}
.sf button,
.sf select,
.sf input,
.sf textarea {
  font: inherit;
}
.sf button {
  cursor: pointer;
}
.sf button:disabled {
  opacity: 0.45;
  cursor: default;
}
.sf button:focus-visible,
.sf summary:focus-visible,
.sf input:focus-visible,
.sf select:focus-visible,
.sf textarea:focus-visible,
.sf-node:focus-visible {
  outline: 3px solid #5492da;
  outline-offset: 2px;
}
.sf-head,
.sf-top,
.sf-tools,
.sf-controls,
.sf-tabs,
.sf-canvas-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.sf-head,
.sf-top {
  justify-content: space-between;
}
.sf-head {
  margin: 0 0 1.15rem;
}
.sf-top {
  margin: 0 0 0.6rem;
}
.sf-top small,
.sf-hint,
.sf-trace small {
  color: var(--sf-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}
.sf-field,
.sf fieldset {
  display: grid;
  gap: 0.4rem;
}
.sf fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  gap: 0.75rem;
}
.sf-field > span {
  font-weight: 600;
  font-size: 0.82rem;
  color: #44535e;
}
.sf-field input,
.sf-field select,
.sf-field textarea,
.sf-canvas-bar select {
  border: 1px solid #b7c5cb;
  border-radius: 6px;
  padding: 0.54rem 0.58rem;
  background: white;
  color: var(--sf-ink);
  min-width: 0;
  width: 100%;
}
.sf-field textarea {
  resize: vertical;
  min-height: 4.6rem;
}
.sf-controls {
  align-items: end;
  padding: 0.9rem 0 1.1rem;
}
.sf-controls .sf-field {
  min-width: 9rem;
  flex: 0 1 14rem;
}
.sf-link {
  border: 0;
  background: transparent;
  color: var(--sf-accent);
  font-weight: 650;
  text-align: left;
  padding: 0.2rem 0;
}
.sf-link:hover {
  text-decoration: underline;
}
.sf-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.52rem;
  border-radius: 20px;
  background: #edf0f2;
  color: #45525b;
  font-size: 0.73rem;
  font-weight: 650;
  line-height: 1.3;
}
.sf-badge::before {
  content: '';
  height: 0.4rem;
  width: 0.4rem;
  border-radius: 50%;
  background: currentColor;
}
.sf-active,
.sf-completed {
  color: #17604d;
  background: #dff3e9;
}
.sf-failed {
  color: #8d3428;
  background: #fce9e4;
}
.sf-waiting {
  color: #78540c;
  background: #fff0c4;
}
.sf-empty {
  padding: clamp(2rem, 8vw, 6rem) 1.2rem;
  text-align: center;
  border: 1px dashed #bdcdd0;
  border-radius: 12px;
  background: #f9fbfa;
}
.sf-empty p {
  margin: 0.5rem auto 1rem;
  max-width: 36em;
  color: var(--sf-muted);
}
.sf-table-scroll {
  overflow: auto;
  border: 1px solid var(--sf-line);
  border-radius: 8px;
  background: white;
}
.sf table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}
.sf th,
.sf td {
  padding: 0.68rem 0.8rem;
  border-bottom: 1px solid var(--sf-line);
  white-space: nowrap;
}
.sf tr:last-child td {
  border-bottom: 0;
}
.sf th {
  color: var(--sf-muted);
  font-weight: 600;
  background: #f6f8f8;
}
.sf-tabs {
  border-bottom: 1px solid var(--sf-line);
  gap: 1.1rem;
  margin-bottom: 1rem;
}
.sf-tabs button {
  padding: 0.6rem 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--sf-muted);
}
.sf-tabs [aria-pressed='true'] {
  border-bottom-color: var(--sf-accent);
  color: var(--sf-accent);
  font-weight: 650;
}
.sf-tabs small {
  color: #805410;
  margin-left: auto;
}
.sf-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 320px);
  border: 1px solid var(--sf-line);
  border-radius: 10px;
  overflow: hidden;
  background: white;
}
.sf-canvas {
  min-width: 0;
  background: #f5f8f7;
}
.sf-canvas-bar {
  padding: 0.55rem;
  background: #fff;
  border-bottom: 1px solid var(--sf-line);
  gap: 0.35rem;
}
.sf-canvas-bar select {
  width: auto;
  max-width: 12rem;
}
.sf-canvas-bar .btn {
  font-size: 0.75rem;
  padding: 0.42rem 0.55rem;
}
.sf-viewport,
.sf-version {
  overflow: auto;
  min-height: 24rem;
  max-height: 72vh;
  background-color: #f6f9f8;
  background-image: radial-gradient(#c8d7d2 0.85px, transparent 0.9px);
  background-size: 15px 15px;
}
.sf-graph {
  display: block;
  margin: auto;
  max-width: none;
}
.sf-edge {
  fill: none;
  stroke: #839e94;
  stroke-width: 1.7;
}
.sf-graph marker path {
  fill: #839e94;
}
.sf-output {
  fill: #4c655b;
  font-size: 11px;
  font-weight: 700;
}
.sf-node {
  cursor: pointer;
}
.sf-node rect {
  fill: #fff;
  stroke: #b7c8c0;
  stroke-width: 1.4;
}
.sf-node.selected rect {
  fill: #f4fcf9;
  stroke: var(--sf-accent);
  stroke-width: 2.4;
}
.sf-node:hover rect {
  stroke: var(--sf-accent);
}
.sf-node-start rect,
.sf-node-end rect {
  fill: #edf6f0;
}
.sf-node-condition rect,
.sf-node-split rect,
.sf-node-random rect {
  fill: #f6f3ff;
  stroke: #c6bddc;
}
.sf-node-title {
  fill: var(--sf-ink);
  font-size: 13px;
  font-weight: 600;
}
.sf-glyph {
  fill: #347369;
  font-size: 18px;
}
.sf-inspector {
  border-left: 1px solid var(--sf-line);
  padding: 1rem;
  min-width: 0;
  overflow: auto;
  max-height: 77vh;
}
.sf-inspector h3 {
  margin-bottom: 1rem;
}
.sf-inspector fieldset > .btn {
  justify-self: start;
}
.sf-action {
  border-top: 1px solid var(--sf-line);
  padding: 0.85rem 0 0.1rem;
  display: grid;
  gap: 0.6rem;
}
.sf-action > div {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.4rem;
}
.sf-action strong,
.sf-action button {
  font-size: 0.8rem;
}
.sf-run {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}
.sf-section {
  background: white;
  border: 1px solid var(--sf-line);
  border-radius: 8px;
  padding: 1rem;
  min-width: 0;
}
.sf-section h2 {
  margin-bottom: 1rem;
}
.sf-section .sf-field,
.sf-section .sf-tools {
  margin-bottom: 0.7rem;
}
.sf-settings {
  max-width: 48rem;
}
.sf-settings h2 {
  margin-top: 1.5rem;
}
.sf-version {
  min-height: 0;
  max-height: 22rem;
}
.sf-version .sf-node {
  cursor: default;
}
.sf details {
  padding: 0.7rem 0;
  border-top: 1px solid var(--sf-line);
}
.sf summary {
  cursor: pointer;
  font-size: 0.87rem;
}
.sf-trace {
  margin-top: 0.8rem;
}
.sf-trace ol {
  padding-left: 1.5rem;
  font-size: 0.85rem;
}
.sf-trace li {
  padding: 0.2rem;
}
.sf-trace li small {
  display: block;
}
.sf-trace [role='alert'] {
  margin: 0.55rem 0;
  color: #8c332a;
}
.sf .sf-review {
  margin-bottom: 0.7rem;
  padding: 0.6rem 0.8rem;
  background: #fff7dc;
  border: 1px solid #e7dba6;
  border-radius: 6px;
}
.sf-review li {
  font-size: 0.83rem;
}
.sf-kit-note,
.sf-section + .sf-section {
  margin-bottom: 0.9rem;
}
.sf-section + .sf-section {
  margin-top: 0.8rem;
}
.sf-section form .sf-hint,
.sf-settings > .sf-hint {
  margin-bottom: 0.7rem;
}
.sf .sf-report-note {
  color: var(--sf-muted);
  font-size: 0.86rem;
  line-height: 1.5;
  margin: 0 0 1rem;
  max-width: 75ch;
}
.sf-pagination {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: flex-end;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}
.sf-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1px;
  background: var(--sf-line);
  border: 1px solid var(--sf-line);
  border-radius: 8px;
  overflow: hidden;
  margin: 0 0 1rem;
}
.sf-metrics div {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  background: #fff;
}
.sf-metrics span {
  font-size: 0.8rem;
  color: var(--sf-muted);
}
.sf-metrics strong {
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  .sf-builder,
  .sf-run {
    grid-template-columns: 1fr;
  }
  .sf-inspector {
    border-left: 0;
    border-top: 1px solid var(--sf-line);
    max-height: none;
  }
  .sf-viewport {
    min-height: 14rem;
    max-height: 48vh;
  }
  .sf-canvas-bar select {
    max-width: 10rem;
  }
  .sf-head .sf-tools {
    width: 100%;
  }
  .sf-controls .sf-field {
    flex: 1 1 10rem;
  }
  .sf-tabs {
    gap: 0.6rem;
  }
  .sf-tabs button {
    font-size: 0.85rem;
  }
}
