::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f5f5f4; }
::-webkit-scrollbar-thumb { background: #d6d3d1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8a29e; }

/* Subtle scroll-reveal, applied via a small IntersectionObserver in footer.php */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
[data-reveal].reveal-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Per-metric accent color (set via inline --accent custom property) —
   Tailwind utilities can't express a dynamic per-instance color, so the
   hover fill/border/glow live here instead. */
.metric-card {
  border-top: 3px solid var(--accent);
}
.metric-card:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 28px -8px rgba(var(--accent-rgb), 0.35);
}
.metric-card:hover .metric-icon-badge {
  background-color: var(--accent);
  color: #fff;
}

/* ---------------------------------------------------------------------
   Form field system — every input/select/textarea/file control across the
   scholarship application flow (and any future long-form pages) shares
   these classes instead of repeating raw utility strings, so the whole
   flow reads as one deliberately designed system rather than a stack of
   default browser controls with a border slapped on.
   --------------------------------------------------------------------- */

.f-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #44403c;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}
.f-label .f-req { color: #e11d48; margin-left: 2px; }
.f-hint { font-size: 0.75rem; color: #a8a29e; margin-top: 0.375rem; }

.f-input {
  width: 100%;
  padding: 0.8rem 1.1rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: #1c1917;
  background-color: #fff;
  border: 1.5px solid #e7e5e4;
  border-radius: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.03);
}
textarea.f-input { resize: vertical; min-height: 3.5rem; }
.f-input::placeholder { color: #a8a29e; }
.f-input:hover { border-color: #d6d3d1; }
.f-input:focus {
  outline: none;
  border-color: #047857;
  box-shadow: 0 0 0 4px rgba(4, 120, 87, 0.12);
}
.f-input:disabled {
  background-color: #fafaf9;
  color: #a8a29e;
  border-style: dashed;
}

select.f-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px;
  padding-right: 2.75rem;
  cursor: pointer;
}

.f-file {
  display: block;
  width: 100%;
  font-size: 0.8125rem;
  color: #78716c;
  cursor: pointer;
}
.f-file::file-selector-button {
  margin-right: 1rem;
  padding: 0.6rem 1.15rem;
  border: none;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  background-color: #ecfdf5;
  color: #047857;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.f-file:hover::file-selector-button { background-color: #047857; color: #fff; }

.f-check {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: #047857;
  cursor: pointer;
  flex-shrink: 0;
}

/* Radio/checkbox choice cards (eligibility Yes/No, declaration items) —
   the whole row is clickable and visibly highlights the selected option
   instead of a bare browser radio dot sitting next to plain text. */
.f-choice {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 1rem;
  border: 1.5px solid #e7e5e4;
  border-radius: 0.875rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  font-size: 0.875rem;
  font-weight: 600;
  color: #44403c;
}
.f-choice:hover { border-color: #a7f3d0; background-color: #f0fdf9; }
.f-choice.is-checked, .f-choice:has(input:checked) { border-color: #047857; background-color: #ecfdf5; color: #065f46; }

/* Document upload row — each document reads as its own small card rather
   than a bare flex row separated by a hairline. */
.f-doc-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  padding: 1.1rem 1.25rem;
  border: 1.5px solid #f0efed;
  border-radius: 1rem;
  background-color: #fafaf9;
  transition: border-color 0.15s ease;
}
.f-doc-row:hover { border-color: #e7e5e4; }
.f-doc-row + .f-doc-row { margin-top: 0.75rem; }
/* Side-by-side once there's room for the label to breathe next to the
   file button (below this, the two rows in apply_step.php's Documents
   step were colliding down to zero width — see mobile QA notes). */
@media (min-width: 640px) {
  .f-doc-row { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* Step progress indicator */
.f-progress-step {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.f-progress-track {
  flex: 1;
  height: 2px;
  min-width: 1rem;
  background-color: #e7e5e4;
  border-radius: 2px;
}
.f-progress-track.is-done { background-color: #6ee7b7; }
