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

:root {
  --green: #1a7a4a;
  --green-dark: #0f5233;
  --green-light: #e8f5ee;
  --green-mid: #5DCAA5;
  --link: #00A76D;
  --link-hover-decoration: none;
  --pink: #d4537e;
  --pink-dark: #993556;
  --pink-light: #fbeaf0;
  --black: #1a1a1a;
  --gray: #4a4a4a;
  --gray-light: #f4f3ef;
  --border: #d8d6ce;
  --border-focus: #1a7a4a;
  --white: #ffffff;
}

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: var(--gray-light);
  color: var(--black);
  line-height: 1.6;
  min-height: 100vh;
}

/* NAV */
.nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav-logo {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.nav-logo img { height: 72px; width: auto; display: block; }
.nav-back {
  font-size: 13px;
  color: var(--gray);
  text-decoration: none;
}
.nav-back:hover { color: var(--green); }

/* PROGRESS */
.progress-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 2rem;
}
.progress-inner { max-width: 600px; margin: 0 auto; }
.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.progress-title { font-size: 13px; font-weight: 600; color: var(--black); }
.progress-count { font-size: 12px; color: var(--gray); }
.progress-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* MAIN */
.main { padding: 2rem 1.25rem 4rem; }
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2rem;
  max-width: 600px;
  margin: 0 auto;
}

/* STEPS */
.step { display: none; }
.step.active { display: block; }

.step-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.5rem;
}
.step-heading {
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  color: var(--black);
  margin-bottom: 0.75rem;
  line-height: 1.25;
}
.step-body {
  font-size: 15px;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.step-body a { color: var(--link); font-weight: 600; text-decoration: underline; }
.step-body a:hover { text-decoration: none; }
.notice a { color: var(--link); font-weight: 600; text-decoration: underline; }
.notice a:hover { text-decoration: none; }

.notice {
  background: var(--green-light);
  border-left: 3px solid var(--green-mid);
  padding: 0.75rem 1rem;
  font-size: 14px;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  border-radius: 0 4px 4px 0;
}
.notice strong { color: var(--black); }

.grief-notice {
  background: var(--pink-light);
  border-left: 3px solid var(--pink);
  padding: 0.75rem 1rem;
  font-size: 14px;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  border-radius: 0 4px 4px 0;
}

/* FORM ELEMENTS */
.field-group { margin-bottom: 1.25rem; }

label.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 4px;
}
.field-hint {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 8px;
  line-height: 1.5;
}
.optional { font-weight: 400; color: var(--gray); font-size: 12px; margin-left: 4px; }

input[type="text"],
textarea {
  width: 100%;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(26,122,74,0.12);
}
textarea { min-height: 130px; resize: vertical; line-height: 1.65; }
textarea.short { min-height: 90px; }

.char-count {
  font-size: 12px;
  color: var(--gray);
  text-align: right;
  margin-top: 4px;
}

/* RADIO */
.radio-group { display: flex; flex-direction: column; gap: 8px; }
.checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  -webkit-user-select: none;
  user-select: none;
}
.checkbox-option:hover { border-color: var(--green-mid); background: var(--green-light); }
.checkbox-option input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--green);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  -webkit-user-select: none;
  user-select: none;
}
.radio-option:hover { border-color: var(--green-mid); background: var(--green-light); }
.radio-option.selected { border-color: var(--green); background: var(--green-light); }
.radio-option input[type="radio"] {
  margin-top: 2px;
  accent-color: var(--green);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
.radio-option .option-label { font-size: 14px; color: var(--black); line-height: 1.5; }

/* BUTTONS */
.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 1.75rem;
  align-items: center;
}
.btn-primary {
  background: var(--green);
  color: var(--white);
  border: none;
  padding: 11px 28px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  display: inline-block;
}
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary {
  background: transparent;
  color: var(--gray);
  border: 1px solid var(--border);
  padding: 11px 20px;
  font-size: 14px;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s;
  display: inline-block;
  text-decoration: none;
}
.btn-secondary:hover { border-color: var(--gray); color: var(--black); }

/* OUTPUT */
.output-block { margin-bottom: 1.5rem; }
.output-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.output-label-text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 8px;
}
.field-tag {
  background: var(--gray-light);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gray);
}
.output-text {
  background: var(--gray-light);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 13px 15px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--black);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: Georgia, serif;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  color: var(--link);
  background: var(--green-light);
  border: 1.5px solid var(--link);
  border-radius: 4px;
  padding: 8px 18px;
  cursor: pointer;
  margin-top: 8px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.copy-btn:hover { background: var(--link); color: var(--white); border-color: var(--link); }
.copy-btn.copied { background: var(--link); color: var(--white); border-color: var(--link); }
.copy-btn--inline { vertical-align: middle; }

/* PORTAL STEPS */
.portal-guide {
  background: var(--green-light);
  border: 1px solid #a8e6c8;
  border-radius: 6px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}
.portal-guide h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 1rem;
}
.portal-step {
  display: flex;
  gap: 12px;
  margin-bottom: 0.875rem;
  align-items: flex-start;
}
.portal-step:last-child { margin-bottom: 0; }
.portal-step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.portal-step-text {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.6;
}
.portal-step-text strong { color: var(--black); }
.portal-step-text a { color: var(--link); font-weight: 600; text-decoration: underline; }
.portal-step-text a:hover { text-decoration: none; }

.support-bar {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.875rem 1rem;
  font-size: 13px;
  color: var(--gray);
  line-height: 1.6;
  margin-top: 1.25rem;
}
.support-bar a { color: var(--link); font-weight: 600; text-decoration: underline; }
.support-bar a:hover { text-decoration: none; }


/* SUBMIT STEPS */
.submit-step {
  margin-bottom: 1.25rem;
}
.submit-step-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.submit-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.submit-step-title {
  font-size: 15px;
  color: var(--black);
  line-height: 1.5;
  padding-top: 4px;
}
.submit-step-title a { color: var(--link); font-weight: 600; text-decoration: underline; }
.submit-step-title a:hover { text-decoration: none; }
.submit-step-content {
  margin-left: 40px;
  margin-top: 0.5rem;
}
.submission-editor {
  width: 100%;
  min-height: 280px;
  font-family: Georgia, serif;
  font-size: 14px;
  line-height: 1.75;
  color: var(--black);
  background: var(--gray-light);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 13px 15px;
  resize: vertical;
  white-space: pre-wrap;
}
.submission-editor:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(26,122,74,0.12);
}

/* INFO BUTTON */
.info-btn {
  background: none;
  border: none;
  color: var(--green);
  cursor: pointer;
  font-size: 16px;
  padding: 0 2px;
  margin-left: auto;
  flex-shrink: 0;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.info-btn:hover { opacity: 1; }

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: 6px;
  padding: 1.75rem;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.modal-title {
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--black);
  margin-bottom: 1rem;
  padding-right: 1.5rem;
}
.modal-close {
  position: absolute;
  top: 0.875rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--gray);
  line-height: 1;
  padding: 2px 4px;
}
.modal-close:hover { color: var(--black); }
.modal-body p {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 0.875rem;
}
.modal-body p:last-child { margin-bottom: 0; }

.privacy-note {
  font-size: 12px;
  color: var(--gray);
  margin-top: 0.75rem;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .nav { padding: 0.875rem 1rem; }
  .nav-logo img { height: 40px; }
  .progress-header { padding: 0.75rem 1rem; }
  .main { padding: 1.25rem 0.75rem 4rem; }
  .card { padding: 1.5rem 1.25rem; }
}
