:root {
  color-scheme: light;
  --background: #f7f8fb;
  --surface: #ffffff;
  --text: #19202a;
  --muted: #667085;
  --border: #d8dde8;
  --accent: #2364aa;
  --accent-soft: #e7f0fb;
  --ok: #0f8f67;
  --bad: #b42318;
  --shadow: 0 22px 60px rgba(25, 32, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(35, 100, 170, 0.14), transparent 34rem),
    linear-gradient(135deg, #f7f8fb 0%, #eef3f7 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.panel {
  width: min(100%, 720px);
  padding: clamp(22px, 5vw, 40px);
  background: var(--surface);
  border: 1px solid rgba(216, 221, 232, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.topline,
.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.brand {
  color: var(--text);
  font-weight: 700;
}

.status {
  min-width: 92px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  text-align: center;
  font-weight: 700;
}

.status[data-state="ok"] {
  background: #e8f6f0;
  color: var(--ok);
}

.status[data-state="bad"] {
  background: #fee4e2;
  color: var(--bad);
}

.status[data-state="idle"] {
  background: #eef1f6;
  color: var(--muted);
}

h1 {
  margin: 36px 0 10px;
  font-size: clamp(34px, 7vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

.hint {
  max-width: 54ch;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #edf1f5;
  color: var(--text);
}

.field {
  display: grid;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

textarea {
  width: 100%;
  min-height: 230px;
  resize: vertical;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  color: var(--text);
  background: #fbfcfe;
  font: 18px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(35, 100, 170, 0.14);
}

textarea:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.button {
  min-height: 42px;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: 700 14px/1 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
}

.button-primary:hover:not(:disabled) {
  background: #1c528d;
}

.button-secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(35, 100, 170, 0.14);
}

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

.action-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 14px;
}

.action-status[data-state="error"] {
  color: var(--bad);
}

.meta {
  margin-top: 16px;
}

@media (max-width: 560px) {
  .topline,
  .meta {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 34px;
  }

  .hint {
    font-size: 16px;
  }

  .actions {
    flex-wrap: wrap;
  }

  .button {
    flex: 1;
  }

  .action-status {
    flex-basis: 100%;
  }
}
