/*
  Sinioo — Apply Page CSS (v2 / brand new)
  Modern, responsive, multi-identity-type application flow
*/

/* ============================================================
   RESET & VARIABLES
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --text:       #0a0a0a;
  --text2:      #111827;
  --sub:        #6b7280;
  --muted:      #9ca3af;
  --border:     #e5e7eb;
  --white:      #ffffff;
  --light:      #f9fafb;
  --code:       #f3f4f6;

  --c-company:  #3b5bf4;
  --c-org:      #7c3aed;
  --c-citizen:  #d97706;
  --c-ok:       #16a34a;
  --c-error:    #dc2626;

  --radius-sm:  10px;
  --radius:     14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-sm:  0 2px 8px rgba(0,0,0,.06);
  --shadow:     0 8px 28px rgba(0,0,0,.09);
  --shadow-lg:  0 16px 48px rgba(0,0,0,.12);

  --transition: .22s ease;
  --transition-fade: .3s ease;
  --gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

html { scroll-behavior: smooth; }

/* Body variant — small caret removed by nav padding */
body { font-family:'Inter', sans-serif; background: var(--white); color: var(--text); overflow-x: hidden; }

/* ============================================================
   AUTH GATE
   ============================================================ */
.ap-auth-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  overflow: hidden;
}

.ap-auth-gate[hidden] { display: none; }

/* Ambient rings */
.ap-gate-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
  animation: gatePulse 4s ease-in-out infinite;
  pointer-events: none;
}
.ap-gate-ring-1 { width: 480px; height: 480px; top: 50%; left: 50%; transform: translate(-50%,-50%); animation-delay: 0s; }
.ap-gate-ring-2 { width: 600px; height: 600px; top: 50%; left: 50%; transform: translate(-50%,-50%); animation-delay: .6s; }
.ap-gate-ring-3 { width: 740px; height: 740px; top: 50%; left: 50%; transform: translate(-50%,-50%); animation-delay: 1.2s; }

@keyframes gatePulse {
  0%, 100% { opacity:.18; transform: translate(-50%,-50%) scale(1); }
  50%        { opacity:.38; transform: translate(-50%,-50%) scale(1.04); }
}

.ap-auth-gate-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 3rem 2rem;
  max-width: 440px;
  width: 100%;
  animation: gateFadeIn .5s ease both;
}
@keyframes gateFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ap-gate-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  margin-bottom: 1.5rem;
}
.ap-logo-sm img { width:40px; height:40px; border-radius:12px; object-fit:cover; }

.ap-beta-badge {
  display: inline-flex;
  align-items: center;
  padding: .22rem .6rem;
  background: var(--text);
  color: var(--white);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 999px;
}

.ap-gate-icon {
  width: 88px; height: 88px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f4ff, #e0e7ff);
  border-radius: 24px;
  color: var(--c-company);
}
.ap-gate-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: .85rem;
}
.ap-gate-text {
  font-size: 1rem;
  color: var(--sub);
  line-height: 1.75;
  font-weight: 450;
  margin-bottom: 2rem;
}

.ap-gate-actions {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.ap-gate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.75rem;
  border-radius: 14px;
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: all var(--transition);
  letter-spacing: -.01em;
}
.ap-gate-btn-main {
  background: #0a0a0a;
  color: var(--white);
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.ap-gate-btn-main:hover { opacity:.92; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.28); }
.ap-gate-btn-ghost {
  background: var(--white);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.ap-gate-btn-ghost:hover { color: var(--c-company); border-color: var(--c-company); background: #f0f4ff; }


/* ============================================================
   LOADING SPINNER
   ============================================================ */
.ap-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--white);
}
.ap-loading-overlay[hidden] { display: none; }

.ap-spinner svg {
  animation: apSpin .8s linear infinite;
  color: var(--text);
}
.ap-loading-text {
  font-size: .95rem;
  color: var(--sub);
  font-weight: 500;
}
@keyframes apSpin { to { transform: rotate(360deg); } }

/* ============================================================
   HERO — compact, no nav-spill
   ============================================================ */
.ap-hero {
  position: relative;
  padding: 52px 1.5rem 28px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.ap-hero-inner {
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
}
.ap-hero::before {
  content: '';
  display: block;
  width: 32px;
  height: 3px;
  background: var(--c-company);
  border-radius: 2px;
  margin: 0 auto .45rem;
}
.ap-eyebrow {
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.ap-hero-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.55rem, 4vw, 2.25rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin: .25rem 0 0;
}
.ap-hero-title em { font-style: italic; color: var(--c-company); }
.ap-hero-sub {
  font-size: .88rem;
  color: var(--sub);
  line-height: 1.55;
  font-weight: 450;
  margin: .4rem 0 0;
}

/* ============================================================
   SECTIONS (shared)
   ============================================================ */
.ap-section {
  padding: 2.5rem 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
}
.ap-section.ap-type-section {
  padding-top: 1.2rem;
}
.ap-section:last-child { border-bottom: none; }
.ap-section-inner { max-width: 820px; margin: 0 auto; }

.ap-step-label {
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .55rem;
}
.ap-section-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.025em;
  margin-bottom: .75rem;
}
.ap-section-title em { font-style: italic; }
.ap-section-sub {
  font-size: 1rem;
  color: var(--sub);
  line-height: 1.75;
  font-weight: 450;
  margin-bottom: 2.5rem;
}
.ap-section-sub .ap-req { color: var(--c-error); }

/* ============================================================
   IDENTITY TYPE CARDS — compact grid
   ============================================================ */
.ap-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: .75rem 1.5rem 2rem;
  max-width: 960px;
  margin: 0 auto;
}

.ap-type-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1.65rem 1.35rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  font-family: inherit;
  transition: box-shadow var(--transition), transform var(--transition);
  animation: cardIn .5s ease both;
}
.ap-type-card:nth-child(1) { animation-delay: .05s; }
.ap-type-card:nth-child(2) { animation-delay: .12s; }
.ap-type-card:nth-child(3) { animation-delay: .19s; }
@keyframes cardIn {
  from { opacity:0; transform:translateY(14px); }
  to   { opacity:1; transform:translateY(0); }
}
.ap-type-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.ap-coming-soon-panel {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 1rem;
  background: rgba(15,23,42,.42);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px) scale(.98);
  transition: opacity .25s ease, transform .25s ease;
}
.ap-coming-soon-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.ap-coming-soon-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.ap-coming-soon-card {
  display: grid;
  gap: 1rem;
  width: min(100%, 860px);
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-xl);
  background: #ffffff;
  color: var(--text);
  border: 1px solid rgba(15,23,42,.12);
  box-shadow: 0 36px 68px rgba(15,23,42,.12);
}
.ap-coming-soon-pill {
  display: inline-flex;
  padding: .34rem .9rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--c-company);
  background: rgba(99,102,241,.16);
}
.ap-coming-soon-title {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
}
.ap-coming-soon-copy {
  margin: 0;
  color: var(--text);
  line-height: 1.75;
  font-size: .96rem;
}
.ap-coming-soon-close.ap-coming-soon-close-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.12);
  background: var(--white);
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.ap-coming-soon-close.ap-coming-soon-close-icon:hover {
  transform: scale(1.02);
  background: rgba(15,23,42,.05);
  border-color: rgba(15,23,42,.18);
}

.ap-type-card.active {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  border-color: var(--text);
}

.ap-type-card .ap-type-glow {
  position: absolute;
  top: -30px; right: -20px;
  width: 140px; height: 140px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.ap-type-card:hover .ap-type-glow { opacity: 1; }

/*─ Company ─*/
.ap-type-card-company { border-color: #dbe0fb; }
.ap-type-card-company:hover { border-color: #a3b0fe; box-shadow: var(--shadow), 0 0 0 3px rgba(99,102,241,.12); }
.ap-type-card-company .ap-type-glow { background: radial-gradient(circle, rgba(99,102,241,.18), transparent 70%); }
.ap-type-card-company .ap-type-icon { color: var(--c-company); }
.ap-type-card-company .ap-type-cta { color: var(--c-company); }

/*─ Organization ─*/
.ap-type-card-org { border-color: #e9d5fe; }
.ap-type-card-org:hover { border-color: #c4b5fd; box-shadow: var(--shadow), 0 0 0 3px rgba(124,58,237,.12); }
.ap-type-card-org .ap-type-glow { background: radial-gradient(circle, rgba(124,58,237,.18), transparent 70%); }
.ap-type-card-org .ap-type-icon { color: var(--c-org); }
.ap-type-card-org .ap-type-cta { color: var(--c-org); }

/*─ Citizen ─*/
.ap-type-card-citizen { border-color: #fce7c8; }
.ap-type-card-citizen:hover { border-color: #fbbf24; box-shadow: var(--shadow), 0 0 0 3px rgba(217,119,6,.12); }
.ap-type-card-citizen .ap-type-glow { background: radial-gradient(circle, rgba(217,119,6,.18), transparent 70%); }
.ap-type-card-citizen .ap-type-icon { color: var(--c-citizen); }
.ap-type-card-citizen .ap-type-cta { color: var(--c-citizen); }

.ap-type-card.active {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  border-color: var(--text);
}

.ap-type-top {
  display: flex;
  align-items: center;
  gap: .55rem;
}
.ap-type-icon {
  width: 42px; height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light);
  border-radius: 11px;
  flex-shrink: 0;
}
.ap-type-label {
  font-size: .9rem;
  font-weight: 800;
  color: var(--text);
}
.ap-type-desc {
  font-size: .83rem;
  color: var(--sub);
  line-height: 1.6;
  font-weight: 450;
}
.ap-type-desc::after { content: ''; display: block; }

.ap-type-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .28rem;
  margin-top: .1rem;
}
.ap-type-tags span {
  font-size: .68rem;
  font-weight: 700;
  padding: .16rem .48rem;
  border-radius: 999px;
  background: var(--light);
  border: 1px solid var(--border);
  color: var(--muted);
  letter-spacing: .01em;
}

.ap-type-cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: .3rem;
  padding-top: .6rem;
  font-size: .8rem;
  font-weight: 700;
  border-top: 1px solid var(--border);
}
.ap-type-cta svg { flex-shrink: 0; }

@media (max-width: 768px) {
  .ap-card-grid {
    grid-template-columns: 1fr;
    gap: .8rem;
    padding: 2rem 1.25rem 2.5rem;
  }
  .ap-type-card { padding: 1.35rem 1.2rem; }
  .ap-type-top { gap: .5rem; }
  .ap-type-icon { width: 38px; height: 38px; border-radius: 9px; }
  .ap-hero { padding: 64px 1.25rem 28px; }
  .ap-hero-sub { font-size: .9rem; line-height: 1.6; }
}

/* ============================================================
   FORM SECTION
   ============================================================ */
.ap-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.ap-type-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: 2rem 1.5rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  font-family: inherit;
  transition: all var(--transition);
  animation: cardIn .6s ease both;
}
.ap-type-card:nth-child(1) { animation-delay: .05s; }
.ap-type-card:nth-child(2) { animation-delay: .12s; }
.ap-type-card:nth-child(3) { animation-delay: .19s; }
@keyframes cardIn {
  from { opacity:0; transform:translateY(18px); }
  to   { opacity:1; transform:translateY(0); }
}

.ap-type-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.ap-type-card .ap-type-glow {
  position: absolute;
  top: -40px; right: -30px;
  width: 180px; height: 180px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}

.ap-type-card:hover .ap-type-glow { opacity: 1; }

/*─ Company ─*/
.ap-type-card-company { border-color: #dbe0fb; }
.ap-type-card-company:hover { border-color: #a3b0fe; box-shadow: var(--shadow), 0 0 0 3px rgba(99,102,241,.12); }
.ap-type-card-company .ap-type-glow { background: radial-gradient(circle, rgba(99,102,241,.2), transparent 70%); }
.ap-type-card-company .ap-type-icon { color: var(--c-company); }
.ap-type-card-company .ap-type-cta { color: var(--c-company); }

/*─ Organization ─*/
.ap-type-card-org { border-color: #e9d5fe; }
.ap-type-card-org:hover { border-color: #c4b5fd; box-shadow: var(--shadow), 0 0 0 3px rgba(124,58,237,.12); }
.ap-type-card-org .ap-type-glow { background: radial-gradient(circle, rgba(124,58,237,.2), transparent 70%); }
.ap-type-card-org .ap-type-icon { color: var(--c-org); }
.ap-type-card-org .ap-type-cta { color: var(--c-org); }

/*─ Citizen ─*/
.ap-type-card-citizen { border-color: #fce7c8; }
.ap-type-card-citizen:hover { border-color: #fbbf24; box-shadow: var(--shadow), 0 0 0 3px rgba(217,119,6,.12); }
.ap-type-card-citizen .ap-type-glow { background: radial-gradient(circle, rgba(217,119,6,.2), transparent 70%); }
.ap-type-card-citizen .ap-type-icon { color: var(--c-citizen); }
.ap-type-card-citizen .ap-type-cta { color: var(--c-citizen); }

.ap-type-top {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.ap-type-icon {
  width: 46px; height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border-radius: 13px;
  flex-shrink: 0;
}
.ap-type-label {
  font-size: .95rem;
  font-weight: 800;
  color: var(--text);
}

.ap-type-desc {
  font-size: .88rem;
  color: var(--sub);
  line-height: 1.65;
  font-weight: 450;
}

.ap-type-tags {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-top: auto;
}
.ap-type-tags span {
  font-size: .72rem;
  font-weight: 700;
  padding: .28rem .65rem;
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  border: 1px solid var(--border);
}

.ap-type-cta {
  font-size: .82rem;
  font-weight: 800;
  margin-top: .25rem;
}

/* ============================================================
   FORM SECTION
   ============================================================ */
  .ap-form-section {
    background: var(--white);
    padding-top: 3rem;
    scroll-margin-top: 72px;
  }
  .ap-section.ap-type-section { scroll-margin-top: 72px; }
  #apContent { padding-top: 72px; }
.ap-form-inner { max-width: 780px; }

/* Back */
.ap-back-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .48rem .9rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 1.5rem;
  transition: all var(--transition);
}
  .ap-back-btn:hover { color: var(--text); border-color: var(--text); }

  /* ── Form section header ── */
  .ap-form-ap-header {
    margin-bottom: 1.25rem;
  }

  /* ── Fields grid ── */
  .ap-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem .75rem;
}
.ap-field { display: flex; flex-direction: column; gap: 4px; }
.ap-field.ap-col-2 { grid-column: 1 / -1; }
.ap-field.ap-col-1 { grid-column: span 1; }

.ap-field label {
  font-size: .84rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.01em;
}
.ap-req { color: var(--c-error); }

.ap-field input,
.ap-field select,
.ap-field textarea {
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  font-weight: 450;
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: .72rem .9rem;
  width: 100%;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.ap-field input:focus,
.ap-field select:focus,
.ap-field textarea:focus {
  border-color: var(--c-company);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
.ap-field input.error,
.ap-field select.error,
.ap-field textarea.error {
  border-color: var(--c-error);
  box-shadow: 0 0 0 3px rgba(220,38,38,.08);
}
.ap-field select { cursor:pointer; }
.ap-field textarea { min-height: 88px; resize:vertical; }

.ap-field-wrap {
  margin-top: 1.5rem;
  margin-bottom: .25rem;
}
.ap-field-wrap input,
.ap-field-wrap textarea,
.ap-field-wrap select {
  margin-top: .5rem;
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  font-weight: 450;
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: .72rem .9rem;
  width: 100%;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.ap-field-wrap input:focus,
.ap-field-wrap textarea:focus,
.ap-field-wrap select:focus {
  border-color: var(--c-company);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
.ap-field-wrap label {
  font-size: .84rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.01em;
}

.ap-field-hint {
  font-size: .78rem;
  color: var(--muted);
  font-weight: 450;
   margin-top: .35rem;
   display: block;
 }

/* ============================================================
   TYPE BADGE — used inside ap-form-ap-header
   ============================================================ */
 .ap-type-badge {
   display: inline-flex;
   align-items: center;
   gap: .45rem;
   padding: .3rem .75rem;
   border-radius: 999px;
   font-size: .8rem;
   font-weight: 700;
   background: var(--white);
   border: 1px solid var(--border);
   color: var(--text);
   margin-bottom: .6rem;
 }
 .ap-type-dot {
   width: 8px; height: 8px;
   border-radius: 50%;
   background: var(--c-company);
   display: inline-block;
 }
 .ap-type-dot-co { background: var(--c-company); }
 .ap-type-dot-org { background: var(--c-org); }
 .ap-type-dot-cit { background: var(--c-citizen); }

/* ============================================================
   FORM STEP HEADINGS (Step 2 & 3) — ap-subtitle / ap-step-heading
   ============================================================ */
.ap-subtitle {
   font-size: .75rem;
   font-weight: 800;
   letter-spacing: .12em;
   text-transform: uppercase;
   color: var(--muted);
   margin-bottom: .4rem;
 }
.ap-step-heading {
   font-family: 'Instrument Serif', serif;
   font-size: clamp(1.5rem, 3vw, 2rem);
   font-weight: 500;
   line-height: 1.2;
   letter-spacing: -.02em;
   margin-bottom: .4rem;
 }
.ap-step-heading em { font-style: italic; }
.ap-step-heading-sub {
   font-size: .95rem;
   color: var(--sub);
   font-weight: 450;
   margin-top: .5rem;
   margin-bottom: 1.5rem;
 }

/* ============================================================
   OPTIONAL PILL BADGE
   ============================================================ */
.ap-field-pill {
   display: inline-flex;
   align-items: center;
   padding: .12rem .5rem;
   border-radius: 999px;
   background: var(--white);
   border: 1px solid var(--border);
   font-size: .7rem;
   font-weight: 700;
   color: var(--muted);
   letter-spacing: .02em;
   margin-left: .4rem;
    vertical-align: middle;
  }

/* ============================================================
   COUNTRY SELECT — flag emoji dropdown
   ============================================================ */
.ap-country-select,
.ap-category-select {
  position: fixed;
  top: -9999px;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* Progress dots */
.ap-progress-dots {
  display: flex;
  align-items: center;
  gap: 0;
  justify-content: center;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}
.ap-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 800;
  background: var(--white);
  color: var(--muted);
  border: 1.5px solid var(--border);
  flex-shrink: 0;
}
.ap-dot-active { background: var(--c-company); color: var(--white); border-color: var(--c-company); box-shadow: 0 0 0 3px rgba(99,102,241,.2); transition: all var(--transition); }
.ap-dot-line {
  width: 48px; height: 2px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Buttons ── */
.ap-next-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  background: #0a0a0a;
  color: var(--white);
  border: none;
  border-radius: 12px;
  padding: .82rem 1.6rem;
  font-size: .95rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  margin-top: .25rem;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  letter-spacing: -.01em;
}
.ap-next-btn:hover { opacity:.92; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.28); }
.ap-next-btn:disabled { opacity:.45; cursor:not-allowed; transform:none; box-shadow:none;	}

.ap-prev-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: .82rem 1.2rem;
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}
.ap-prev-btn:hover { color: var(--text); border-color: var(--text); }

.ap-submit-btn {
  display: block;
  width: fit-content;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: #0a0a0a;
  color: var(--white);
  border: none;
  border-radius: 14px;
  padding: .95rem 2rem;
  font-size: 1rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  letter-spacing: -.01em;
  text-transform: uppercase;
  margin: 0 auto;
}
.ap-submit-btn:hover { opacity:.92; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.28); }
.ap-submit-btn:active { transform: translateY(0); }
.ap-submit-btn:disabled { opacity:.5; cursor:not-allowed; transform:none; box-shadow:none; }


/* Step visibility */
.ap-step-hidden { display: none; }

/* ============================================================
   DOCUMENT UPLOAD
   ============================================================ */
.ap-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--white);
  cursor: pointer;
  transition: all var(--transition);
  margin: 1.25rem 0 .75rem;
}
.ap-upload-zone:hover {
  border-color: var(--c-company);
  background: #f5f7ff;
}

/* Force upload button text to be white inside every upload zone */
.ap-upload-zone .ap-upload-btn,
.ap-upload-zone .ap-upload-btn * {
  color: #ffffff;
}

.ap-upload-icon {
  color: var(--muted);
  margin-bottom: .85rem;
}
.ap-upload-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .3rem;
}
.ap-upload-sub {
  font-size: .85rem;
  color: var(--muted);
  font-weight: 450;
  margin-bottom: 1.25rem;
}
.ap-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  background: #0a0a0a;
  color: #ffffff !important;
  border: 2px dashed rgba(255,255,255,.85);
  outline: 2px dashed rgba(255,255,255,.6);
  outline-offset: 2px;
  border-radius: 12px;
  padding: .6rem 1.35rem;
  font-size: .85rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
  letter-spacing: -.01em;
}
.ap-upload-btn:hover {
  opacity: .92;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,.28);
  background: #111111;
  border-color: rgba(255,255,255,1);
  outline-color: rgba(255,255,255,.9);
}

.ap-upload-preview {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  border: 1.5px solid var(--c-ok);
  border-radius: var(--radius-sm);
  background: #f0fdf4;
  margin-bottom: 1.25rem;
}
.ap-upload-preview[hidden] { display: none; }

.ap-preview-info {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--c-ok);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ap-preview-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  flex-shrink: 0;
  transition: all var(--transition);
}
.ap-preview-remove:hover { color: var(--text); }

/* Image preview (logos / avatars) */
.ap-upload-preview.ap-img-preview { padding: .65rem .85rem; }
.ap-preview-img {
  width: 52px; height: 52px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--c-ok);
  flex-shrink: 0;
  min-height: 52px;
  background: var(--white);
}
.ap-preview-img[hidden] { display: none; }
.ap-upload-zone [hidden] { display: none !important; }

/* ============================================================
   SOCIAL LINKS
   ============================================================ */
.ap-social-labels {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: .65rem;
}
.ap-social-title { font-size: .88rem; font-weight: 800; color: var(--text); }
.ap-social-hint { font-size: .78rem; color: var(--muted); font-weight: 450; }

.ap-social-list { display: flex; flex-direction: column; gap: .55rem; }

.ap-social-row {
  display: flex;
  align-items: center;
  gap: .55rem;
  animation: fadeSlideIn .25s ease both;
}
@keyframes fadeSlideIn {
  from { opacity:0; transform:translateY(-6px); }
  to   { opacity:1; transform:translateY(0); }
}

.ap-social-icon {
  width: 38px; height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  color: var(--muted);
}
.ap-social-select {
  flex: 0 0 155px;
  font-size: .82rem;
  font-weight: 600;
  padding: .6rem .6rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
}
.ap-social-input {
  flex: 1;
  font-size: .88rem;
  padding: .6rem .75rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  font-family: inherit;
  color: var(--text);
  transition: border-color var(--transition);
}
.ap-social-input:focus { border-color: var(--c-company); }

.ap-social-remove {
  width: 34px; height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  border: none;
  cursor: pointer;
  color: var(--white);
  border-radius: 8px;
  flex-shrink: 0;
  transition: all var(--transition);
}
.ap-social-remove:hover { opacity:.8; }

.ap-social-add {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-top: .55rem;
  background: #0a0a0a;
  border: none;
  border-radius: 12px;
  padding: .55rem 1.1rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--white);
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.ap-social-add:hover {
  opacity:.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,.26);
}
.ap-social-add svg { color: currentColor; transition: color 0s; }

/* ============================================================
   REVIEW
   ============================================================ */
.ap-review-block {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.ap-review-head {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border-bottom: 1.5px solid var(--border);
}
.ap-review-head-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.ap-review-head-text {
  font-size: .82rem;
  font-weight: 800;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .07em;
}
.ap-review-body { padding: 1.25rem; }

.ap-review-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: .55rem 0;
  gap: 1rem;
}
.ap-review-row + .ap-review-row { border-top: 1px solid var(--border); }
.ap-review-key {
  font-size: .82rem;
  color: var(--muted);
  font-weight: 600;
  flex-shrink: 0;
  width: 160px;
}
.ap-review-val {
  font-size: .88rem;
  color: var(--text);
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}
.ap-review-socials { margin-top: .5rem; flex-wrap: wrap; gap: .4rem; display: flex; justify-content: flex-end; }
.ap-review-social-pill {
  font-size: .75rem;
  font-weight: 700;
  padding: .22rem .6rem;
  border-radius: 999px;
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
}

.ap-review-doc {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem .9rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  color: var(--c-ok);
  font-weight: 600;
}

.ap-disclaimer {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  color: #92400e;
  font-weight: 500;
  line-height: 1.65;
  margin-top: 1.25rem;
  text-align: center;
  justify-content: center;
}
.ap-disclaimer a { color: #78350f; font-weight: 700; text-decoration: underline; }
.ap-disclaimer a:hover { color: #78350f; }

/* ── Terms & Privacy checkbox ── */
.ap-terms-check {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .82rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 2rem;
  margin-bottom: .75rem;
  user-select: none;
}
.ap-terms-check input[type="checkbox"] {
  width: 12px;
  height: 12px;
  accent-color: var(--c-company);
  cursor: pointer;
  flex-shrink: 0;
}
.ap-terms-check a { color: #00FF00; font-weight: 700; text-decoration: underline; }
.ap-terms-check a:hover { color: #00FF00; }

/* Terms checkbox error state */
.ap-terms-check input.ap-error {
  accent-color: var(--c-error);
  outline: 2px solid var(--c-error);
  outline-offset: 2px;
  border-radius: 4px;
}
.ap-terms-check .ap-err-msg {
  display: block;
  color: var(--c-error);
  font-size: .78rem;
  font-weight: 600;
  margin-top: .3rem;
  line-height: 1.3;
}

/* ============================================================
   OVERLAY & MODAL
   ============================================================ */
.ap-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  animation: overlayIn .25s ease;
}
.ap-overlay[hidden] { display: none; }
@keyframes overlayIn {
  from { opacity:0; } to { opacity:1; }
}

.ap-modal {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.75rem 2.25rem 2.5rem;
  max-width: 440px;
  width: calc(100% - 2rem);
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: modalIn .35s ease both;
  border: 1px solid var(--border);
}
@keyframes modalIn {
  from { opacity:0; transform:scale(.94) translateY(12px); }
  to   { opacity:1; transform:scale(1) translateY(0); }
}

.ap-modal-x {
  position: absolute;
  top: .9rem; right: .9rem;
  width: 36px; height: 36px;
  background: var(--light);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all var(--transition);
}
.ap-modal-x:hover { background: var(--border); color: var(--text); }

.ap-modal-icon {
  width: 72px; height: 72px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
}
.ap-modal-icon-success { background: #f0fdf4; color: var(--c-ok); }

.ap-modal-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: .6rem;
}
.ap-modal-sub {
  font-size: .95rem;
  color: var(--sub);
  line-height: 1.75;
  font-weight: 450;
  margin-bottom: 1.5rem;
}

.ap-cred-label { font-size: .75rem; font-weight: 800; text-transform: uppercase; color: var(--muted); letter-spacing: .1em; margin-bottom: .3rem; }
.ap-cred-val  { font-family: 'SF Mono','Consolas',monospace; font-size: 1.05rem; font-weight: 800; color: var(--c-company); letter-spacing: .04em; }

.ap-modal-credential {
  margin-bottom: 1.5rem;
  padding: .9rem 1rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
}
.ap-modal-credential[hidden] { display: none; }

.ap-modal-actions {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.ap-modal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .82rem 1.25rem;
  border-radius: 14px;
  font-size: .95rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  letter-spacing: -.01em;
}
.ap-modal-btn-main { background: #0a0a0a; color: var(--white); box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.ap-modal-btn-main:hover { opacity:.92; transform: translateY(-1px); box-shadow: 0 8px 28px rgba(0,0,0,.28); }
.ap-modal-btn-ghost { background: var(--white); color: var(--sub); border: 1.5px solid var(--border); }
.ap-modal-btn-ghost:hover { color: var(--text); border-color: var(--text); }

/* ============================================================
   TOAST
   ============================================================ */
.ap-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  padding: .75rem 1.5rem;
  border-radius: 12px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--white);
  background: var(--text);
  box-shadow: var(--shadow-lg);
  animation: toastIn .25s ease both;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
}
.ap-toast[hidden] { display: none; }
.ap-toast.ap-toast-error { background: var(--c-error); }
.ap-toast.ap-toast-ok    { background: var(--c-ok); }

@keyframes toastIn {
  from { opacity:0; transform: translateX(-50%) translateY(12px); }
  to   { opacity:1; transform: translateX(-50%) translateY(0); }
}

/* ============================================================
   RESPONSIVE — Tablet
   ============================================================ */
@media (max-width: 900px) {
  .ap-hero { padding-top: 72px; }
}

@media (max-width: 768px) {

  /* Identity card grid → 1 column */
  .ap-card-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
  }

  /* Form fields → full width */
  .ap-fields-grid {
    grid-template-columns: 1fr;
  }
  .ap-field.ap-col-2,
  .ap-field.ap-col-1 { grid-column: 1 / -1; }

  /* Hero stats */
  .ap-stat-row { gap: .85rem; }
  .ap-stat-val { font-size: 1.35rem; }
  .ap-stat-divider { display: none; }
  .ap-stat-label { font-size: .75rem; }

  /* Form header */
  .ap-section-inner { padding: 0 .25rem; }

  /* Step dots */
  .ap-progress-dots { gap: 0; }
  .ap-dot-line { width: 32px; }

  /* Social row wraps */
  .ap-social-row { flex-wrap: wrap; }
  .ap-social-select { flex: 1 1 100%; }
  .ap-social-input { flex: 1 1 100%; }

  /* Review */
  .ap-review-row { flex-direction: column; gap: .25rem; }
  .ap-review-key { width: auto; margin-bottom: .15rem; }
  .ap-review-val { text-align: left; }
  .ap-review-socials { justify-content: flex-start; }

  /* Modal */
  .ap-modal { padding: 2rem 1.5rem 2rem; }
}

/* ============================================================
   RESPONSIVE — Mobile
   ============================================================ */
@media (max-width: 480px) {

  .ap-hero { padding: 72px .9rem 2rem; }
  .ap-breadcrumb { font-size: .75rem; }

  .ap-section { padding: 2.75rem .9rem; }

  .ap-hero-title { font-size: 2rem; }
  .ap-section-title { font-size: 1.65rem; }

  .ap-type-card { padding: 1.5rem 1.15rem; }

  .ap-stat-row { gap: .65rem; }
  .ap-stat-val { font-size: 1.15rem; }

  .ap-mobile-col-1 { grid-column: 1 / -1 !important; }

  .ap-next-btn, .ap-prev-btn, .ap-submit-btn {
    width: 100%;
    justify-content: center;
  }
   .ap-step-btns { flex-direction: column; }

   .ap-gate-actions { gap: .6rem; }
   .ap-gate-btn { padding: .8rem 1.2rem; font-size: .95rem; }
}

/* ============================================================
   CHANGE TYPE BUTTON — top of each form step 1
   ============================================================ */
 .ap-change-type-wrap {
    margin-bottom: .6rem;
  }
.ap-change-type-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--c-company);
  text-decoration: none;
  padding: .4rem .75rem;
  border-radius: 10px;
  transition: all var(--transition);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.ap-change-type-btn:hover { color: #1d4ed8; background: #eff6ff; }


/* ============================================================
   SEARCHABLE COUNTRY DROPDOWN
   ============================================================ */
.ap-country-wrap { position: relative; }

.ap-country-trigger {
  width: 100%;
  padding: .72rem .9rem;
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  font-weight: 450;
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.ap-country-trigger:focus,
.ap-country-wrap.open .ap-country-trigger {
  border-color: var(--c-company);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
.ap-country-trigger.ap-error,
.ap-country-wrap .ap-country-trigger.ap-error {
  border-color: var(--c-error);
  box-shadow: 0 0 0 3px rgba(220,38,38,.08);
}

/* Generic field error */
.ap-field .ap-error,
.ap-field-wrap .ap-error {
  border-color: var(--c-error) !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,.08) !important;
}

.ap-err-msg {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--c-error);
  margin-top: 0.32rem;
  line-height: 1.3;
}
.ap-country-trigger .ap-flag { font-size: 1.2rem; flex-shrink: 0; }
/* Real flag image injected into the trigger button (flagcdn.com) */
.ap-country-trigger .ap-country-trigger-img {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  display: block;
}
.ap-country-trigger .ap-label { flex: 1; }
.ap-country-trigger .ap-chevron {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform .2s ease;
}
.ap-country-wrap.open .ap-country-trigger .ap-chevron { transform: rotate(180deg); }
.ap-country-placeholder { color: var(--muted); }

/* Dropdown panel */
.ap-country-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: none;
  overflow: hidden;
}
.ap-country-wrap.open .ap-country-panel { display: block; }

/* Search bar inside dropdown */
.ap-country-panel-search {
  padding: .5rem .5rem .35rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 1;
}
.ap-country-panel-search input {
  width: 100%;
  padding: .5rem .75rem;
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  font-weight: 450;
  background: var(--light);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-sizing: border-box;
}
.ap-country-panel-search input:focus {
  border-color: var(--c-company);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}

/* Country list */
.ap-country-panel-list {
  max-height: 260px;
  overflow-y: auto;
  padding: .25rem 0;
}
.ap-country-panel-list::-webkit-scrollbar { width: 5px; }
.ap-country-panel-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.ap-country-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .48rem .75rem;
  font-size: .88rem;
  font-weight: 450;
  color: var(--text);
  cursor: pointer;
  transition: background .12s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
  line-height: 1.3;
}
.ap-country-item:hover { background: var(--light); }
.ap-country-item.selected { background: #eff6ff; color: var(--c-company); font-weight: 600; }
.ap-country-item .ap-flag { font-size: 1.15rem; line-height: 1; flex-shrink: 0; }
/* Real flag image injected into dropdown items (flagcdn.com) */
.ap-country-item .ap-country-flag-img {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  display: block;
}
.ap-country-item .ap-name { flex: 1; min-width: 0; }
.ap-country-item .ap-code { font-size: .7rem; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.ap-country-empty { padding: .85rem .9rem; font-size: .85rem; color: var(--muted); font-style: italic; }

/* ============================================================
   ROLE PICKER — inline dropdown (same pattern as country)
   ============================================================ */
.ap-role-field {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.ap-role-wrap { position: relative; }
.ap-role-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .72rem .9rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  font-weight: 450;
  color: var(--text);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.ap-role-trigger:focus,
.ap-role-wrap.open .ap-role-trigger {
  border-color: var(--c-company);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
.ap-role-trigger .ap-flag { font-size: 1.2rem; flex-shrink: 0; color: var(--muted); }
.ap-role-trigger .ap-label { flex: 1; }
.ap-role-placeholder { color: var(--muted); }
/* .ap-role-trigger .ap-chevron intentionally left unstyled */


/* ============================================================
   CATEGORY PICKER — inline 2-column grid (reuses combobox shell)
   ============================================================ */
.ap-category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .45rem;
}
.ap-category-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .52rem .65rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
}
.ap-category-item:hover {
  border-color: var(--c-company);
  color: var(--c-company);
  background: #f5f7ff;
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
.ap-category-item.selected {
  background: var(--c-company);
  border-color: var(--c-company);
  color: #fff;
}
.ap-category-item .ap-check {
  display: none;
  font-size: .95rem;
  font-weight: 700;
  flex-shrink: 0;
}
.ap-category-item.selected .ap-check { display: inline; }

/* ============================================================
   SINGLE-PAGE FORM DISPLAY (All Fields Visible, No Navigation)
   ============================================================ */

/* Hide progress dots everywhere */
.ap-progress-dots {
  display: none !important;
}

/* Hide navigation buttons (back/next) */
.ap-prev-btn,
.ap-next-btn {
  display: none !important;
}

/* Show all form steps visible - remove hidden state */
.ap-form-step {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
  margin-bottom: 2rem;
}

/* Also ensure step-hidden class doesn't hide */
.ap-step-hidden {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  height: auto !important;
}

/* Hide "Step X of 3" text */
.ap-subtitle {
  display: none !important;
}

/* Keep only the main step headings visible (first step has the main heading) */
.ap-form-step:not(:first-child) .ap-step-heading,
.ap-form-step:not(:first-child) .ap-step-heading-sub {
  display: none !important;
}

/* Show submit button at the end */
.ap-submit-btn {
  display: inline-block !important;
  margin-top: 2rem;
  width: 100%;
}

/* Hide the button containers by default */
.ap-step-btns {
  display: none !important;
}

/* Show button container for the LAST .ap-form-step only */
.ap-form > .ap-form-step:last-child .ap-step-btns {
  display: flex !important;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 1rem;
}

/* Hide review content sections */
.ap-review-content {
  display: none !important;
}

.ap-role-wrap.open .ap-role-trigger .ap-chevron { transform: rotate(180deg); }

.ap-role-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: none;
  padding: .75rem;
  overflow: hidden;
}
.ap-role-wrap.open .ap-role-panel { display: block; }
.ap-role-panel .ap-role-chip { margin: 0; }

/* chip shared styles (used inside panel only now) */
.ap-role-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .75rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
  font-family: inherit;
  position: relative;
}
.ap-role-chip svg {
  color: var(--muted);
  flex-shrink: 0;
  transition: color var(--transition);
}
.ap-role-chip span {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.ap-role-chip input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.ap-role-chip:hover {
  border-color: var(--c-company);
  background: #f5f7ff;
}
.ap-role-chip:hover svg { color: var(--c-company); }
.ap-role-chip.ap-role-selected {
  border-color: var(--c-company);
  background: linear-gradient(135deg, #eef2ff 0%, #f0f4ff 100%);
  box-shadow: 0 0 0 2.5px rgba(99,102,241,.14);
}
.ap-role-chip.ap-role-selected svg { color: var(--c-company); }
.ap-role-chip.ap-role-selected::after {
  content: '\2713';
  position: absolute;
  top: -5px;
  right: -4px;
  width: 16px;
  height: 16px;
  background: var(--c-company);
  color: #fff;
  border-radius: 50%;
  font-size: .55rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
@media (max-width: 768px) {
  .ap-role-chip { padding: .38rem .6rem; }
  .ap-role-chip span { font-size: .73rem; }
  .ap-role-chip svg { width: 14px; height: 14px; }
}
@media (max-width: 480px) {
  .ap-role-panel .ap-role-chip { padding: .34rem .5rem; }
  .ap-role-panel .ap-role-chip span { font-size: .7rem; }
}


/* ============================================================
   FLAT-FORM SECTION WRAPPER (Documents & Links block)
   ============================================================ */
.ap-form-flat-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* ============================================================
   SUBMIT AREA (disclaimer + submit button)
   ============================================================ */
.ap-form-submit-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}



