:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef2f5;
  color: #15202b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

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

.layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #3b6478;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.7rem);
}

h2 {
  font-size: 1.2rem;
}

.health {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  background: #dff3e8;
  color: #12613a;
  font-weight: 750;
}

.health.failed {
  background: #fde7e7;
  color: #a51f1f;
}

.grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.4fr);
  gap: 18px;
  align-items: start;
}

.panel {
  background: #ffffff;
  border: 1px solid #d8e0e7;
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 16px 48px rgba(21, 32, 43, 0.08);
}

.stack {
  display: grid;
  gap: 16px;
}

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

label {
  display: grid;
  gap: 7px;
  color: #263442;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c8d3dd;
  border-radius: 6px;
  background: #ffffff;
  color: #15202b;
}

input,
select {
  min-height: 42px;
  padding: 0 11px;
}

textarea {
  min-height: 120px;
  resize: vertical;
  padding: 11px;
  line-height: 1.45;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(26, 115, 232, 0.16);
  border-color: #1a73e8;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 800;
}

.primary {
  background: #12613a;
  color: #ffffff;
}

.primary:hover {
  background: #0f4f30;
}

.ghost,
.copy-row button {
  background: #223247;
  color: #ffffff;
}

.ghost:hover,
.copy-row button:hover {
  background: #111827;
}

.fine,
.status {
  margin: 0;
  color: #586879;
  line-height: 1.5;
}

.status {
  min-height: 24px;
  padding-top: 14px;
}

.status.error {
  color: #b42318;
}

.model-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.model-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding: 2px;
}

.model-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid #dae3eb;
  border-radius: 8px;
  padding: 11px;
  background: #fbfcfd;
}

.model-item input {
  min-height: 18px;
  margin-top: 2px;
}

.model-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.model-body strong,
.model-body small {
  overflow-wrap: anywhere;
}

.model-body small {
  color: #617184;
  font-weight: 650;
}

.empty {
  margin: 0;
  padding: 18px;
  color: #617184;
  background: #f7f9fb;
  border: 1px dashed #c8d3dd;
  border-radius: 8px;
}

.result {
  margin-top: 18px;
}

.outputs,
.snippets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.snippets {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.copy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.hidden {
  display: none;
}

@media (max-width: 860px) {
  .layout {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .topbar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .grid,
  .outputs,
  .snippets {
    grid-template-columns: 1fr;
  }

  .copy-row {
    grid-template-columns: 1fr;
  }
}
