:root {
  --primary-color: #2d6a4f;
  --primary-hover: #1b4332;
  --secondary-color: #52b788;
  --error-color: #d62828;
  --warning-color: #f77f00;
  --text-color: #1b4332;
  --text-light: #40916c;
  --bg-color: #f8f9fa;
  --card-bg: #ffffff;
  --border-color: #dee2e6;
  --focus-ring: rgba(45, 106, 79, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-light);
  font-size: 1rem;
}

form {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

label[for="acknowledgement"] {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 400;
}

input[type="text"],
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

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

.hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-light);
}

.char-count {
  float: right;
  font-size: 0.875rem;
  color: var(--text-light);
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin-top: 0;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-primary:disabled {
  background-color: var(--text-light);
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-block;
  background-color: var(--secondary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color 0.2s;
  border: none;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: var(--primary-color);
}

.btn-loading {
  margin-left: 0.5rem;
}

.success-message {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 2rem;
  border-radius: 8px;
  margin-top: 2rem;
  text-align: center;
}

.success-message h2 {
  margin-bottom: 1rem;
}

.success-message p {
  margin-bottom: 0.75rem;
}

.error-message {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 2rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.error-message h2 {
  margin-bottom: 1rem;
}

.error-message p {
  margin-bottom: 1rem;
}

footer {
  margin-top: 3rem;
  padding: 2rem;
  text-align: center;
  color: var(--text-light);
  font-size: 0.875rem;
}

footer a {
  color: var(--primary-color);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Validation states */
.invalid {
  border-color: var(--error-color) !important;
}

.success-field {
  border-color: var(--secondary-color) !important;
}

/* Responsive */
@media (max-width: 640px) {
  .container {
    padding: 1rem;
  }
  
  form {
    padding: 1.5rem 1rem;
  }
  
  header h1 {
    font-size: 1.5rem;
  }
  
  .char-count {
    display: block;
    float: none;
    margin-top: 0.25rem;
  }
}

/* Accessibility - hidden but available for screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
