/* Production contrast guardrails. Keep component text legible when light and dark themes meet. */
.public-body .service-zone-grid > .panel,
.public-body .service-zone-grid > a.panel {
  background: linear-gradient(145deg, #15182c, #0d0f1b) !important;
  border-color: rgba(103, 207, 255, .28) !important;
  color: #f7f9ff !important;
}
.public-body .service-zone-grid .eyebrow { color: #72d8ff !important; }
.public-body .service-zone-grid h2,
.public-body .service-zone-grid h3 { color: #fff !important; }
.public-body .service-zone-grid p { color: #b9c1d1 !important; }

.public-body .services-showcase .service-card,
.public-body .services-showcase .service-card h2,
.public-body .services-showcase .service-card h3 { color: #f7f9ff !important; }
.public-body .services-showcase .service-card p { color: #b3bac8 !important; }
.public-body .services-showcase .service-card .badge {
  background: #252a36 !important;
  color: #e1e6ef !important;
}

/* Explicitly preserve dark text on intentionally light public surfaces. */
.public-body .detail-grid .panel,
.public-body .case-detail-layout > aside.panel,
.public-body .project-form.panel,
.public-body .legal {
  background: #fff !important;
  color: #111827 !important;
}
.public-body .detail-grid .panel h2,
.public-body .detail-grid .panel h3,
.public-body .case-detail-layout > aside.panel h2,
.public-body .case-detail-layout > aside.panel h3,
.public-body .project-form.panel label { color: #111827 !important; }
.public-body .detail-grid .panel p,
.public-body .case-detail-layout > aside.panel p,
.public-body .project-form.panel .form-note { color: #4b5563 !important; }

.public-body input,
.public-body select,
.public-body textarea {
  color: #111827;
}
.public-body input::placeholder,
.public-body textarea::placeholder { color: #667085; opacity: 1; }

/* The global light-form rule must not darken the language control in the dark nav. */
.public-body .language-switcher select {
  background-color: #12141a !important;
  border-color: rgba(255,255,255,.42) !important;
  color: #fff !important;
  color-scheme: dark;
  font-weight: 700;
}
.public-body .language-switcher select:hover,
.public-body .language-switcher select:focus-visible {
  border-color: #62d7ff !important;
  outline: 2px solid rgba(39,181,255,.3);
  outline-offset: 2px;
}
.public-body .language-switcher select option {
  background: #12141a;
  color: #fff;
}

/* Buttons must not inherit same-color text from a parent theme. */
.public-body .button,
.public-body button.button { color: #0b1020; }
.public-body .button.light,
.public-body .nav-cta,
.public-body .assistant-compose button { color: #fff !important; }
.public-body .button.secondary { color: #f7f9ff !important; }
.public-body .project-form .button.secondary,
.public-body .detail-grid .button.secondary,
.public-body .case-detail-layout .button.secondary {
  border-color: #4b5563 !important;
  color: #111827 !important;
}

/* Owner console: readable headings, controls, labels and placeholders. */
.admin-body { color: #111827; }
.admin-main h1,
.admin-main h2,
.admin-main h3,
.admin-main h4,
.admin-main label,
.admin-main td,
.admin-main strong { color: #111827; }
.admin-main p,
.admin-main small,
.admin-main dt,
.admin-main .form-note { color: #596273; }
.admin-main input,
.admin-main select,
.admin-main textarea {
  background: #fff;
  color: #111827;
}
.admin-main input::placeholder,
.admin-main textarea::placeholder { color: #667085; opacity: 1; }
.admin-main .button { background: #111827; border-color: #111827; color: #fff; }
.admin-main .button.secondary { background: #fff; color: #111827; }
.admin-main .planner-form,
.admin-main .planner-result { color: #f7f9ff; }
.admin-main .planner-form h1,
.admin-main .planner-form h2,
.admin-main .planner-form h3,
.admin-main .planner-result h1,
.admin-main .planner-result h2,
.admin-main .planner-result h3,
.admin-main .planner-form strong,
.admin-main .planner-result strong { color: #fff; }
.admin-main .planner-form p,
.admin-main .planner-form small,
.admin-main .planner-form label,
.admin-main .planner-result p,
.admin-main .planner-result small { color: #c2c9d6; }

/* Owner login is a light card outside .admin-main. */
.login-card { color: #111827; }
.login-card h1,
.login-card label { color: #111827 !important; }
.login-card p { color: #596273 !important; }
.login-card input {
  background: #fff;
  color: #111827;
}
.login-card .button {
  background: linear-gradient(120deg, #18b9ee, #246bf2 50%, #8137ef) !important;
  border-color: transparent !important;
  color: #fff !important;
}

/* Keep large editorial headings legible when CJK copy wraps on narrow screens. */
.public-body .page-hero h1 {
  line-height: 1.08 !important;
  letter-spacing: -.035em !important;
}
html:lang(zh-CN) .public-body .page-hero h1,
html:lang(zh-TW) .public-body .page-hero h1,
html:lang(ja) .public-body .page-hero h1,
html:lang(ko) .public-body .page-hero h1 {
  line-height: 1.12 !important;
  letter-spacing: -.02em !important;
}
@media (max-width: 600px) {
  .public-body .page-hero:not(.case-title) h1 {
    font-size: clamp(42px, 12.5vw, 54px) !important;
    line-height: 1.12 !important;
    letter-spacing: -.02em !important;
  }
  .public-body .page-hero .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .public-body .page-hero .hero-actions .button {
    width: 100%;
    min-height: 50px;
    padding-inline: 18px;
    text-align: center;
  }
}

@media (forced-colors: active) {
  .public-body .button,
  .admin-main .button { border: 1px solid ButtonText; }
}

/* B2B outbound cards keep direct-to-company and marketplace applications distinct. */
.b2b-engine { margin-top: 34px; }
.b2b-engine > .stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.b2b-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.b2b-prospect { display: grid; align-content: start; gap: 18px; }
.b2b-prospect-head { display: flex; justify-content: space-between; gap: 18px; align-items: start; }
.b2b-prospect-head h3 { margin: 5px 0 8px; font-size: 24px; color: #111827; }
.b2b-prospect-head p { margin: 0; }
.b2b-facts { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 9px 14px; margin: 0; }
.b2b-facts dt { font-size: 12px; color: #667085; }
.b2b-facts dd { margin: 0; color: #111827; overflow-wrap: anywhere; }
.b2b-facts a { color: #175cd3; text-decoration: underline; text-underline-offset: 3px; }
.b2b-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.b2b-output pre { max-height: 360px; overflow: auto; white-space: pre-wrap; padding: 16px; border-radius: 10px; background: #101828; color: #f9fafb; }
.b2b-platform-title { margin-top: 36px; }
@media (max-width: 1100px) { .b2b-list { grid-template-columns: 1fr; } .b2b-engine > .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .b2b-engine > .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .b2b-facts { grid-template-columns: 1fr; gap: 3px; } .b2b-prospect-head { flex-direction: column; } }
