/* Readability corrections, not a theme replacement. Icon-only actions, privacy
   masks, badges, navigation labels and image overlays keep their own styling. */
:root{--read-ink:#eaf2fc;--read-muted:#b8c9dd;--read-placeholder:#aebfd4}
html[data-design=light]{--read-ink:#18324b;--read-muted:#415b72;--read-placeholder:#536c82}

/* Reading content on the existing neutral card and form surfaces. */
:is(.social-post-text,.social-comment-text,.social-thread-comment>p,
  .business-card>p,.business-card>pre,.people-card>div>p,.people-request>p,
  .people-dialog>p,.people-message>p,.company-showcase-card>p,
  .company-editor>p,.company-showcase-notice,.member-context>p,
  .member-action-card>p,.discovery-heading>p,.discovery-preset>p,
  .preview-description,.preview-reasons,.match-summary,.match-detail ul,
  .assistant-bubble>p){font-size:16px!important;line-height:1.7!important}
html :is(.social-post-text,.social-comment-text,.social-thread-comment>p,
  .business-card>p,.business-card>pre,.people-card>div>p,.people-request>p,
  .people-dialog>p,.company-showcase-card>p,.company-editor>p,
  .discovery-heading>p,.discovery-preset>p,.preview-description,
  .preview-reasons,.match-summary,.match-detail ul,.assistant-bubble>p){color:var(--read-ink)!important}

/* Supporting text is still readable; timestamps remain visually secondary. */
html :is(.social-author small,.social-comment-author time,.social-comments article>small,
  .social-status,.social-upload-info small,.social-upload-info>.social-status,
  .social-group-card>small,.social-group-card>.business-muted,
  .social-reply-target,.social-reply-context>span,
  .business-muted,.business-form>small,.business-form label>small,
  .catalog-image-item small,.company-edit-field>small,.company-gallery>p,
  .company-reference-upload small,.company-showcase-card>small,
  .member-profile-photo p,.profile-visibility,.member-search-context,
  .discovery-disclosure,.home-need-help,.preview-provenance,
  .preview-location,.preview-industry,.preview-criteria summary,
  .match-score span,.assistant-speaker,.assistant-bubble>small,
  .assistant-composer .business-actions>small,.assistant-chat-top>.business-muted,
  .people-conversation small,.people-message>small,.people-status,
  .activity-card time){font-size:14px!important;line-height:1.6!important;color:var(--read-muted)!important;opacity:1}

/* Labels and entered values must not shrink to the helper-text size. */
:is(.business-form label,.social-field,.member-profile-field,.company-edit-field,
  .company-showcase-field,.discovery-field,.member-required-field,
  .people-message-form label,.assistant-composer label){font-size:16px!important;line-height:1.5}
:is(.business-form,.social-field,.member-profile-field,.company-edit-field,
  .company-showcase-field,.discovery-field,.people-search,.people-message-form,
  .actor-compose,.actor-toolbar,.home-need,.match-composer) :is(
  input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),
  textarea,select){font-size:16px!important;line-height:1.6!important}
html :is(.business-form,.social-field,.member-profile-field,.company-edit-field,
  .company-showcase-field,.discovery-field,.people-search,.people-message-form,
  .actor-compose,.actor-toolbar,.home-need,.match-composer) :is(input,textarea)::placeholder{
  color:var(--read-placeholder)!important;opacity:1}
.member-profile-field input[readonly]{opacity:1}

/* Ordinary text controls only: never select post reaction icons or bottom nav. */
:is(.company-edit-actions,.company-showcase-actions,.profile-photo-actions,
  .member-profile-actions,.discovery-actions,.discovery-saved-bar,
  .people-actions,.people-message-form,.assistant-composer .business-actions,
  .social-group-main-actions,.social-group-management-actions,
  .social-join-request-controls,.social-group-sharing) :is(button,a),
.profile-tabs button,.assistant-chat-top>button,.company-gallery-item button,
.social-toolbar>button,.social-comment-compose>button{
  font-size:16px!important;line-height:1.45;white-space:normal;overflow-wrap:normal;word-break:normal}
.assistant-bubble .business-actions :is(button,a){font-size:15px!important;line-height:1.45}

/* XibLive summaries were smaller than Stream despite carrying the same content. */
.social-live-card .social-post-text{font-size:16px!important;line-height:1.65!important}
.social-live-card .social-author small{font-size:14px!important}
.social-live-card .social-author .social-author-name strong{font-size:15px!important}
.social-live-card h2{font-size:18px!important;line-height:1.4}

/* Explicit surface exceptions: outgoing messages and light notices must not
   inherit the opposite theme's neutral-card text color. */
html .people-message.is-own>p{color:#fff!important}
html .people-message.is-own>small{color:#edf5ff!important;opacity:1}
html:not([data-design=light]) .assistant-turn-user .assistant-bubble>p{color:#f0f6ff!important}
html[data-design=light] .assistant-turn-user .assistant-bubble>p{color:#183c5c!important}
.company-visibility-notice :is(strong,p){color:#183955!important;opacity:1}
html[data-theme=dark] .company-visibility-notice :is(strong,p),
body[data-theme=dark] .company-visibility-notice :is(strong,p){color:#eaf2fc!important}

@media(max-width:650px){
  .assistant-bubble>p,.assistant-composer textarea{font-size:16px!important}
  #view-assistant>.view-heading p{font-size:16px!important;line-height:1.6}
  .assistant-composer .business-actions>small{font-size:14px!important;flex-basis:100%}
  .company-edit-actions,.company-showcase-actions,.social-group-main-actions{gap:10px}
}
