:root {
  color-scheme: light;
  --canvas: #f4f3ef;
  --surface: #fff;
  --ink: #172033;
  --muted: #667085;
  --line: #d9dde5;
  --soft: #eef1f5;
  --blue: #3157d5;
  --blue-dark: #2343ad;
  --blue-soft: #edf1ff;
  --green: #12805c;
  --amber: #a86105;
  --red: #bd2c32;
  --shadow: 0 12px 35px rgba(25, 35, 55, 0.07);
  --radius: 16px;
  --sans:
    Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 10;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
}
.skip-link:focus {
  top: 12px;
}
.topbar {
  height: 72px;
  background: #172033;
  color: #fff;
  padding: 0 clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #303b52;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #8794ae;
  border-radius: 10px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.08em;
}
.brand div {
  display: grid;
}
.brand div span {
  color: #aeb8cb;
  font-size: 12px;
}
.runtime {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #cbd3e0;
  font-size: 13px;
}
.runtime-dot {
  width: 8px;
  height: 8px;
  background: #9aa4b5;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(154, 164, 181, 0.15);
}
.runtime-dot.ok {
  background: #35c990;
}
.runtime-dot.warn {
  background: #f0a742;
}
.shell {
  max-width: 1440px;
  margin: auto;
  padding: clamp(28px, 4vw, 56px) clamp(18px, 4vw, 64px) 48px;
}
.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 32px;
}
.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(32px, 4.3vw, 58px);
  line-height: 1.03;
  letter-spacing: -0.045em;
  max-width: 760px;
  margin-bottom: 14px;
}
h2 {
  font-size: 24px;
  letter-spacing: -0.025em;
  margin-bottom: 5px;
}
h3 {
  font-size: 17px;
  margin-bottom: 2px;
}
.lede,
.section-head p,
.io-panel p {
  color: var(--muted);
  max-width: 720px;
  margin-bottom: 0;
}
.hero-actions,
.io-actions,
.row-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.button {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 15px;
  font-weight: 750;
  color: var(--ink);
  background: var(--surface);
  min-height: 42px;
}
.button:hover {
  transform: translateY(-1px);
}
.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}
.primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 5px 14px rgba(49, 87, 213, 0.2);
}
.primary:hover {
  background: var(--blue-dark);
}
.secondary {
  border-color: #aeb8c9;
  background: transparent;
}
.quiet {
  background: var(--soft);
  border-color: var(--line);
}
.danger {
  color: var(--red);
}
.notice {
  margin: 0 0 22px;
  padding: 13px 16px;
  border-radius: 11px;
  background: var(--blue-soft);
  border: 1px solid #cbd5ff;
  color: #2945a1;
}
.notice.error {
  background: #fff0f0;
  border-color: #f3b9bc;
  color: #8c2025;
}
.status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}
.metric {
  background: var(--surface);
  padding: 20px;
  min-height: 124px;
  display: flex;
  flex-direction: column;
}
.metric > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.metric strong {
  font-size: 26px;
  line-height: 1.2;
  margin: 8px 0;
}
.metric small {
  color: var(--muted);
  margin-top: auto;
}
.control-metric .button {
  align-self: flex-start;
  margin: 7px 0 4px;
}
.tabs {
  display: flex;
  gap: 4px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
}
.tab {
  border: 0;
  background: transparent;
  padding: 14px 17px;
  color: var(--muted);
  font-weight: 750;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.tab span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  padding: 1px 6px;
  margin-left: 4px;
  border-radius: 99px;
  background: var(--soft);
  font-size: 11px;
}
.tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: clamp(20px, 3vw, 34px);
  box-shadow: var(--shadow);
  min-height: 260px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 24px;
  margin-bottom: 24px;
}
.stack {
  display: grid;
  gap: 14px;
}
.editor-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfd;
  overflow: hidden;
}
.editor-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.editor-body {
  padding: 18px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.field {
  display: grid;
  gap: 6px;
}
.field.wide {
  grid-column: span 2;
}
.field label,
.field-label {
  font-size: 12px;
  font-weight: 750;
  color: #465168;
}
.field input,
.field select,
.field textarea,
#json-editor {
  width: 100%;
  border: 1px solid #bac2cf;
  background: #fff;
  color: var(--ink);
  border-radius: 9px;
  padding: 9px 10px;
  min-height: 42px;
}
.field input:focus,
.field select:focus,
.field textarea:focus,
#json-editor:focus,
.button:focus-visible,
.tab:focus-visible {
  outline: 3px solid rgba(49, 87, 213, 0.24);
  outline-offset: 2px;
  border-color: var(--blue);
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
}
.checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}
.fields {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.discovery-results {
  margin: 0 18px 18px;
  padding: 13px 15px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: #2945a1;
}
.discovery-results p {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}
.creation-help {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
  align-self: center;
}
.fields-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.05fr 0.8fr 1fr 0.85fr auto;
  gap: 8px;
  align-items: end;
  padding: 10px 0;
  border-top: 1px solid #e8eaf0;
}
.compact-checkbox {
  font-size: 12px;
}
.field-row:first-of-type {
  border-top: 0;
}
.field-row .button {
  padding: 8px 10px;
}
.tag {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}
.empty {
  text-align: center;
  padding: 42px 20px;
  border: 1px dashed #bbc2cd;
  border-radius: 12px;
  color: var(--muted);
}
.empty strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
}
.conflict-card {
  border-left: 4px solid var(--amber);
}
.conflict-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}
.value-box {
  padding: 12px;
  background: var(--soft);
  border-radius: 9px;
  overflow-wrap: anywhere;
}
.value-box span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 800;
}
.io-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  background: #202a3f;
  color: #fff;
  border-radius: var(--radius);
  padding: 26px;
  margin-top: 28px;
}
.io-panel .eyebrow {
  color: #aebeff;
}
.io-panel p {
  color: #b7c0d1;
}
.io-panel .button {
  color: #fff;
  background: #303b52;
  border-color: #56627a;
}
.io-panel textarea {
  grid-column: 1/-1;
  background: #141c2d;
  color: #e7ebf2;
  border-color: #526078;
  font: 13px/1.55 var(--mono);
  resize: vertical;
}
.savebar {
  position: sticky;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding: 13px 14px 13px 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(23, 32, 51, 0.14);
  z-index: 3;
}
.savebar p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
@media (max-width: 980px) {
  .status-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
  .hero {
    align-items: start;
    flex-direction: column;
  }
  .hero-actions {
    width: 100%;
  }
  .hero-actions .button {
    flex: 1;
  }
}
@media (max-width: 600px) {
  .topbar {
    height: 64px;
    padding: 0 16px;
  }
  .runtime-label {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .shell {
    padding: 28px 14px 36px;
  }
  h1 {
    font-size: 36px;
  }
  .status-grid {
    grid-template-columns: 1fr 1fr;
  }
  .metric {
    padding: 15px;
    min-height: 112px;
  }
  .metric strong {
    font-size: 21px;
  }
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }
  .section-head > .button {
    width: 100%;
  }
  .panel {
    padding: 18px 14px;
  }
  .form-grid,
  .form-grid.two,
  .field-row,
  .conflict-values {
    grid-template-columns: 1fr;
  }
  .field.wide {
    grid-column: auto;
  }
  .editor-head {
    align-items: start;
    flex-direction: column;
  }
  .io-panel {
    grid-template-columns: 1fr;
    padding: 20px 16px;
  }
  .io-actions {
    width: 100%;
  }
  .io-actions .button {
    flex: 1;
  }
  .savebar {
    bottom: 8px;
    align-items: stretch;
    flex-direction: column;
  }
  .savebar .button {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .button {
    transition: none;
  }
  .button:hover {
    transform: none;
  }
}
