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

* {
  box-sizing: border-box;
}

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

button,
a {
  font: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.panel {
  width: min(920px, 100%);
  background: #ffffff;
  border: 1px solid #d9dde5;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(29, 35, 45, 0.08);
  padding: 28px;
}

.header,
.section-heading,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header {
  padding-bottom: 20px;
  border-bottom: 1px solid #e7eaf0;
}

.eyebrow {
  margin: 0 0 6px;
  color: #5c6472;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: 0;
}

.pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
}

.pill.neutral {
  color: #394150;
  background: #eef1f6;
  border-color: #d8dde7;
}

.pill.ok {
  color: #075c46;
  background: #e6f6ef;
  border-color: #a9e0cc;
}

.pill.error {
  color: #8a1f1f;
  background: #fff0f0;
  border-color: #f0b8b8;
}

.state {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0 4px;
  color: #4b5563;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #d5dbe5;
  border-top-color: #2f6fed;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.summary-row {
  min-width: 0;
  border: 1px solid #e4e8ef;
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfe;
}

.summary-row span {
  display: block;
  color: #677082;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.summary-row strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 700;
}

.section {
  margin-top: 22px;
}

.codebox {
  min-height: 86px;
  max-height: 240px;
  overflow: auto;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  background: #111827;
  color: #e5e7eb;
  padding: 14px;
  margin-top: 10px;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.codebox.empty {
  background: #f7f8fb;
  color: #697386;
}

.actions {
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e7eaf0;
}

button,
.secondary {
  min-height: 38px;
  border-radius: 7px;
  border: 1px solid #cbd3df;
  padding: 8px 13px;
  background: #ffffff;
  color: #17191d;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
}

button:hover,
.secondary:hover {
  background: #f2f5f9;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 680px) {
  .panel {
    padding: 20px;
  }

  .header {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 25px;
  }

  .summary {
    grid-template-columns: 1fr;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .actions button,
  .actions a {
    text-align: center;
  }
}
