:root {
  --bg: #f7f2e8;
  --panel: rgba(255, 252, 247, 0.92);
  --panel-border: rgba(111, 79, 40, 0.15);
  --text: #2d2418;
  --muted: #6d5d48;
  --accent: #a85120;
  --accent-dark: #7e3913;
  --secondary: #ebe0cf;
  --success: #1c7c54;
  --error: #b42318;
  --shadow: 0 24px 60px rgba(91, 61, 31, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(218, 146, 78, 0.28), transparent 28%),
    radial-gradient(circle at bottom right, rgba(96, 130, 90, 0.2), transparent 28%),
    linear-gradient(135deg, #f3eadb 0%, #f9f5ee 45%, #efe4d1 100%);
}

.page {
  width: min(1100px, calc(100% - 32px));
  margin: 40px auto;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 24px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

h1,
h2 {
  margin: 0;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.05;
}

.intro {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.form {
  margin-top: 24px;
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  font-size: 0.95rem;
  font-weight: 700;
}

.checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(111, 79, 40, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.65);
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(111, 79, 40, 0.18);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.75);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(168, 81, 32, 0.7);
  box-shadow: 0 0 0 4px rgba(168, 81, 32, 0.12);
  transform: translateY(-1px);
}

small {
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 6px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button[type="submit"] {
  background: linear-gradient(135deg, var(--accent) 0%, #c56a31 100%);
  color: #fffaf4;
  box-shadow: 0 16px 32px rgba(168, 81, 32, 0.24);
}

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

.result-panel {
  display: flex;
  flex-direction: column;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
}

.status.idle {
  background: rgba(109, 93, 72, 0.12);
  color: var(--muted);
}

.status.loading {
  background: rgba(168, 81, 32, 0.14);
  color: var(--accent-dark);
}

.status.success {
  background: rgba(28, 124, 84, 0.12);
  color: var(--success);
}

.status.error {
  background: rgba(180, 35, 24, 0.12);
  color: var(--error);
}

pre {
  margin: 0;
  min-height: 420px;
  overflow: auto;
  border-radius: 18px;
  padding: 18px;
  background: #261b12;
  color: #fef4e8;
  line-height: 1.55;
  font-family: "Courier New", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 900px) {
  .page {
    grid-template-columns: 1fr;
  }

  pre {
    min-height: 280px;
  }
}
