/* =====================================================
   THE FOUNDERS HOUSE — Page-specific overrides
   Loaded LAST in <head> on pages with inline <style>
   blocks, so it wins the cascade.
   Fixes readability on investor-apply, startup-apply,
   pricing, app, admin where hardcoded #fff / dark-mode
   colors were breaking on the cream canvas.
   ===================================================== */

/* ---------- 0. Alias missing CSS vars ---------- */
:root {
  --bg-primary: #FAF9F4;
  --gradient-primary: linear-gradient(135deg, #0A0A0A, #1A1A1A);
  --gradient-accent: linear-gradient(135deg, #FF5A4E, #F24436);
  --purple-400: #FF5A4E;
  --purple-500: #F24436;
  --purple-600: #DC2E1F;
  --text-muted: #8A8982;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================================================
   INVESTOR APPLY (.ia-*)
   ===================================================== */
.ia-shell { background: var(--bg) !important; }
.ia-side {
  background: #FFFFFF !important;
  border-right: 1px solid var(--border) !important;
}
.ia-side-logo {
  color: #FFFFFF !important;
  background: #0A0A0A !important;
  border: 1.5px solid #0A0A0A !important;
  box-shadow: 0 2px 0 rgba(10,10,10,0.08), 0 14px 32px -14px rgba(10,10,10,0.4) !important;
}
.ia-side-logo .ia-side-logo-text,
.ia-side-logo .ia-side-logo-text small { color: #FFFFFF !important; }
.ia-side-logo:hover {
  background: #FF5A4E !important;
  border-color: #FF5A4E !important;
  box-shadow: 0 2px 0 rgba(255,90,78,0.25), 0 16px 36px -12px rgba(255,90,78,0.55) !important;
}
.ia-side-logo-icon {
  background: linear-gradient(135deg, #FF5A4E, #DC2E1F) !important;
  box-shadow: 0 6px 16px rgba(255,90,78,0.4) !important;
}
.ia-side-title { color: #0A0A0A !important; }
.ia-side-sub { color: var(--text-secondary) !important; }
.ia-side-foot { color: var(--text-tertiary) !important; border-top-color: var(--border) !important; }
.ia-side-foot strong { color: #0A0A0A !important; }

.ia-progress-header {
  background: #F4F2EB !important;
  border: 1px solid var(--border) !important;
}
.ia-progress-label { color: #FF5A4E !important; }
.ia-progress-count { color: #0A0A0A !important; }
.ia-progress-count strong {
  background: linear-gradient(135deg, #FF5A4E, #DC2E1F) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
.ia-progress-bar { background: rgba(10,10,10,0.08) !important; }
.ia-progress-fill {
  background: linear-gradient(90deg, #FF5A4E, #DC2E1F) !important;
  box-shadow: 0 0 12px rgba(255,90,78,0.5) !important;
}

.ia-steps::before {
  background: linear-gradient(180deg, rgba(10,10,10,0.15), rgba(10,10,10,0.03)) !important;
}
.ia-step-num {
  background: #FFFFFF !important;
  border: 2px solid var(--border-dark) !important;
  color: var(--text-tertiary) !important;
}
.ia-step-label { color: var(--text-secondary) !important; }
.ia-step-desc { color: var(--text-tertiary) !important; }
.ia-step.active {
  background: linear-gradient(135deg, rgba(255,90,78,0.08), rgba(255,90,78,0.02)) !important;
  border-color: rgba(255,90,78,0.35) !important;
  box-shadow: 0 0 0 1px rgba(255,90,78,0.1), 0 8px 24px -10px rgba(255,90,78,0.3) !important;
}
.ia-step.active::before {
  background: linear-gradient(180deg, #FF5A4E, #DC2E1F) !important;
  box-shadow: 0 0 12px rgba(255,90,78,0.7) !important;
}
.ia-step.active .ia-step-num {
  background: linear-gradient(135deg, #FF5A4E, #DC2E1F) !important;
  border-color: rgba(255,90,78,0.4) !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 0 4px rgba(255,90,78,0.15), 0 6px 18px rgba(255,90,78,0.45) !important;
}
.ia-step.active .ia-step-label { color: #0A0A0A !important; font-weight: 700 !important; }
.ia-step.active .ia-step-desc { color: #FF5A4E !important; opacity: 1 !important; }
.ia-step.done .ia-step-num {
  background: rgba(255,90,78,0.1) !important;
  border-color: rgba(255,90,78,0.4) !important;
  color: #FF5A4E !important;
}
.ia-step.done .ia-step-label { color: #0A0A0A !important; }
.ia-step.done .ia-step-num::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF5A4E' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") !important;
}

.ia-topbar .ia-save-status { color: var(--text-tertiary) !important; }
.ia-save-status .dot { background: #00C853 !important; box-shadow: 0 0 8px rgba(0,200,83,0.5) !important; }
.ia-back-link { color: var(--text-secondary) !important; }
.ia-back-link:hover { color: #0A0A0A !important; }

.ia-eyebrow { color: #FF5A4E !important; }
.ia-h1 { color: #0A0A0A !important; font-weight: 800 !important; }
.ia-lead { color: var(--text-secondary) !important; }

.ia-label { color: #0A0A0A !important; font-weight: 600 !important; }
.ia-label .req { color: #FF5A4E !important; }
.ia-hint { color: var(--text-tertiary) !important; }
.ia-input,
.ia-textarea,
.ia-select {
  background: #FFFFFF !important;
  border: 1px solid var(--border) !important;
  color: #0A0A0A !important;
  box-shadow: 0 1px 2px rgba(10,10,10,0.03) !important;
}
.ia-input:focus,
.ia-textarea:focus,
.ia-select:focus {
  border-color: #0A0A0A !important;
  background: #FFFFFF !important;
  box-shadow: 0 0 0 4px rgba(255,90,78,0.15) !important;
}
.ia-input::placeholder,
.ia-textarea::placeholder { color: var(--text-placeholder) !important; }

.ia-segment {
  background: #FFFFFF !important;
  border: 1px solid var(--border) !important;
}
.ia-segment-opt { color: var(--text-secondary) !important; }
.ia-segment-opt:hover { color: #0A0A0A !important; }
.ia-segment-opt.selected {
  background: #0A0A0A !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(10,10,10,0.2) !important;
}

.ia-chip {
  background: #FFFFFF !important;
  border: 1px solid var(--border) !important;
  color: var(--text-secondary) !important;
}
.ia-chip:hover {
  border-color: #0A0A0A !important;
  color: #0A0A0A !important;
}
.ia-chip.selected {
  background: rgba(255,90,78,0.08) !important;
  border-color: #FF5A4E !important;
  color: #0A0A0A !important;
  box-shadow: 0 4px 14px rgba(255,90,78,0.15) !important;
}
.ia-chip.selected::before { color: #FF5A4E !important; }

.ia-card-opt {
  background: #FFFFFF !important;
  border: 1px solid var(--border) !important;
}
.ia-card-opt:hover { border-color: #0A0A0A !important; }
.ia-card-opt.selected {
  background: rgba(255,90,78,0.05) !important;
  border-color: #FF5A4E !important;
  box-shadow: 0 8px 24px -8px rgba(255,90,78,0.3) !important;
}
.ia-card-opt-icon {
  background: rgba(255,90,78,0.12) !important;
  color: #FF5A4E !important;
}
.ia-card-opt-title { color: #0A0A0A !important; }
.ia-card-opt-desc { color: var(--text-tertiary) !important; }
.ia-card-opt.selected::after {
  background: #FF5A4E !important;
  background-image: linear-gradient(135deg, #FF5A4E, #DC2E1F) !important;
  box-shadow: 0 4px 12px rgba(255,90,78,0.5) !important;
}

.ia-range-value-amount { color: #0A0A0A !important; }
.ia-range-value-label { color: var(--text-tertiary) !important; }
.ia-range { background: rgba(10,10,10,0.08) !important; }
.ia-range::-webkit-slider-thumb {
  background: linear-gradient(135deg, #FF5A4E, #DC2E1F) !important;
  box-shadow: 0 4px 14px rgba(255,90,78,0.5), 0 0 0 4px rgba(255,90,78,0.15) !important;
  border: 2px solid #FFFFFF !important;
}
.ia-range::-moz-range-thumb {
  background: linear-gradient(135deg, #FF5A4E, #DC2E1F) !important;
  box-shadow: 0 4px 14px rgba(255,90,78,0.5) !important;
  border: 2px solid #FFFFFF !important;
}
.ia-range-ticks { color: var(--text-tertiary) !important; }

.ia-ticket-input {
  background: #FFFFFF !important;
  border: 1px solid var(--border) !important;
}
.ia-ticket-input:focus-within {
  border-color: #0A0A0A !important;
  background: #FFFFFF !important;
  box-shadow: 0 0 0 4px rgba(255,90,78,0.15) !important;
}
.ia-ticket-prefix { color: var(--text-secondary) !important; }
.ia-ticket-num { color: #0A0A0A !important; }
.ia-ticket-sep { color: var(--text-tertiary) !important; }
.ia-ticket-suffix { color: var(--text-tertiary) !important; }
.ia-ticket-preset {
  background: #FFFFFF !important;
  border: 1px solid var(--border) !important;
  color: var(--text-secondary) !important;
}
.ia-ticket-preset:hover {
  border-color: #0A0A0A !important;
  color: #0A0A0A !important;
}
.ia-ticket-preset.selected {
  border-color: #FF5A4E !important;
  background: rgba(255,90,78,0.08) !important;
  color: #0A0A0A !important;
}

/* Generic catch-alls — any ia element with inline white text */
.ia-main h1, .ia-main h2, .ia-main h3, .ia-main h4, .ia-main h5 { color: #0A0A0A !important; }
.ia-main p, .ia-main span, .ia-main label, .ia-main li { color: inherit; }
.ia-main .ia-section-title { color: #0A0A0A !important; }

/* Review step */
.ia-review {
  background: #FFFFFF !important;
  border: 1px solid var(--border) !important;
}
.ia-review-section-title { color: #FF5A4E !important; }
.ia-review-edit { color: var(--text-secondary) !important; }
.ia-review-edit:hover { color: #0A0A0A !important; }
.ia-review-row span:first-child { color: var(--text-tertiary) !important; }
.ia-review-row span:last-child { color: #0A0A0A !important; }

/* Checkboxes / Check-list */
.ia-check {
  background: #FFFFFF !important;
  border: 1px solid var(--border) !important;
}
.ia-check:hover { border-color: #0A0A0A !important; }
.ia-check.checked {
  background: rgba(255,90,78,0.06) !important;
  border-color: #FF5A4E !important;
}
.ia-check-box {
  background: #FFFFFF !important;
  border: 2px solid var(--border-dark) !important;
}
.ia-check.checked .ia-check-box {
  background: #FF5A4E !important;
  border-color: #FF5A4E !important;
}
.ia-check-text { color: var(--text-secondary) !important; }
.ia-check-text strong { color: #0A0A0A !important; }
.ia-check.checked .ia-check-text { color: #0A0A0A !important; }

/* Navigation buttons at bottom of steps */
.ia-nav { border-top-color: var(--border) !important; }
.ia-nav-back { color: var(--text-secondary) !important; }
.ia-nav-back:hover { color: #0A0A0A !important; }

/* Section titles within steps */
.ia-section-title,
.ia-field-title { color: #0A0A0A !important; }

/* Confirmation / success states */
.ia-success-icon { background: rgba(0,200,83,0.12) !important; }
.ia-success-title { color: #0A0A0A !important; }
.ia-success-text { color: var(--text-secondary) !important; }

/* =====================================================
   STARTUP APPLY (.apply-*)
   ===================================================== */
.apply-page { background: var(--bg) !important; }
.apply-logo {
  background: linear-gradient(135deg, #FF5A4E, #DC2E1F) !important;
  color: #FFFFFF !important;
  box-shadow: 0 8px 24px -8px rgba(255,90,78,0.5) !important;
}
.apply-badge {
  background: rgba(255,90,78,0.08) !important;
  border: 1px solid rgba(255,90,78,0.25) !important;
  color: #FF5A4E !important;
}
.apply-title { color: #0A0A0A !important; font-weight: 800 !important; letter-spacing: -0.03em !important; }
.apply-subtitle { color: var(--text-secondary) !important; }
.apply-title .gradient-text,
.gradient-text {
  background: linear-gradient(135deg, #FF5A4E, #DC2E1F) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

.apply-info-box {
  background: rgba(255,90,78,0.06) !important;
  border: 1px solid rgba(255,90,78,0.2) !important;
}
.apply-info-box h3 { color: #FF5A4E !important; }
.apply-info-box li { color: var(--text-secondary) !important; }
.apply-info-box li::before { background: #FF5A4E !important; }

.apply-section {
  background: #FFFFFF !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 1px 0 rgba(10,10,10,0.03), 0 2px 8px rgba(10,10,10,0.03) !important;
}
.apply-section-title {
  color: #0A0A0A !important;
  border-bottom: 1px solid var(--border) !important;
}
.apply-section-title .icon {
  background: rgba(255,90,78,0.1) !important;
  color: #FF5A4E !important;
}

.form-input-select {
  background-color: #FFFFFF !important;
  border: 1px solid var(--border) !important;
  color: #0A0A0A !important;
}
.form-input-select:focus {
  border-color: #0A0A0A !important;
  box-shadow: 0 0 0 4px rgba(255,90,78,0.15) !important;
}
.form-input-select option { background: #FFFFFF !important; color: #0A0A0A !important; }

.radio-label { color: #0A0A0A !important; }
.radio-label input[type="radio"] {
  background: #FFFFFF !important;
  border: 2px solid var(--border-dark) !important;
}
.radio-label input[type="radio"]:checked { border-color: #FF5A4E !important; }
.radio-label input[type="radio"]:checked::after { background: #FF5A4E !important; }

.checkbox-label { color: var(--text-secondary) !important; }
.checkbox-label input[type="checkbox"] {
  background: #FFFFFF !important;
  border: 2px solid var(--border-dark) !important;
}
.checkbox-label input[type="checkbox"]:checked {
  background: #FF5A4E !important;
  border-color: #FF5A4E !important;
}
.checkbox-label input[type="checkbox"]:checked::after {
  border-color: #FFFFFF !important;
}
.checkbox-label a { color: #FF5A4E !important; }
.checkbox-label a:hover { color: #DC2E1F !important; }

.upload-area {
  background: #FFFFFF !important;
  border: 2px dashed var(--border-dark) !important;
}
.upload-area:hover {
  border-color: #FF5A4E !important;
  background: rgba(255,90,78,0.04) !important;
}
.upload-area p { color: var(--text-secondary) !important; }
.upload-area .upload-icon,
.upload-area .upload-hint { color: var(--text-tertiary) !important; }
.upload-filename { color: #FF5A4E !important; }

.char-count { color: var(--text-tertiary) !important; }
.char-count.over { color: #DC2E1F !important; }
.form-hint { color: var(--text-tertiary) !important; }

/* =====================================================
   PRICING (.plan-*, .checkout-*, .sf-*, .ip-*)
   ===================================================== */
.pricing-page { background: var(--bg) !important; }
.plan-card {
  background: #FFFFFF !important;
  border: 1.5px solid var(--border) !important;
}
.plan-card:hover { border-color: #0A0A0A !important; }
.plan-badge {
  background: #FF5A4E !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(255,90,78,0.4) !important;
}
.plan-name { color: #0A0A0A !important; }
.plan-amount { color: #0A0A0A !important; }
.plan-desc,
.plan-currency,
.plan-period,
.plan-billed { color: var(--text-tertiary) !important; }
.plan-feat { color: var(--text-secondary) !important; }
.plan-divider { border-top: 1px solid var(--border) !important; }

.toggle-track { background: var(--border-dark) !important; }
.save-tag { background: #E7F9EE !important; color: #027A48 !important; }

.success-fee-card,
.investor-plan-card {
  background: #FFFFFF !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 2px 0 rgba(10,10,10,0.03), 0 30px 60px -20px rgba(10,10,10,0.15) !important;
}
.success-fee-badge,
.ip-badge {
  background: #FF5A4E !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(255,90,78,0.4) !important;
}
.sf-icon, .ipf-icon {
  background: rgba(255,90,78,0.1) !important;
  color: #FF5A4E !important;
}
.sf-feat, .ipf { color: var(--text-secondary) !important; }
.sf-example, .ip-price-block {
  background: #F4F2EB !important;
  border: 1px solid var(--border) !important;
}
.sf-example-label { color: #FF5A4E !important; }

/* Checkout overlay */
.checkout-card, .success-card {
  background: #FFFFFF !important;
  border: 1px solid var(--border) !important;
}
.checkout-header { border-bottom: 1px solid var(--border) !important; }
.checkout-summary, .success-details { background: #F4F2EB !important; }
.checkout-close { color: var(--text-tertiary) !important; }
.pay-method {
  background: #FFFFFF !important;
  border: 1.5px solid var(--border) !important;
  color: var(--text-secondary) !important;
}
.pay-method:hover,
.pay-method.active { border-color: #0A0A0A !important; color: #0A0A0A !important; }
.checkout-secure,
.checkout-legal { color: var(--text-tertiary) !important; }
.success-icon { background: #E7F9EE !important; }

.pricing-footer { color: var(--text-tertiary) !important; }

/* =====================================================
   APP / ADMIN — minimal fixes
   ===================================================== */
.app-page, .admin-page { background: var(--bg) !important; }

/* =====================================================
   RESPONSIVE — Investor Apply
   ===================================================== */
@media (max-width: 1024px) {
  .ia-shell { grid-template-columns: 260px 1fr !important; }
  .ia-side { padding: 32px 22px !important; }
  .ia-main { padding: 56px 56px 80px !important; }
  .ia-card-options { grid-template-columns: 1fr 1fr !important; }
  .ia-field-grid { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 900px) {
  .ia-shell { grid-template-columns: 1fr !important; }
  .ia-side {
    position: relative !important;
    height: auto !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 28px 24px !important;
  }
  .ia-side-sub { margin-bottom: 24px !important; }
  .ia-steps { flex-direction: row !important; overflow-x: auto; gap: 8px !important; padding-bottom: 6px; }
  .ia-steps::before { display: none !important; }
  .ia-step { min-width: 180px; flex-shrink: 0; }
  .ia-side-foot { display: none !important; }
  .ia-main { padding: 40px 32px 72px !important; }
  .ia-h1 { font-size: 36px !important; }
  .ia-field-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
  .ia-card-options { grid-template-columns: 1fr !important; }
  .ia-ticket-range { flex-direction: column; align-items: stretch; }
  .ia-ticket-input { min-width: 0 !important; max-width: none !important; width: 100%; }
}
@media (max-width: 560px) {
  .ia-side { padding: 22px 18px !important; }
  .ia-side-logo { padding: 14px 16px !important; }
  .ia-side-title { font-size: 18px !important; }
  .ia-main { padding: 32px 20px 56px !important; }
  .ia-h1 { font-size: 28px !important; letter-spacing: -0.02em !important; }
  .ia-lead { font-size: 15px !important; margin-bottom: 32px !important; }
  .ia-step { min-width: 150px; padding: 12px !important; }
  .ia-step-label { font-size: 13px !important; }
  .ia-step-desc { font-size: 11px !important; }
}

/* =====================================================
   RESPONSIVE — Startup Apply
   ===================================================== */
@media (max-width: 900px) {
  .apply-page { padding-top: 96px !important; padding-bottom: 64px !important; }
  .apply-title { font-size: clamp(28px, 6vw, 40px) !important; }
  .apply-section { padding: 26px 22px !important; }
  .apply-info-box { padding: 22px !important; }
}
@media (max-width: 640px) {
  .apply-grid { grid-template-columns: 1fr !important; }
  .apply-form-wrapper { padding: 0 !important; }
  .apply-section { padding: 22px 18px !important; }
  .apply-section-title { font-size: 16px !important; }
  .radio-group { flex-direction: column !important; gap: 12px !important; }
}

/* =====================================================
   RESPONSIVE — Pricing
   ===================================================== */
@media (max-width: 1024px) {
  .plans-grid { grid-template-columns: repeat(2, 1fr) !important; max-width: 640px !important; }
}
@media (max-width: 768px) {
  .plans-grid { grid-template-columns: 1fr !important; max-width: 420px !important; }
  .pricing-hero { padding: 40px 0 12px !important; }
  .ip-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  .success-fee-section,
  .investor-plan-section { margin-top: 56px !important; }
  .checkout-card { margin: 0 16px; }
}
@media (max-width: 480px) {
  .pay-methods { flex-wrap: wrap; }
  .pay-method { flex: 1 1 45%; min-width: 0; }
  .plan-card { padding: 24px 20px !important; }
  .plan-amount { font-size: 36px !important; }
}

/* =====================================================
   RESPONSIVE — Auth pages
   ===================================================== */
@media (max-width: 480px) {
  .auth-page { padding: 16px !important; align-items: flex-start !important; padding-top: 40px !important; }
  .auth-card { padding: 28px 22px !important; border-radius: 18px !important; }
  .auth-card h1 { font-size: 22px !important; }
}

/* =====================================================
   RESPONSIVE — App / Admin fluid containers
   ===================================================== */
@media (max-width: 768px) {
  .app-page .container,
  .admin-page .container { padding: 0 16px !important; }
}

/* =====================================================
   GLOBAL — prevent horizontal overflow
   ===================================================== */
html, body { overflow-x: hidden !important; }
img, svg, video { max-width: 100%; height: auto; }
