/* ============================================================
   Daisy Initiative — Roots & Rise Grant Program
   style.css — Complete Application Stylesheet
   Fonts: Playfair Display (headings) + DM Sans (body)
   No Bootstrap CSS — Bootstrap Icons CDN only
   ============================================================ */

/* ---- CSS Variables ---------------------------------------- */
:root {
  /* Green scale */
  --green-50:  #F0F7F4;
  --green-100: #D6EDE5;
  --green-200: #ACD9CB;
  --green-400: #52A882;
  --green-600: #2D6A4F;
  --green-700: #1F5C44;
  --green-800: #1B4332;  /* Primary */
  --green-900: #142E23;

  /* Gold accent */
  --gold:       #C9973F;
  --gold-light: #E8C27A;
  --gold-pale:  #FDF5E6;

  /* Neutrals */
  --bg:         #F0EDE6;  /* Warm parchment */
  --surface:    #FFFFFF;
  --border:     #D9D3C7;
  --border-light: #EDE8E0;

  /* Text */
  --text-primary:   #1A1A1A;
  --text-secondary: #4A4A4A;
  --text-muted:     #767676;

  /* Feedback */
  --error-color: #C0392B;
  --error-bg:    #FDF2F0;
  --info-color:  #1A5276;
  --info-bg:     #EAF2F8;

  /* Spacing & Shape */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --container-max: 740px;
  --transition-fast: 160ms ease;
  --transition-med:  260ms ease;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ---- Site Header ------------------------------------------ */
.site-header {
  background-color: var(--green-800);
  background-image:
    radial-gradient(circle at 10% 50%, rgba(201,151,63,.15) 0%, transparent 60%),
    radial-gradient(circle at 90% 20%, rgba(255,255,255,.04) 0%, transparent 50%);
  position: relative;
  overflow: hidden;
  padding: 24px 20px;
}
.site-header::before {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,.03);
}
.site-header::after {
  content: '';
  position: absolute;
  left: 40%; bottom: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(201,151,63,.07);
}
.site-header-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 1;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.site-brand-icon {
  width: 46px; height: 46px;
  background: rgba(201,151,63,.20);
  border: 1px solid rgba(201,151,63,.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--gold-light);
  flex-shrink: 0;
}
.site-brand-text { display: flex; flex-direction: column; }
.site-brand-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
}
.site-brand-sub {
  font-size: 0.8rem;
  color: var(--gold-light);
  letter-spacing: 0.03em;
  margin-top: 2px;
}
.site-header-badge {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,.75);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  padding: 6px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* ---- Progress Bar ----------------------------------------- */
.progress-bar-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  padding: 16px 20px;
}
.progress-bar-inner {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.progress-node {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-med), color var(--transition-med), box-shadow var(--transition-med);
}
.progress-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  transition: color var(--transition-med);
}
.progress-step.is-active .progress-node {
  background: var(--green-800);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(27,67,50,.15);
}
.progress-step.is-active .progress-label { color: var(--green-800); font-weight: 600; }
.progress-step.is-done .progress-node {
  background: var(--green-600);
  color: #fff;
}
.progress-step.is-done .progress-label { color: var(--green-600); }
.progress-connector {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 6px;
  margin-bottom: 20px;
  border-radius: 2px;
  transition: background var(--transition-med);
}
.progress-connector.is-done { background: var(--green-600); }

/* ---- Main Content ----------------------------------------- */
.main-content {
  min-height: calc(100vh - 120px);
  padding: 36px 20px 60px;
}

/* ---- Step Panels ------------------------------------------ */
.step-panel {
  display: none;
  max-width: var(--container-max);
  margin: 0 auto;
  animation: panelIn 300ms ease both;
}
.step-panel.is-active { display: block; }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Panel Header ----------------------------------------- */
.panel-header {
  text-align: center;
  margin-bottom: 32px;
}
.panel-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--green-800);
  line-height: 1.25;
  margin-bottom: 8px;
}
.panel-subtitle {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

/* ---- Grant Highlight Box ---------------------------------- */
.grant-highlight {
  background: var(--green-800);
  background-image: radial-gradient(circle at 80% 50%, rgba(201,151,63,.18) 0%, transparent 65%);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.grant-highlight::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.grant-highlight-amount {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.4rem, 8vw, 3.5rem);
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 6px;
  position: relative;
}
.grant-highlight-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,.80);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.grant-highlight-note {
  font-size: 0.8438rem;
  color: rgba(255,255,255,.60);
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ---- Info Sections ---------------------------------------- */
.info-section {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.info-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--green-800);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-section p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-size: 0.9375rem;
}
.info-section p:last-child { margin-bottom: 0; }

/* Eligibility Grid */
.eligibility-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}
.eligibility-card {
  border: 1px solid var(--green-100);
  background: var(--green-50);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}
.eligibility-icon {
  font-size: 1.6rem;
  color: var(--green-600);
  display: block;
  margin-bottom: 10px;
}
.eligibility-card-title {
  font-weight: 600;
  color: var(--green-800);
  font-size: 0.9375rem;
  margin-bottom: 6px;
}
.eligibility-card-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Notice Boxes */
.notice-box {
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  margin-top: 16px;
}
.notice-box i { flex-shrink: 0; margin-top: 2px; font-size: 1rem; }
.notice-info {
  background: var(--info-bg);
  border: 1px solid rgba(26,82,118,.18);
  color: var(--info-color);
}
.notice-box strong { font-weight: 600; }

/* Notice list */
.notice-list {
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.notice-list li { margin-bottom: 8px; line-height: 1.55; }
.notice-list li:last-child { margin-bottom: 0; }

/* Doc Checklist */
.doc-group { margin-bottom: 20px; }
.doc-group:last-child { margin-bottom: 0; }
.doc-group-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}
.doc-checklist { list-style: none; padding: 0; }
.doc-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}
.doc-checklist-item:last-child { border-bottom: none; padding-bottom: 0; }
.doc-check {
  color: var(--green-600);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.doc-checklist-item strong { display: block; color: var(--text-primary); font-weight: 600; }
.doc-note {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Terms Scroll */
.terms-scroll {
  height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  font-size: 0.8438rem;
  color: var(--text-secondary);
  line-height: 1.6;
  background: #FAFAF9;
  margin-bottom: 20px;
}
.terms-scroll h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 16px 0 6px;
}
.terms-scroll h3:first-child { margin-top: 0; }
.terms-scroll p { margin-bottom: 10px; }
.terms-scroll::-webkit-scrollbar { width: 5px; }
.terms-scroll::-webkit-scrollbar-track { background: transparent; }
.terms-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Terms Acknowledge */
.terms-acknowledge { margin-top: 4px; }
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.checkbox-input { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox-custom {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.checkbox-input:checked + .checkbox-custom {
  background: var(--green-800);
  border-color: var(--green-800);
}
.checkbox-input:checked + .checkbox-custom::after {
  content: '';
  display: block;
  width: 5px; height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}
.checkbox-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---- Form Sections ---------------------------------------- */
.form-section {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.form-section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--green-800);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

/* Field rows */
.frow { margin-bottom: 20px; }
.frow:last-child { margin-bottom: 0; }
.frow-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.frow-3 {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr;
  gap: 20px;
}

.field-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 7px;
}
.req { color: var(--error-color); }
.optional-tag {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}
.field-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 5px;
  display: flex;
  align-items: flex-start;
  gap: 5px;
}
.field-hint i { flex-shrink: 0; margin-top: 2px; }

/* Inputs */
.finput, .fselect, .ftextarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--surface);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
}
.finput:focus, .fselect:focus, .ftextarea:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(27,67,50,.10);
}
.finput.is-err, .fselect.is-err, .ftextarea.is-err {
  border-color: var(--error-color);
  box-shadow: 0 0 0 3px rgba(192,57,43,.08);
}
.finput::placeholder, .ftextarea::placeholder { color: var(--text-muted); }
.finput-narrow { max-width: 180px; }

.fselect {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23767676' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
.ftextarea { resize: vertical; min-height: 110px; line-height: 1.6; }

.char-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
}
.char-count.is-warn { color: var(--gold); }
.char-count.is-max  { color: var(--error-color); }

.ferror {
  font-size: 0.8125rem;
  color: var(--error-color);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 18px;
}

/* Radio Cards */
.radio-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.radio-card { position: relative; cursor: pointer; }
.radio-card input[type="radio"] {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.radio-card-body {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  text-align: center;
  background: var(--surface);
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}
.radio-card-body i {
  font-size: 1.5rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
  transition: color var(--transition-fast);
}
.radio-card-title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.radio-card-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.radio-card:hover .radio-card-body {
  border-color: var(--green-400);
  background: var(--green-50);
}
.radio-card input:checked + .radio-card-body {
  border-color: var(--green-700);
  background: var(--green-50);
  box-shadow: 0 0 0 3px rgba(27,67,50,.10);
}
.radio-card input:checked + .radio-card-body i { color: var(--green-700); }

/* Radio Inline */
.radio-inline-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.radio-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--text-primary);
  user-select: none;
}
.radio-inline input[type="radio"] {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.radio-inline-mark {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--transition-fast);
}
.radio-inline input:checked + .radio-inline-mark {
  border-color: var(--green-700);
  background: var(--green-700);
  box-shadow: inset 0 0 0 3px var(--surface);
}

/* ---- Upload Zones ----------------------------------------- */
.upload-section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--green-800);
  margin-bottom: 6px;
}
.upload-section-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.upload-zone {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}
.upload-zone:last-of-type { margin-bottom: 0; }
.upload-zone.is-err { border-color: var(--error-color); }

.upload-zone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  background: #FAFAF9;
}
.upload-zone-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.upload-zone-label i { color: var(--green-600); }
.upload-required-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--error-bg);
  color: var(--error-color);
  border: 1px solid rgba(192,57,43,.15);
}
.upload-optional-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--green-50);
  color: var(--green-700);
  border: 1px solid var(--green-100);
}
.upload-zone-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0 18px 10px;
  padding-top: 10px;
}
.upload-zone-body { padding: 14px 18px 16px; }

.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 22px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  position: relative;
}
.upload-area:hover, .upload-area.drag-over {
  border-color: var(--green-400);
  background: var(--green-50);
}
.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}
.upload-area-icon {
  font-size: 1.6rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}
.upload-area-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.upload-area-text strong { color: var(--green-700); }
.upload-area-hint {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-top: 5px;
  display: block;
}

/* File info row (shown after upload) */
.file-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 10px;
}
.file-info-row.hidden { display: none; }
.file-info-row i { color: var(--green-600); font-size: 1rem; flex-shrink: 0; }
.file-name-text {
  font-size: 0.875rem;
  color: var(--green-800);
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 2px;
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
  flex-shrink: 0;
}
.file-remove-btn:hover { color: var(--error-color); }

/* ---- Review Card ------------------------------------------ */
.review-card {
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 28px;
}
.review-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--green-800);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--green-100);
}
.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}
.review-item { display: flex; flex-direction: column; gap: 2px; }
.review-item-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.review-item-value {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* Certification */
.cert-section {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-top: 20px;
  box-shadow: var(--shadow-sm);
}
.cert-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}

/* Conditional doc blocks */
.conditional-docs {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.conditional-docs.hidden { display: none; }

/* ---- Global Form Error ------------------------------------ */
#form-global-error {
  display: none;
  background: var(--error-bg);
  border: 1px solid rgba(192,57,43,.25);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 0.875rem;
  color: var(--error-color);
  margin-top: 20px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
#form-global-error.hidden { display: none !important; }

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn:disabled, .btn.is-loading { opacity: 0.65; cursor: not-allowed; pointer-events: none; }
.btn-primary {
  background: var(--green-800);
  color: #fff;
  box-shadow: 0 2px 8px rgba(27,67,50,.25);
}
.btn-primary:hover {
  background: var(--green-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(27,67,50,.30);
}
.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover {
  background: var(--border-light);
  border-color: var(--text-muted);
}
.btn-lg { padding: 13px 32px; font-size: 1rem; }

.is-loading .btn-text { visibility: hidden; }
.is-loading::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Step Actions */
.step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.step-actions .btn-primary { margin-left: auto; }

/* ---- Loading Overlay -------------------------------------- */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(240,237,230,.90);
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.loading-overlay.is-active { display: flex; }
.loading-spinner {
  width: 52px; height: 52px;
  border: 4px solid rgba(27,67,50,.15);
  border-top-color: var(--green-800);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loading-text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--green-800);
}

/* ---- Success Screen --------------------------------------- */
.success-screen {
  display: none;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 20px;
  animation: panelIn 400ms ease both;
}
.success-screen.is-active { display: block; }
.success-icon-wrap {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--green-50);
  border: 2px solid var(--green-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 2.2rem;
  color: var(--green-700);
}
.success-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  font-weight: 700;
  color: var(--green-800);
  margin-bottom: 12px;
}
.success-subtitle {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.6;
}
.success-ref-box {
  background: var(--green-800);
  border-radius: var(--radius-md);
  padding: 20px 28px;
  margin-bottom: 28px;
  display: inline-block;
  min-width: 280px;
}
.success-ref-label {
  font-size: 0.775rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  margin-bottom: 6px;
}
.success-ref-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.04em;
}
.success-next {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 22px 28px;
  text-align: left;
  box-shadow: var(--shadow-sm);
}
.success-next-title {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.success-next ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.success-next li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.success-next li i {
  color: var(--green-600);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---- Responsive ------------------------------------------- */
@media (max-width: 640px) {
  .site-header-badge { display: none; }
  .eligibility-grid  { grid-template-columns: 1fr; }
  .radio-card-grid   { grid-template-columns: 1fr; }
  .frow-2, .frow-3   { grid-template-columns: 1fr; }
  .review-grid       { grid-template-columns: 1fr; }
  .info-section,
  .form-section,
  .conditional-docs  { padding: 20px 16px; }
  .grant-highlight   { padding: 24px 18px; }
  .step-actions      { flex-direction: column; }
  .step-actions .btn { width: 100%; justify-content: center; }
  .step-actions .btn-primary { margin-left: 0; }
}

@media (max-width: 380px) {
  .progress-label { display: none; }
  .main-content   { padding: 20px 12px 48px; }
}
