/* GrowthPath Advisory — Business Funding Application */

.app-wrap { max-width: 920px; margin: 0 auto; padding: 0 22px 80px; }

/* Top bar */
.app-topbar { border-bottom: 1px solid var(--gp-line); background: white; }
.app-topbar-inner { max-width: 920px; margin: 0 auto; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.app-topbar img { height: 28px; }
.app-topbar a.back { font-size: 13.5px; font-weight: 600; color: var(--gp-slate); }
.app-topbar a.back:hover { color: var(--gp-ink); }

/* Header */
.app-head { text-align: center; padding: 48px 0 36px; }
.app-head .eyebrow { display: block; margin-bottom: 14px; }
.app-head h1 { font-size: clamp(30px, 4vw, 42px); }
.app-head p { margin: 16px auto 0; max-width: 560px; color: var(--gp-slate); font-size: 16px; }

/* Section card */
.fsection { background: white; border: 1px solid var(--gp-line); border-radius: 14px; overflow: hidden; margin-bottom: 22px; }
.fsection-head { background: var(--gp-navy); color: white; padding: 14px 22px; display: flex; align-items: center; gap: 12px; }
.fsection-head .n { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--gp-blue-soft); }
.fsection-head h2 { font-size: 16px; font-weight: 700; color: white; letter-spacing: -0.01em; }
.fsection-head .opt { margin-left: auto; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.6); font-weight: 600; }
.fsection-body { padding: 24px 22px; }

/* Field grid */
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.fgrid .full { grid-column: 1 / -1; }
.fgrid .third { grid-column: span 1; }
@media (max-width: 640px) { .fgrid { grid-template-columns: 1fr; } .fgrid .full, .fgrid .third { grid-column: 1 / -1; } }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--gp-graphite); letter-spacing: -0.005em; }
.field label .req { color: var(--gp-warn); margin-left: 2px; }
.field .hint { font-size: 11.5px; color: var(--gp-mute); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 15px; color: var(--gp-ink);
  background: var(--gp-paper); border: 1px solid var(--gp-line); border-radius: 9px;
  padding: 12px 13px; width: 100%; transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.field textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--gp-mute); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gp-blue); background: white;
  box-shadow: 0 0 0 3px rgba(30,91,204,0.12);
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--gp-warn); }
.field .err { font-size: 11.5px; color: var(--gp-warn); display: none; }
.field.invalid .err { display: block; }

/* Sub-grid for City / State / Zip rows */
.subrow { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .subrow { grid-template-columns: 1fr; } }

/* Secure note for sensitive fields */
.secure-note { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--gp-good); font-weight: 600; }
.secure-note svg { width: 13px; height: 13px; }

/* Authorization */
.authbox { font-size: 12.5px; line-height: 1.65; color: var(--gp-slate); background: var(--gp-paper); border: 1px solid var(--gp-line); border-radius: 10px; padding: 18px 20px; max-height: 260px; overflow-y: auto; }
.consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; padding: 16px; border: 1px solid var(--gp-line); border-radius: 10px; background: white; }
.consent input[type=checkbox] { width: 20px; height: 20px; margin-top: 1px; flex-shrink: 0; accent-color: var(--gp-blue); cursor: pointer; }
.consent label { font-size: 13.5px; color: var(--gp-graphite); line-height: 1.5; cursor: pointer; }
.sig-row { display: grid; grid-template-columns: 1fr 220px; gap: 18px; margin-top: 20px; }
@media (max-width: 640px) { .sig-row { grid-template-columns: 1fr; } }
.sig-meta { font-size: 11.5px; color: var(--gp-mute); margin-top: 12px; }

/* Submit */
.app-submit { margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.app-submit .btn { width: 100%; max-width: 420px; justify-content: center; font-size: 16px; padding: 18px; }
.app-submit .btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.app-fineprint { font-size: 12px; color: var(--gp-mute); text-align: center; max-width: 540px; line-height: 1.5; }

/* Status banners */
.app-status { display: none; margin: 0 0 22px; padding: 16px 18px; border-radius: 10px; font-size: 14px; line-height: 1.5; }
.app-status.show { display: block; }
.app-status.ok { background: var(--gp-good-tint); border: 1px solid #BBF7D0; color: #14532D; }
.app-status.err { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }

/* Success screen */
.app-done { display: none; text-align: center; padding: 60px 0; }
.app-done.show { display: block; }
.app-done .check { width: 64px; height: 64px; border-radius: 999px; background: var(--gp-good-tint); color: var(--gp-good); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 22px; }
.app-done .check svg { width: 32px; height: 32px; }
.app-done h2 { margin-bottom: 12px; }
.app-done p { color: var(--gp-slate); max-width: 480px; margin: 0 auto; }

/* ============================================================
   WIZARD — one step at a time
   ============================================================ */
.wizard { max-width: 580px; margin: 0 auto; padding-top: 44px; }
.wiz-meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gp-mute); margin: 0 0 10px; }
.wiz-meta .t { color: var(--gp-blue); font-weight: 700; }
.wiz-progress { height: 6px; background: var(--gp-line-2); border-radius: 999px; overflow: hidden; margin-bottom: 38px; }
.wiz-bar { height: 100%; width: 25%; background: var(--gp-blue); border-radius: 999px; transition: width 340ms cubic-bezier(.4,0,.2,1); }

.step { display: none; }
.step.active { display: block; animation: stepin 300ms ease; }
@keyframes stepin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.step-title { font-size: clamp(23px, 3.2vw, 30px); letter-spacing: -0.02em; margin-bottom: 8px; }
.step-sub { color: var(--gp-slate); font-size: 15.5px; line-height: 1.5; margin-bottom: 28px; }

/* Wizard nav */
.wiz-nav { margin-top: 34px; }
.wiz-nav .btn-next, .wiz-nav .btn-submit { width: 100%; justify-content: center; font-size: 16px; padding: 17px; }
.wiz-back { display: block; width: 100%; text-align: center; margin-top: 16px; padding: 6px; background: none; border: none; color: var(--gp-slate); font-size: 14px; font-weight: 600; cursor: pointer; }
.wiz-back:hover { color: var(--gp-ink); }
.wiz-fineprint { font-size: 12px; color: var(--gp-mute); text-align: center; line-height: 1.5; margin-top: 18px; }

/* In the wizard, default to a single focused column; rows opt back into a grid */
.step .fgrid { grid-template-columns: 1fr; }
.step .fgrid .row2 { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
@media (max-width: 480px) { .step .fgrid .row2 { grid-template-columns: 1fr; } }

/* In-step subsections + conditional partner block */
.substep { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--gp-line); }
.substep-title { font-size: 16px; font-weight: 700; color: var(--gp-ink); margin-bottom: 4px; letter-spacing: -0.01em; }
.substep-sub { font-size: 13.5px; color: var(--gp-slate); margin-bottom: 20px; }
#partnerBlock { display: none; }
#partnerBlock.show { display: block; }
