/* Stage 39.1 - Global readability and mobile footer production polish */
:root{
  --ibo-text-main:#071426;
  --ibo-text-body:#17243b;
  --ibo-text-muted:#334155;
  --ibo-text-soft:#475569;
  --ibo-dark-text:#ffffff;
  --ibo-dark-muted:#e2ecff;
  --ibo-dark-soft:#c8d8f5;
  --ibo-link-blue:#075bdc;
  --ibo-card-border:#d9e6fb;
}

html{ text-rendering:optimizeLegibility; -webkit-font-smoothing:antialiased; }
body{ color:var(--ibo-text-body); }

/* Sitewide text visibility guard */
p, li, small, span, label, td, th, input, textarea, select, button, a{ line-height:1.55; }
p, li, .muted, .text-muted, .helper, .caption, .sub, .subtitle, .description,
.card p, .panel p, .ibo-section-title p, .ibo-tool-card p, .ibo-ecosystem-card p,
.ibo-market-card p, .ibo-trust-grid39 p, .ibo-benefit p, .ibo-stat small,
.ibo-bottom-stat small, .pulse24-mini span, .app-topbar p, .side-user p,
.stage37-topbar p, .stage37-card p, .stage37-panel p, .surf-rule-card p{
  color:var(--ibo-text-muted) !important;
  opacity:1 !important;
  filter:none !important;
}

h1,h2,h3,h4,h5,h6,.card h3,.panel h3,.ibo-section-title h2{
  color:var(--ibo-text-main);
  opacity:1 !important;
}

/* Dark sections require bright text, not faded text */
.ibo-hero, .ibo-dark-band, .ibo-footer, .app-sidebar, .stage37-sidebar,
.stage37-admin-sidebar, .stage37-member-sidebar, .surf-hero, .surf-session,
.stage379-surf-panel, .stage38-session, .ibo-live-panel, .ibo-production-strip,
[class*="dark"], [class*="gradient"]{
  color:var(--ibo-dark-text);
}
.ibo-hero p, .ibo-hero small, .ibo-hero span:not(.ibo-gradient-text),
.ibo-dark-band p, .ibo-dark-band small, .ibo-dark-band span,
.ibo-footer p, .ibo-footer small, .ibo-footer span,
.app-sidebar p, .app-sidebar span, .app-sidebar a, .app-sidebar button,
.stage37-admin-sidebar p, .stage37-admin-sidebar span, .stage37-admin-sidebar a,
.stage37-member-sidebar p, .stage37-member-sidebar span, .stage37-member-sidebar a,
.surf-hero p, .surf-hero span, .surf-session p, .surf-session span,
.ibo-live-panel p, .ibo-live-panel span, .ibo-production-strip span{
  color:var(--ibo-dark-muted) !important;
  opacity:1 !important;
}
.ibo-hero h1,.ibo-hero h2,.ibo-hero h3,
.ibo-dark-band h1,.ibo-dark-band h2,.ibo-dark-band h3,
.ibo-footer h1,.ibo-footer h2,.ibo-footer h3,
.surf-hero h1,.surf-hero h2,.surf-hero h3,
.surf-session h1,.surf-session h2,.surf-session h3{
  color:#fff !important;
  opacity:1 !important;
}

/* Dark cards inside dark bands */
.ibo-benefit, .ibo-bottom-stat, .ibo-live-bar, .ibo-production-strip,
.ibo-production-strip div{ border-color:rgba(255,255,255,.18) !important; }
.ibo-benefit h3,.ibo-benefit p,.ibo-bottom-stat b,.ibo-bottom-stat small,
.ibo-live-bar,.ibo-live-bar *,.ibo-production-strip b,.ibo-production-strip span{
  opacity:1 !important;
  filter:none !important;
}
.ibo-benefit p,.ibo-bottom-stat small{ color:#dbeafe !important; }
.ibo-production-strip b{ color:#ffffff !important; }

/* Light cards and sections */
.ibo-tool-card, .ibo-market-card, .ibo-ecosystem-card, .ibo-trust-grid39 > div,
.ibo-stats-card, .card, .panel, .stat-card, .stage37-card, .stage37-panel,
.surf-rule-card, .sponsor-slot, .reward-card, .quick-action-card{
  color:var(--ibo-text-body) !important;
  border-color:var(--ibo-card-border) !important;
}
.ibo-tool-card h3, .ibo-market-card h3, .ibo-ecosystem-card h3,
.ibo-trust-grid39 h3, .card h3, .panel h3, .stat-card h3,
.reward-card h3, .sponsor-slot h3{
  color:var(--ibo-text-main) !important;
}
.ibo-tool-card p, .ibo-market-card p, .ibo-ecosystem-card p,
.ibo-trust-grid39 p, .card p, .panel p, .stat-card p,
.reward-card p, .sponsor-slot p{
  color:var(--ibo-text-muted) !important;
}

/* Inputs and forms */
input, textarea, select{
  color:#0f172a !important;
  background:#fff !important;
  border:1px solid #bcd0ee !important;
  font-size:16px;
}
input::placeholder, textarea::placeholder{
  color:#64748b !important;
  opacity:1 !important;
}
input:focus, textarea:focus, select:focus{
  outline:3px solid rgba(7,91,220,.18);
  border-color:#075bdc !important;
}

/* Buttons and links */
a{ color:inherit; }
.ibo-btn, .btn, button{ font-weight:800; }
.ibo-btn.blue, .btn-primary{ color:#fff !important; }
.ibo-btn.outline{ color:#fff !important; border-color:rgba(255,255,255,.45) !important; }
.ibo-search button, .ibo-btn.gold{ color:#071426 !important; }

/* Footer desktop polish */
.ibo-footer{
  background:#071126 !important;
  color:#fff !important;
  padding-top:64px !important;
  padding-bottom:28px !important;
}
.ibo-footer-grid{
  display:grid !important;
  grid-template-columns:1.35fr repeat(4, minmax(130px,1fr)) 1.25fr !important;
  gap:34px !important;
  align-items:start !important;
}
.ibo-footer h3{
  color:#ffffff !important;
  font-size:17px !important;
  line-height:1.3 !important;
  margin:0 0 14px !important;
  letter-spacing:.01em;
}
.ibo-footer p{
  color:#dbeafe !important;
  font-size:15px !important;
  line-height:1.75 !important;
  margin:10px 0 16px !important;
}
.ibo-footer a{
  display:block !important;
  color:#e8f1ff !important;
  font-size:15px !important;
  line-height:1.65 !important;
  margin:8px 0 !important;
  opacity:1 !important;
  text-decoration:none !important;
}
.ibo-footer a:hover{ color:#ffffff !important; text-decoration:underline !important; }
.ibo-newsletter{ display:grid; gap:12px; }
.ibo-newsletter input{
  width:100% !important;
  min-height:48px !important;
  border-radius:12px !important;
  padding:0 14px !important;
}
.ibo-newsletter button{ width:100% !important; min-height:48px !important; border-radius:12px !important; }
.ibo-copyright{
  display:flex;
  justify-content:space-between;
  gap:18px;
  border-top:1px solid rgba(255,255,255,.14);
  margin-top:34px !important;
  padding-top:22px !important;
  color:#dbeafe !important;
  font-size:14px !important;
}
.ibo-copyright span{ color:#dbeafe !important; opacity:1 !important; }

/* Homepage readability refinements */
.ibo-navlinks a{ color:#f4f8ff !important; opacity:1 !important; font-weight:800; }
.ibo-kicker{ color:#e7ddff !important; opacity:1 !important; }
.ibo-proof span{ color:#ffffff !important; opacity:1 !important; }
.ibo-floating-stats small{ color:#475569 !important; opacity:1 !important; }
.ibo-live-item{ color:#e2ecff !important; }

/* Mobile and tablet footer/page polish */
@media (max-width:1100px){
  .ibo-footer-grid{ grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:28px !important; }
  .ibo-footer-grid > div:first-child,
  .ibo-footer-grid > div:last-child{ grid-column:span 2; }
}
@media (max-width:760px){
  body{ font-size:16px; }
  .container{ width:min(100% - 28px, 1180px) !important; }
  .ibo-footer{ padding:46px 0 24px !important; }
  .ibo-footer-grid{ grid-template-columns:1fr !important; gap:24px !important; }
  .ibo-footer-grid > div:first-child,
  .ibo-footer-grid > div:last-child{ grid-column:auto; }
  .ibo-footer-grid > div{
    background:rgba(255,255,255,.045);
    border:1px solid rgba(255,255,255,.12);
    border-radius:18px;
    padding:18px;
  }
  .ibo-footer h3{ font-size:18px !important; margin-bottom:12px !important; }
  .ibo-footer a{ font-size:16px !important; line-height:1.9 !important; padding:3px 0; }
  .ibo-footer p{ font-size:16px !important; }
  .ibo-copyright{ flex-direction:column; text-align:center; font-size:14px !important; }
  .ibo-nav{ gap:14px !important; }
  .ibo-navlinks{ display:none !important; }
  .ibo-actions{ margin-left:auto; }
  .ibo-mobile-menu{ display:inline-flex !important; }
  .ibo-hero h1{ font-size:clamp(42px,12vw,68px) !important; line-height:1.02 !important; }
  .ibo-hero p{ font-size:17px !important; }
  .ibo-search{ grid-template-columns:1fr !important; }
  .ibo-search button{ min-height:52px; }
  .ibo-floating-stats, .ibo-stats-card{ border-radius:22px !important; }
  .ibo-stat small, .ibo-tool-card p, .ibo-ecosystem-card p, .ibo-market-card p{ font-size:14px !important; line-height:1.55 !important; }
}
