:root {
  --bg: #f5efe4;
  --panel: rgba(255, 250, 242, 0.92);
  --panel-border: rgba(81, 55, 32, 0.14);
  --text: #1f1308;
  --muted: #72573d;
  --accent: #0f7b6c;
  --accent-strong: #0a5a4f;
  --danger: #b33f28;
  --shadow: 0 24px 60px rgba(88, 63, 37, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 123, 108, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(179, 63, 40, 0.16), transparent 25%),
    linear-gradient(180deg, #fbf7f0 0%, var(--bg) 100%);
  min-height: 100vh;
}

.layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 60px;
}

.hero {
  margin-bottom: 24px;
}

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

h1, h2, h3 {
  margin: 0;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.95;
}

.lede {
  max-width: 720px;
  margin: 14px 0 0;
  font-size: 1.05rem;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

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

.panel-wide {
  margin-top: 18px;
}

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

.stack {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.95rem;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(81, 55, 32, 0.18);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
}

textarea {
  resize: vertical;
}

.checkbox {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

.checkbox input {
  width: auto;
  margin: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 10px 15px;
  cursor: pointer;
  background: var(--accent);
  color: #fffdf9;
  transition: transform 120ms ease, background 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  background: var(--accent-strong);
}

button.danger {
  background: var(--danger);
}

.output {
  min-height: 180px;
  margin: 0;
  padding: 14px;
  border-radius: 18px;
  background: #1f2628;
  color: #e8f5f3;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .layout {
    width: min(100% - 20px, 100%);
    padding-top: 24px;
  }

  .panel {
    padding: 16px;
    border-radius: 18px;
  }

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