/*
 * Merge typography scale
 *
 * This file is intentionally loaded after styles.css and theme.css. It maps
 * existing components to semantic text roles without changing their layout,
 * colours, theme tokens or application behaviour.
 */
:root {
  --type-page-title: 28px;
  --type-section-title: 21px;
  --type-card-title: 17px;
  --type-body-large: 16px;
  --type-body: 15px;
  --type-secondary: 14px;
  --type-control: 14px;
  --type-chip: 13px;
  --type-meta: 12px;
  --leading-tight: 1.28;
  --leading-body: 1.55;
  --leading-relaxed: 1.65;
}

/* Shared application shell and sidebar */
.search-brand {
  font-size: 23px;
  line-height: var(--leading-tight);
}

.search-navigation button {
  font-size: 15px;
  line-height: 1.35;
}

.sidebar-user strong {
  font-size: 14px;
  line-height: 1.3;
}

.sidebar-user small,
.project-profile-progress span,
.project-profile-progress small {
  font-size: var(--type-meta);
  line-height: 1.4;
}

/* Page headings shared by dashboard sections */
.search-header h1,
.events-header h1,
.projects-header h1,
.settings-header h1 {
  font-size: var(--type-page-title);
  line-height: var(--leading-tight);
}

.search-header p,
.events-header p,
.projects-header p,
.settings-header p {
  font-size: var(--type-body);
  line-height: var(--leading-body);
}

/* Search */
.create-request-button,
.search-mode-tabs button,
.search-apply,
.search-clear {
  font-size: var(--type-body);
}

.filter-label,
.filter-row button,
.search-input-row input {
  font-size: var(--type-control);
}

.popular-tags button {
  font-size: var(--type-chip);
}

.results-heading {
  font-size: var(--type-body);
  line-height: 1.4;
}

.results-heading > div:first-child span,
.sort-tabs button {
  font-size: var(--type-chip);
}

.person-title-line h2 {
  font-size: var(--type-card-title);
  line-height: 1.35;
}

.availability,
.project-status {
  font-size: var(--type-meta);
}

.person-role {
  font-size: var(--type-secondary);
}

.person-meta,
.person-project {
  font-size: var(--type-meta);
  line-height: 1.45;
}

.person-description {
  font-size: var(--type-body);
  line-height: var(--leading-relaxed);
}

.person-tags span,
.person-interests span,
.person-interests::before {
  font-size: var(--type-chip);
}

.person-actions button {
  font-size: var(--type-control);
}

.insight-card h2 {
  font-size: var(--type-card-title);
  line-height: 1.35;
}

.recommended-person strong,
.recent-card strong {
  font-size: var(--type-secondary);
}

.recommended-person small,
.recent-card small,
.stats-card small {
  font-size: var(--type-meta);
  line-height: 1.4;
}

.insight-link,
.skill-cloud > span,
.recent-card em {
  font-size: var(--type-meta);
}

.search-empty h2,
.search-error h2,
.search-loading h2 {
  font-size: var(--type-section-title);
}

.search-empty p,
.search-error p,
.search-loading p {
  font-size: var(--type-secondary);
  line-height: var(--leading-body);
}

/* Events catalogue and event details */
.events-create-button,
.events-search-field input,
.events-filter-button {
  font-size: var(--type-control);
}

.events-filter-tags button,
.events-sort button {
  font-size: var(--type-chip);
}

.event-kicker,
.event-category,
.event-labels span,
.event-status,
.event-meta,
.event-facts,
.current-event-meta,
.promo-topic,
.event-card-tags span,
.event-detail-status,
.event-detail-facts span,
.event-detail-facts small {
  font-size: var(--type-meta);
  line-height: 1.45;
}

.current-event-info h2,
.event-card h2,
.events-section-heading h2,
.event-detail-title,
.event-team-heading h2 {
  font-size: var(--type-card-title);
  line-height: 1.35;
}

.current-event-info > p,
.event-card > p,
.event-card-description,
.event-organizer {
  font-size: var(--type-secondary);
  line-height: var(--leading-body);
}

.current-event-actions button,
.promo-footer button,
.event-card footer button,
.event-detail-actions button,
.event-member-card footer button,
.event-seeker-card button {
  font-size: var(--type-control);
}

.promo-footer small,
.events-section-heading > div:first-child span {
  font-size: var(--type-meta);
}

.event-detail-page h1 {
  font-size: var(--type-page-title);
  line-height: var(--leading-tight);
}

.event-detail-organizer,
.event-detail-summary,
.event-detail-section p,
.event-detail-description,
.event-source-note {
  font-size: var(--type-body);
  line-height: var(--leading-relaxed);
}

.event-detail-section h2,
.event-seekers-panel h2 {
  font-size: var(--type-section-title);
  line-height: 1.35;
}

.event-detail-section h3,
.event-detail-card h3,
.event-seeker-head h3,
.event-member-head h3 {
  font-size: var(--type-card-title);
  line-height: 1.35;
}

.event-seeker-head p,
.event-member-head p,
.event-member-card > p {
  font-size: var(--type-secondary);
  line-height: var(--leading-body);
}

.event-seeker-head small,
.event-member-head small,
.event-detail-labels span,
.event-member-skills span,
.event-required-skills span,
.event-timeline span small {
  font-size: var(--type-meta);
}

.popular-events-card li strong,
.deadline-card strong,
.recommended-events-card strong {
  font-size: var(--type-secondary);
  line-height: 1.35;
}

.popular-events-card li small,
.deadline-card em,
.recommended-events-card small,
.recommended-events-card a,
.recommended-events-card > p,
.events-stats-grid small {
  font-size: var(--type-meta);
  line-height: 1.4;
}

.popular-events-card li b,
.recommended-events-card b {
  font-size: var(--type-chip);
}

/* Projects */
.projects-header-actions button,
.projects-toolbar input,
.projects-toolbar button,
.project-filter-tabs button,
.projects-sort,
.project-view-tabs button,
.project-card footer button {
  font-size: var(--type-control);
}

.projects-stats small,
.project-card-meta,
.project-card header p,
.project-card header p span,
.project-progress-head,
.project-status-badge {
  font-size: var(--type-meta);
  line-height: 1.4;
}

.project-card h2,
.project-card h3 {
  font-size: var(--type-card-title);
  line-height: 1.35;
}

.project-card-description,
.project-card > p,
.project-card-activity,
.project-activity {
  font-size: var(--type-secondary);
  line-height: var(--leading-body);
}

.project-detail-hero h1 {
  font-size: var(--type-page-title);
  line-height: var(--leading-tight);
}

.project-detail-hero p {
  font-size: var(--type-body);
  line-height: var(--leading-body);
}

.project-detail-tags span,
.project-task-tabs button,
.project-detail-panel header > span,
.task-priority,
.task-status,
.project-team-list small,
.project-team-list em,
.project-resource-list a span,
.project-activity-list small {
  font-size: var(--type-meta);
}

.project-detail-panel h2 {
  font-size: var(--type-section-title);
  line-height: 1.35;
}

.project-task h3 {
  font-size: var(--type-card-title);
}

.project-task p {
  font-size: var(--type-secondary);
  line-height: var(--leading-body);
}

.project-task small,
.project-detail-empty {
  font-size: var(--type-meta);
}

.project-task > button,
.project-detail-panel button,
.project-resource-button,
.project-status-actions button {
  font-size: var(--type-control);
}

/* Messenger */
.chats-header h1 {
  font-size: 24px;
  line-height: var(--leading-tight);
}

.chats-header p,
.new-chat-button,
.dialogs-search input {
  font-size: var(--type-body);
}

.dialog-tabs button {
  font-size: var(--type-chip);
}

.dialog-summary > strong,
.chat-header-person strong {
  font-size: var(--type-body);
  line-height: 1.35;
}

.dialog-summary > small,
.dialog-summary > span,
.chat-header-person small,
.chat-member-count {
  font-size: var(--type-chip);
  line-height: 1.4;
}

.dialog-summary > em b,
.dialog-time,
.dialog-time i,
.chat-nav-unread,
.chat-message small {
  font-size: var(--type-meta);
}

.chat-empty-state h2 {
  font-size: var(--type-section-title);
}

.chat-empty-state > p,
.active-discussions span,
.dialogs-state {
  font-size: var(--type-secondary);
  line-height: var(--leading-body);
}

.dialogs-state strong {
  font-size: var(--type-body-large);
}

.chat-message strong {
  font-size: var(--type-chip);
}

.chat-system-message,
.chat-user-results > p,
.chat-user-results button small {
  font-size: var(--type-meta);
}

.chat-user-results button strong {
  font-size: var(--type-secondary);
}

.chat-message p,
.chat-composer textarea {
  font-size: var(--type-body);
  line-height: var(--leading-body);
}

.chat-composer button {
  font-size: var(--type-control);
}

/* Profile */
.profile-hero-info h1 {
  font-size: var(--type-page-title);
  line-height: var(--leading-tight);
}

.profile-hero-info > p,
.profile-hero-meta,
.profile-languages,
.profile-meta {
  font-size: var(--type-secondary);
  line-height: 1.45;
}

.profile-hero-actions button {
  font-size: var(--type-body);
}

.profile-panel h2,
.profile-skills-card h2,
.profile-interests-card h2,
.profile-projects-card h2,
.profile-achievements-card h2,
.profile-links-card h2 {
  font-size: var(--type-card-title);
  line-height: 1.35;
}

.profile-completion-card > p,
.profile-completion-card li,
.profile-completion-card ul,
.profile-empty,
.profile-about-card button,
.profile-panel > header > button,
.profile-projects-card > header button {
  font-size: var(--type-secondary);
  line-height: 1.45;
}

.profile-about-card > p {
  font-size: var(--type-body);
  line-height: var(--leading-relaxed);
}

.profile-skill-chips span,
.profile-interest-columns span,
.profile-open-status {
  font-size: var(--type-chip);
  line-height: 1.4;
}

.profile-interest-columns h3 {
  font-size: var(--type-meta);
}

.profile-project-row > div > strong,
.profile-achievements-card strong,
.profile-link-list strong {
  font-size: var(--type-secondary);
}

.profile-project-row small,
.profile-achievements-card small,
.profile-link-list small {
  font-size: var(--type-meta);
  line-height: 1.4;
}

.profile-project-row em,
.profile-project-row > b,
.profile-project-row > i,
.profile-project-members,
.profile-achievements-card em {
  font-size: var(--type-meta);
}

.profile-add-project,
.profile-languages button {
  font-size: var(--type-control);
}

.profile-modal h2 {
  font-size: var(--type-section-title);
}

.profile-modal > div > p,
.profile-modal-form > label,
.profile-modal-form input,
.profile-modal-form textarea,
.profile-modal-form select,
.profile-choice span,
.profile-skill-selector span,
.profile-skill-category-list button,
.profile-modal-actions button,
.profile-modal-form > button,
.profile-skill-editor-footer p,
.profile-skill-editor-footer button {
  font-size: var(--type-control);
}

.profile-modal-form legend,
.profile-modal-feedback,
.profile-modal-form label small {
  font-size: var(--type-meta);
}

/* Settings */
.settings-section > h2 {
  font-size: 19px;
  line-height: 1.35;
}

.settings-row strong {
  font-size: var(--type-body-large);
  line-height: 1.35;
}

.settings-row p,
.settings-row small {
  font-size: var(--type-secondary);
  line-height: var(--leading-body);
}

.settings-select select,
.settings-text-action,
.settings-outline-action,
.settings-delete-action,
.settings-modal-actions button {
  font-size: var(--type-control);
}

.settings-version,
.settings-session em {
  font-size: var(--type-meta);
}

.settings-feedback,
.settings-session strong,
.settings-session span {
  font-size: var(--type-secondary);
  line-height: 1.45;
}

.settings-modal h2 {
  font-size: var(--type-section-title);
}

.settings-modal > div > p,
.settings-modal-form label {
  font-size: var(--type-secondary);
  line-height: var(--leading-body);
}

.settings-modal-form input {
  font-size: var(--type-body);
}

/* Registration, sign-in and onboarding */
.dialog > p,
.confirm-heading p,
.confirm-meta,
.onboarding-heading p,
.privacy-note,
.birthday-message,
.location-timezone,
.onboarding-note {
  font-size: var(--type-secondary);
  line-height: var(--leading-body);
}

.dialog label,
.signup-field,
.birthday-fields label,
.location-form label,
.onboarding-field label {
  font-size: var(--type-secondary);
}

.dialog input,
.signup-field > input,
.password-wrap input,
.birthday-fields input,
.location-form input,
.onboarding-field input,
.onboarding-field select,
.onboarding-field textarea {
  font-size: var(--type-body-large);
}

.back-button,
.left-progress-head,
.step-progress-head,
.form-error {
  font-size: var(--type-chip);
}

.onboarding-heading h2 {
  font-size: 25px;
  line-height: var(--leading-tight);
}

.skill-chip,
.interest-chip,
.country-option,
.year-option,
.source-option,
.onboarding-card button {
  font-size: var(--type-control);
}

/* Generic operational states */
.events-state,
.events-loading,
.events-empty,
.events-error,
.projects-state,
.projects-empty,
.projects-error,
.profile-loading,
.profile-error {
  font-size: var(--type-secondary);
  line-height: var(--leading-body);
}

@media (max-width: 720px) {
  :root {
    --type-page-title: 26px;
    --type-section-title: 20px;
    --type-card-title: 17px;
    --type-body-large: 16px;
    --type-body: 15px;
    --type-secondary: 14px;
    --type-control: 14px;
    --type-chip: 13px;
    --type-meta: 12px;
  }

  .search-header h1,
  .events-header h1,
  .projects-header h1,
  .settings-header h1,
  .profile-hero-info h1,
  .event-detail-page h1,
  .project-detail-hero h1 {
    overflow-wrap: anywhere;
  }

  .person-actions,
  .event-card footer,
  .project-card footer {
    gap: 10px;
  }

  .person-actions button,
  .event-card footer button,
  .project-card footer button {
    min-height: 46px;
    white-space: normal;
  }

  .settings-row {
    row-gap: 12px;
  }

  .settings-select select {
    width: 100%;
  }
}
