:root {
  color: #e8f4ee;
  background: #06110d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 720px;
  min-height: 100vh;
  background: radial-gradient(circle at 75% 0%, #16372d 0, transparent 32rem), #06110d;
}

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

button {
  padding: .65rem .9rem;
  color: #eef8f2;
  background: #17241f;
  border: 1px solid #466057;
  border-radius: 9px;
  cursor: pointer;
}

button:hover:not(:disabled), button:focus-visible {
  border-color: #75edb5;
  outline: none;
  box-shadow: 0 0 0 3px #57d99b22;
}

button:disabled { opacity: .38; cursor: not-allowed; }
button.accent { color: #042216; background: #66e5aa; border-color: #66e5aa; font-weight: 700; }
button.quiet { background: transparent; }

main { max-width: 1600px; margin: auto; padding: 0 28px 48px; }

.splash {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  background: #06110d;
  color: #e8f4ee;
}

.splash-mark, .brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #062319;
  background: #66e5aa;
  border-radius: 11px;
  font-weight: 900;
}

.splash small { color: #8ca49a; }
.splash.failed .splash-mark { color: #2b1505; background: #ecb879; }

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #294138;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand > div { display: grid; }
.brand small { color: #8ca49a; }
.connection { display: flex; align-items: end; gap: 8px; }

label { display: grid; gap: 6px; color: #9eb1a9; font-size: .78rem; }

input, select, textarea {
  min-width: 190px;
  padding: .58rem .7rem;
  color: #eaf3ef;
  background: #0b1914;
  border: 1px solid #30483f;
  border-radius: 7px;
}

textarea { min-height: 76px; resize: vertical; font: .78rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.field-help { color: #789086; font-size: .72rem; }

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 42px 0 22px;
}

.eyebrow {
  margin: 0 0 7px;
  color: #66e5aa;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.title {
  width: min(620px, 55vw);
  padding: 0;
  color: #eef8f2;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 2.25rem;
  font-weight: 760;
}

.actions { display: flex; gap: 8px; }
.status { min-height: 1.3em; margin: 0 0 14px; color: #aac0b6; }

.template-setup {
  margin-bottom: 14px;
  padding: 20px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 16px;
  align-items: end;
  background: #10241c;
  border: 1px solid #3b6957;
  border-radius: 14px;
}

.template-setup p { color: #9fb5ab; line-height: 1.45; }
.template-setup label { align-self: stretch; }
.template-setup textarea, .template-setup input { width: 100%; }
.template-actions { display: flex; justify-content: end; gap: 8px; grid-column: 2 / 4; }

.workspace {
  display: grid;
  grid-template-columns: minmax(620px, 1fr) 320px;
  gap: 14px;
  align-items: start;
}

.canvas-panel, .inspector, .preview {
  background: #0a1712dd;
  border: 1px solid #294138;
  border-radius: 14px;
  box-shadow: 0 24px 70px #0005;
}

.panel-heading { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid #253b33; }
h2 { margin: 0; font-size: 1.05rem; }
.badge { padding: .35rem .6rem; color: #a6bbb2; background: #172820; border-radius: 99px; font-size: .72rem; }

.graph {
  position: relative;
  height: 230px;
  overflow-x: auto;
  overflow-y: hidden;
  background-image: radial-gradient(#2d463b 1px, transparent 1px);
  background-size: 20px 20px;
  border-bottom: 1px solid #253b33;
}

.graph-nodes { position: relative; height: 100%; }

.node {
  width: 184px;
  height: 92px;
  display: grid;
  gap: 4px;
  text-align: left;
  background: #10221b;
}

.node.selected { border-color: #66e5aa; box-shadow: 0 0 0 3px #66e5aa22; }
.node-index { color: #66e5aa; font: 700 .68rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.node small { color: #91a69d; text-transform: capitalize; }
.node-request_approval { background: #261f12; border-color: #7a6333; }
.node-publish_release, .node-dispatch_workflow { background: #142135; border-color: #3a5b84; }

.edge {
  min-width: 58px;
  padding: 5px 8px;
  color: #8ff2c4;
  background: #0c241a;
  border: 1px solid #2d7458;
  border-radius: 999px;
  text-align: center;
  font: 700 .68rem ui-monospace, SFMono-Regular, Menlo, monospace;
}

.accessible-list { padding: 16px 22px; }
.accessible-list summary { color: #b8cac2; cursor: pointer; }
.accessible-list ol { columns: 2; padding-left: 24px; }
.accessible-list li { margin: 8px 0; color: #7e968c; }
.accessible-list li button { padding: 0; background: transparent; border: 0; }
.accessible-list li span { margin-left: 8px; font-size: .72rem; }

.inspector { min-height: 410px; padding: 20px; display: grid; align-content: start; gap: 18px; }
.inspector.empty { color: #879e94; }
.inspector input, .inspector select { width: 100%; min-width: 0; }
.inspector fieldset { padding: 12px; border: 1px solid #30483f; border-radius: 8px; }
.inspector legend { color: #9eb1a9; font-size: .78rem; }
.check { grid-template-columns: auto 1fr; align-items: center; margin: 8px 0; }
.check input { width: auto; min-width: 0; }

.empty-canvas { min-height: 240px; display: grid; place-content: center; gap: 6px; color: #81978e; text-align: center; }
.empty-canvas strong { color: #d4e3dc; }

.preview { margin-top: 14px; padding: 20px; display: flex; gap: 34px; align-items: center; }
.preview > div { display: grid; }
.preview > div strong { font-size: 1.5rem; }
.preview > div span { color: #8fa49b; font-size: .75rem; }
.preview ul { margin-left: auto; color: #ecb879; }
.preview.valid { border-color: #2d7458; }
.preview.invalid { border-color: #8b5e2e; }

@media (max-width: 1100px) {
  .workspace { grid-template-columns: 1fr; }
  .connection label:first-child { display: none; }
  .inspector { min-height: auto; }
  .template-setup { grid-template-columns: 1fr 1fr; }
  .template-actions { grid-column: 1 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
