/**
 * Shared registration / institution signup chrome (register + register_lender).
 * Font Awesome only — warm dark canvas, amber / copper accent, accessible focus.
 */
:root {
  --tt-reg-amber: #f59e0b;
  --tt-reg-amber-deep: #ea580c;
  --tt-reg-copper: #c2410c;
  --tt-reg-slate-900: #0f172a;
  --tt-reg-slate-700: #334155;
  --tt-reg-glass: rgba(255, 255, 255, 0.1);
  --tt-reg-glass-strong: rgba(255, 255, 255, 0.16);
  --tt-reg-focus: rgba(251, 191, 36, 0.85);
}

.tt-reg-flow {
  --tt-reg-focus-ring: var(--tt-reg-focus);
}

/* --- Institution hub: contexts first, warm chrome --- */
.tt-reg-page {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
}

.tt-reg-flow-banner--compact {
  margin-bottom: 1rem !important;
  padding: 0.5rem 0.85rem !important;
  font-size: 0.8125rem !important;
  line-height: 1.4 !important;
}

.tt-reg-hero-compact {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  max-width: 48rem;
  margin: 0 auto 1.25rem;
  padding: 0 0.25rem;
  text-align: left;
}

.tt-reg-hero-compact__mark {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #fbbf24, #ea580c);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2) inset,
    0 12px 28px rgba(234, 88, 12, 0.35);
  color: #fff;
  font-size: 1.35rem;
}

.tt-reg-hero-compact__body {
  min-width: 0;
}

.tt-reg-hero-compact__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fffbeb;
}

.tt-reg-hero-compact__sub {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.88);
}

.tt-reg-pick-label {
  text-align: center;
  margin: 0 auto 0.75rem;
  max-width: 42rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(251, 191, 36, 0.85);
}

.tt-reg-more {
  max-width: 48rem;
  margin: 2rem auto 0;
  border-radius: 1rem;
  border: 1px solid rgba(251, 191, 36, 0.22);
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.tt-reg-more summary {
  cursor: pointer;
  list-style: none;
  padding: 0.85rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(254, 243, 199, 0.95);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  user-select: none;
  transition: background 0.15s ease;
}

.tt-reg-more summary::-webkit-details-marker {
  display: none;
}

.tt-reg-more summary::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid rgba(251, 191, 36, 0.7);
  border-bottom: 2px solid rgba(251, 191, 36, 0.7);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.tt-reg-more[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}

.tt-reg-more summary:hover {
  background: rgba(255, 255, 255, 0.04);
}

.tt-reg-more__body {
  padding: 0 1.1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(226, 232, 240, 0.9);
}

.tt-reg-stat-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem 2rem;
  padding: 1rem 0 1.25rem;
}

.tt-reg-stat {
  text-align: center;
}

.tt-reg-stat__num {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fbbf24;
}

.tt-reg-stat__lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.95);
}

.tt-reg-app-card {
  margin-top: 0.5rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(251, 191, 36, 0.2);
  background: rgba(15, 23, 42, 0.55);
  padding: 1rem 1.1rem;
}

.tt-reg-app-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 800;
  color: #fffbeb;
}

.tt-reg-app-card p {
  margin: 0 0 0.85rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(203, 213, 225, 0.95);
}

.tt-reg-app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tt-reg-app-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #fde68a !important;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none !important;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.tt-reg-app-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(251, 191, 36, 0.45);
}

/* Trust context card CTA — single warm system (no per-card purple / rainbow) */
.tt-reg-context-cta {
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 0.65rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none !important;
  color: #1c1410 !important;
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 55%, #ea580c 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35) inset,
    0 6px 20px rgba(234, 88, 12, 0.35);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.tt-reg-context-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.45) inset,
    0 10px 28px rgba(234, 88, 12, 0.45);
}

.tt-reg-context-cta:focus-visible {
  outline: 2px solid var(--tt-reg-focus-ring);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .tt-reg-hero-compact {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.85rem;
    padding-left: max(0.35rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.35rem, env(safe-area-inset-right, 0px));
    margin-bottom: 1rem;
  }

  .tt-reg-hero-compact__body {
    text-align: center;
  }

  .tt-reg-hero-compact__title {
    font-size: clamp(1.2rem, 5.4vw, 1.55rem);
    line-height: 1.14;
  }

  .tt-reg-hero-compact__sub {
    font-size: 0.88rem;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
  }

  .tt-reg-hero-compact__mark {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.45rem;
  }
}

.tt-reg-stepper {
  max-width: 52rem;
  margin: 0 auto 1.5rem;
  padding: 0 0.5rem;
  background: transparent;
}

.tt-reg-stepper ol {
  list-style: none;
  margin: 0;
  padding: 0.65rem !important;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  background: rgba(28, 22, 18, 0.78) !important;
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 1rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 40px rgba(0, 0, 0, 0.25);
}

@media (max-width: 640px) {
  .tt-reg-stepper {
    padding-left: max(0.35rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.35rem, env(safe-area-inset-right, 0px));
  }

  .tt-reg-stepper ol {
    grid-template-columns: 1fr;
  }
}

.tt-reg-step {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 16, 14, 0.45);
  color: rgba(226, 232, 240, 0.78);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.tt-reg-step .tt-reg-step-ic {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(251, 191, 36, 0.85);
  font-size: 0.95rem;
}

.tt-reg-step .tt-reg-step-txt {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.tt-reg-step .tt-reg-step-txt strong {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tt-reg-step .tt-reg-step-txt small {
  font-size: 0.72rem;
  line-height: 1.35;
  opacity: 0.88;
}

.tt-reg-step--active {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(30, 41, 59, 0.65);
  color: #f8fafc;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.12), 0 12px 32px rgba(0, 0, 0, 0.2);
}

.tt-reg-step--active .tt-reg-step-ic {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.35), rgba(249, 115, 22, 0.25));
  color: #fffbeb;
}

.tt-reg-step--done {
  border-color: rgba(34, 197, 94, 0.35);
  color: rgba(220, 252, 231, 0.95);
}

.tt-reg-step--done .tt-reg-step-ic {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.tt-reg-back-btn {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  display: none;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.55);
  color: #fef3c7;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
}

.tt-reg-back-btn:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(251, 191, 36, 0.45);
}

.tt-reg-back-btn:focus-visible {
  outline: 2px solid var(--tt-reg-focus-ring);
  outline-offset: 2px;
}

.tt-reg-icon-wrap {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.tt-reg-context-icon,
.institution-icon-container .tt-reg-type-icon {
  font-size: 2rem !important;
  line-height: 1;
  color: rgba(254, 243, 199, 0.95);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

@media (min-width: 640px) {
  .tt-reg-context-icon,
  .institution-icon-container .tt-reg-type-icon {
    font-size: 2.35rem !important;
  }
}

.tt-reg-flow-banner {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0.65rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: rgba(28, 22, 18, 0.82) !important;
  color: rgba(254, 243, 199, 0.95);
  font-size: 0.875rem;
  line-height: 1.45;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .tt-reg-step,
  .tt-reg-back-btn {
    transition: none !important;
  }

  .tt-reg-borrower-hero {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* --- Mobile header polish: institution hub, lender flow, borrower landing --- */

.tt-reg-flow.tt-reg-page {
  padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
  padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
  padding-top: max(0.5rem, env(safe-area-inset-top, 0px));
}

.tt-reg-borrower-shell {
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  padding-top: max(1.25rem, env(safe-area-inset-top, 0px));
}

.tt-reg-borrower-hero__title {
  font-size: clamp(1.65rem, 6.2vw, 3.65rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

@media (max-width: 640px) {
  .tt-reg-borrower-hero {
    padding: 1rem 0.65rem 1.2rem;
    margin-left: auto;
    margin-right: auto;
    max-width: 26rem;
    border-radius: 1.25rem;
    background: linear-gradient(
      165deg,
      rgba(15, 23, 42, 0.68) 0%,
      rgba(30, 41, 59, 0.38) 55%,
      rgba(15, 23, 42, 0.12) 100%
    );
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.05) inset,
      0 18px 48px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
}

@media (max-width: 400px) {
  .tt-reg-borrower-pill {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    gap: 0.35rem;
  }

  .tt-reg-borrower-pill span {
    font-size: 0.7rem;
  }
}
