:root {
  color-scheme: light;
  --bg: #f3efe6;
  --panel: rgba(255, 252, 245, 0.92);
  --border: rgba(48, 42, 33, 0.12);
  --text: #1f1a14;
  --muted: #6b6256;
  --accent: #be3f2f;
  --accent-dark: #8f2c1f;
  --shadow: 0 24px 60px rgba(56, 40, 22, 0.12);
}

* {
  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(190, 63, 47, 0.14), transparent 24rem),
    radial-gradient(circle at bottom right, rgba(146, 106, 52, 0.16), transparent 28rem),
    linear-gradient(180deg, #faf6ee 0%, var(--bg) 100%);
}

.page {
  width: min(960px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.hero {
  margin-bottom: 1.5rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 0.95;
}

.lead {
  max-width: 42rem;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--muted);
}

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

form.card,
.result {
  padding: 1.25rem;
}

.label {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
}

.controls-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.field {
  min-width: 0;
}

input,
select,
button,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(48, 42, 33, 0.14);
  border-radius: 16px;
  background: #fffdf8;
  color: var(--text);
}

input {
  min-height: 3.5rem;
  padding: 0 1rem;
}

select {
  min-height: 3.5rem;
  padding: 0 1rem;
}

textarea {
  min-height: 24rem;
  padding: 1rem;
  resize: vertical;
  line-height: 1.5;
}

button {
  border: 0;
  border-radius: 16px;
  padding: 0 1.1rem;
  min-height: 3.5rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff8f5;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  transition: transform 120ms ease, opacity 120ms ease;
}

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

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

.status,
.meta {
  margin: 0.85rem 0 0;
  color: var(--muted);
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.result-header h2 {
  margin: 0;
  font-size: 1.4rem;
}

.result-actions {
  display: flex;
  gap: 0.75rem;
}

.small {
  margin-bottom: 0.45rem;
  font-size: 0.82rem;
}

@media (max-width: 700px) {
  .page {
    width: min(100% - 1rem, 960px);
    padding-top: 1.25rem;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  .controls-row {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }

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

  .result-actions {
    flex-direction: column;
  }
}
