:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --panel: #ffffff;
  --text: #18202c;
  --muted: #627084;
  --border: #d9e0ea;
  --accent: #176b5d;
  --accent-strong: #0e5147;
  --danger: #a33131;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
  letter-spacing: 0;
}

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

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 20px 60px rgb(24 32 44 / 8%);
}

.brand {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 8px;
  font-size: 32px;
  line-height: 1.15;
}

.form {
  margin-top: 28px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
}

input {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 116px;
  margin-top: 14px;
  padding: 12px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  background: var(--accent-strong);
}

button.secondary {
  margin-top: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
}

button.secondary:hover,
button.secondary:focus-visible {
  background: #eef3f4;
}

.status {
  min-height: 22px;
  margin-top: 14px;
  color: var(--muted);
}

.status[data-kind="error"] {
  color: var(--danger);
}

.result {
  margin-top: 18px;
}

.result-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

h2 {
  font-size: 22px;
}

.meta {
  color: var(--muted);
  font-size: 13px;
}

.profile {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

h3 {
  font-size: 17px;
  line-height: 1.3;
}

.profile .meta {
  margin-top: 4px;
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 20px, 880px);
    padding: 20px 0;
  }

  .panel {
    padding: 18px;
  }

  h1 {
    font-size: 26px;
  }

  .code-row,
  .result-header {
    grid-template-columns: 1fr;
    display: grid;
  }
}
