:root {
  color-scheme: light;
  --bg: #f7f8f8;
  --panel: #ffffff;
  --text: #172026;
  --muted: #5d6970;
  --line: #d8dee2;
  --accent: #255f73;
  --accent-dark: #1b4655;
  --error: #9b2c2c;
}

* {
  box-sizing: border-box;
}

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

.app {
  width: min(980px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

h1 {
  margin: 0 0 24px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 700;
}

.form {
  display: grid;
  gap: 12px;
}

label {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  padding: 14px;
}

textarea:focus {
  outline: 2px solid rgb(37 95 115 / 22%);
  border-color: var(--accent);
}

textarea[readonly] {
  background: #fbfcfc;
}

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

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0 16px;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

button.secondary {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
}

button.secondary:hover {
  background: #eef2f3;
}

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

.status.error {
  color: var(--error);
}

@media (max-width: 640px) {
  .app {
    width: min(100vw - 20px, 980px);
    padding: 20px 0;
  }

  h1 {
    font-size: 28px;
  }

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

  button {
    width: 100%;
  }
}
