:root {
  --bg: #f5f1e8;
  --card: #ffffff;
  --text: #1f1a17;
  --muted: #4a3f38;
  --accent: #2f6d6a;
  --accent-strong: #1f4a47;
  --error: #a72929;
  --border: #c4b9ad;
  --focus: #0043ce;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Fraunces", "Georgia", serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 10%, #fff7e6, var(--bg));
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px 64px;
}

.page {
  width: min(900px, 100%);
  display: grid;
  gap: 24px;
}

header {
  text-align: left;
}

h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  margin: 0 0 8px;
  letter-spacing: 0.5px;
}

p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 16px 40px rgba(31, 26, 23, 0.12);
}

form {
  display: grid;
  gap: 18px;
}

.row {
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

label {
  font-weight: 600;
  display: inline-block;
  margin-bottom: 6px;
}

.required {
  color: var(--error);
  margin-left: 2px;
}

.field {
  display: grid;
}

.radio-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px;
}

.radio-option input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.radio-option input[type="radio"]:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.radio-option label {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
  padding: 4px 0;
}

.checkbox-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px;
}

.checkbox-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.checkbox-option input[type="checkbox"]:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.checkbox-option label {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
  padding: 4px 0;
}

input,
textarea {
  font: inherit;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fffdf9;
  color: var(--text);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--focus);
}

input[type="date"]:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--focus);
}

.hint {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 6px;
}

.error {
  color: var(--error);
  font-size: 0.95rem;
  margin-top: 6px;
  font-weight: 600;
}

.error[aria-hidden="true"] {
  display: none;
}

.error-summary {
  background: #fef2f2;
  border: 2px solid var(--error);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
}

.error-summary h2 {
  color: var(--error);
  font-size: 1.1rem;
  margin: 0 0 8px;
}

.error-summary ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text);
}

.error-summary[aria-hidden="true"] {
  display: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

button {
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  min-height: 44px;
  font-weight: 700;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(47, 109, 106, 0.3);
  background: var(--accent-strong);
}

button:focus {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.success {
  color: var(--accent-strong);
  font-weight: 600;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
