/* ShiftNevis canonical mobile typography v1 — consistent, app-like type scale on phones only. */
@media (max-width: 760px) {
  html body .app {
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  /* App header: concise, readable, never billboard-sized. */
  html body .app .main .app-header__title > b {
    font-size: 15px !important;
    line-height: 1.35 !important;
    letter-spacing: -.1px;
  }
  html body .app .main .app-header__subtitle {
    font-size: 10px !important;
    line-height: 1.45 !important;
  }

  /* Workspace context. Keep selects at 16px to prevent iOS focus zoom. */
  body:not(:has(.dashboard-mobile-home)) .mobile-workspace-bar__head small {
    font-size: 10px !important;
  }
  body:not(:has(.dashboard-mobile-home)) .mobile-workspace-bar__head b {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }
  body:not(:has(.dashboard-mobile-home)) .mobile-workspace-bar__head span:not(.mobile-workspace-bar__icon) {
    font-size: 10.5px !important;
    line-height: 1.5 !important;
  }
  body:not(:has(.dashboard-mobile-home)) .mobile-owner-row b {
    font-size: 11px !important;
  }
  body:not(:has(.dashboard-mobile-home)) .mobile-owner-row small,
  body:not(:has(.dashboard-mobile-home)) .mobile-workspace-bar__select > span {
    font-size: 10px !important;
  }
  body:not(:has(.dashboard-mobile-home)) .mobile-workspace-bar__select > select.select,
  html body .app input,
  html body .app select,
  html body .app textarea {
    font-size: 16px !important;
  }

  /* Canonical page hierarchy. */
  html body .app .content .page-head h1,
  html body .app .content .page-head h2,
  html body .app .content .profile-page-head h2 {
    font-size: 18px !important;
    line-height: 1.4 !important;
    letter-spacing: -.15px;
  }
  html body .app .content .page-head p,
  html body .app .content .profile-page-head p {
    font-size: 11px !important;
    line-height: 1.7 !important;
  }
  html body .app .content .panel__head h2,
  html body .app .content .panel__head h3,
  html body .app .content .section-head h2,
  html body .app .content .section-head h3 {
    font-size: 15px !important;
    line-height: 1.45 !important;
  }

  /* Dashboard home: one deliberate scale instead of many competing sizes. */
  .dashboard-mobile-home .mobile-home-hero h1,
  .dashboard-mobile-home .dashboard-mobile-hero h1 {
    font-size: 21px !important;
    line-height: 1.3 !important;
    letter-spacing: -.25px;
  }
  .dashboard-mobile-home .mobile-home-hero__top > div > span,
  .dashboard-mobile-home .dashboard-mobile-hero__eyebrow,
  .dashboard-mobile-home .mobile-home-menu-mirror-head span,
  .dashboard-mobile-home .mobile-home-card__head span {
    font-size: 10px !important;
    line-height: 1.45 !important;
  }
  .dashboard-mobile-home .mobile-home-hero__copy,
  .dashboard-mobile-home .dashboard-mobile-hero__meta,
  .dashboard-mobile-home .dashboard-mobile-progress__row {
    font-size: 11px !important;
    line-height: 1.65 !important;
  }
  .dashboard-mobile-home .mobile-home-kpi > span,
  .dashboard-mobile-home .requests-mobile-counter small {
    font-size: 10px !important;
  }
  .dashboard-mobile-home .mobile-home-kpi b {
    font-size: 16px !important;
  }
  .dashboard-mobile-home .mobile-home-menu-mirror-head h2,
  .dashboard-mobile-home .mobile-home-card__head h2,
  .dashboard-mobile-home .dashboard-mobile-section__head h2 {
    font-size: 15px !important;
    line-height: 1.45 !important;
  }
  .dashboard-mobile-home .mobile-home-app-btn__copy b,
  .dashboard-mobile-home .dashboard-mobile-step b,
  .dashboard-mobile-home .dashboard-mobile-utility__copy b {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }
  .dashboard-mobile-home .mobile-home-app-btn__copy small,
  .dashboard-mobile-home .dashboard-mobile-step small,
  .dashboard-mobile-home .dashboard-mobile-utility__copy small {
    font-size: 10.5px !important;
    line-height: 1.55 !important;
  }
  .dashboard-mobile-home .mobile-home-app-btn__badge,
  .dashboard-mobile-home .dashboard-mobile-hero__status,
  .dashboard-mobile-home .mobile-home-hero__top strong {
    font-size: 9.5px !important;
  }

  /* Profile 1..4 hub: same visual language as program stages 5..8. */
  .profile-mobile-menu-panel__head {
    align-items: center !important;
    margin-bottom: 10px !important;
    padding: 2px 3px 11px !important;
  }
  .profile-mobile-menu-panel__copy {
    min-width: 0;
    display: grid;
    gap: 2px;
  }
  .profile-mobile-menu-panel__eyebrow {
    color: #7c3aed !important;
    font-size: 10px !important;
    line-height: 1.4 !important;
    font-weight: 900 !important;
  }
  .profile-mobile-menu-panel__head h2 {
    margin: 0 !important;
    color: #271f31 !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
    font-weight: 950 !important;
  }
  .profile-mobile-menu-panel__copy p {
    margin: 0;
    color: #8a8195;
    font-size: 10.5px;
    line-height: 1.55;
    font-weight: 750;
  }
  .profile-mobile-menu-panel__meta {
    min-height: 30px !important;
    padding: 6px 9px !important;
    font-size: 9.5px !important;
  }
  .profile-mobile-menu__item {
    min-height: 78px !important;
    grid-template-columns: 52px minmax(0,1fr) auto 28px !important;
    gap: 10px !important;
    padding: 11px !important;
  }
  .profile-mobile-menu__icon {
    width: 52px !important;
    height: 52px !important;
    border-radius: 15px !important;
    background: #efe7ff !important;
  }
  .profile-mobile-menu__step-number {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #6d28d9;
    font-size: 17px;
    line-height: 1;
    font-weight: 950;
  }
  .profile-mobile-menu__copy b {
    display: flex !important;
    align-items: center;
    gap: 6px;
    font-size: 13.5px !important;
    line-height: 1.45 !important;
  }
  .profile-mobile-menu__title-icon {
    color: #7c3aed;
    font-size: 12px;
  }
  .profile-mobile-menu__copy small {
    font-size: 10.5px !important;
    line-height: 1.55 !important;
  }
  .profile-mobile-menu__status {
    min-height: 27px !important;
    padding: 6px 8px !important;
    font-size: 9.5px !important;
  }
  .profile-mobile-menu__arrow {
    width: 28px !important;
    height: 28px !important;
    font-size: 10px !important;
  }

  /* Profile detail screens. */
  .profile-mobile-screen-head__copy h2 {
    font-size: 16px !important;
    line-height: 1.4 !important;
  }
  .profile-mobile-screen-head__copy p {
    font-size: 10.5px !important;
    line-height: 1.55 !important;
  }
  .profile-mobile-screen-head__badge {
    font-size: 9px !important;
  }
  .profile-mobile-detail .field__label {
    font-size: 11px !important;
    line-height: 1.45 !important;
  }
  .profile-mobile-detail .field__hint {
    font-size: 10px !important;
    line-height: 1.55 !important;
  }

  /* Program stage hub 5..8 and sub-screens. */
  .program-workflow-progress b,
  .program-workflow-mobile-back__copy b {
    font-size: 15px !important;
    line-height: 1.45 !important;
  }
  .program-workflow-progress span,
  .program-workflow-mobile-back__copy small,
  .program-workflow-mobile-back__step {
    font-size: 10.5px !important;
    line-height: 1.5 !important;
  }
  .program-workflow-tabs__title {
    font-size: 13.5px !important;
    line-height: 1.45 !important;
  }
  .program-workflow-tabs__desc {
    font-size: 10.5px !important;
    line-height: 1.55 !important;
  }
  .program-workflow-tabs__number {
    font-size: 17px !important;
  }
  .program-workflow-mobile-step-nav__btn b {
    font-size: 12.5px !important;
  }
  .program-workflow-mobile-step-nav__btn small {
    font-size: 9.5px !important;
  }

  /* Personnel, requests, programs and policy screens. */
  .personnel-mobile-section__head h3,
  .requests-mobile-detail-head b,
  .programs-mobile-section__head h2,
  .policy-page h2,
  .policy-page h3 {
    font-size: 15px !important;
    line-height: 1.45 !important;
  }
  .personnel-mobile-section__head span,
  .personnel-mobile-section__head small,
  .requests-mobile-detail-head small,
  .requests-mobile-detail-head span,
  .programs-mobile-section__head small,
  .policy-page p,
  .policy-page small {
    font-size: 10.5px !important;
    line-height: 1.6 !important;
  }
  .personnel-mobile-field label,
  .requests-mobile-launcher__copy b,
  .programs-mobile-card b {
    font-size: 12.5px !important;
  }

  /* Bottom dock is navigation, not content. */
  .mobile-app-dock__label {
    font-size: 10px !important;
    line-height: 1.25 !important;
  }
  .mobile-app-more-sheet__head h2 {
    font-size: 16px !important;
    line-height: 1.4 !important;
  }
  .mobile-app-more-sheet__head small,
  .mobile-app-more-sheet__head p,
  .mobile-app-more-item__copy small {
    font-size: 10px !important;
    line-height: 1.55 !important;
  }
  .mobile-app-more-item__copy b {
    font-size: 12.5px !important;
    line-height: 1.45 !important;
  }

  /* General badges and helper copy should remain legible. */
  html body .app .badge,
  html body .app .chip,
  html body .app .status-pill {
    font-size: 9.5px;
  }
}

@media (max-width: 390px) {
  .profile-mobile-menu-panel__copy p { font-size: 10px; }
  .profile-mobile-menu__item {
    grid-template-columns: 48px minmax(0,1fr) auto 26px !important;
    min-height: 74px !important;
    gap: 8px !important;
    padding: 10px !important;
  }
  .profile-mobile-menu__icon { width: 48px !important; height: 48px !important; }
  .profile-mobile-menu__copy b { font-size: 13px !important; }
  .profile-mobile-menu__copy small { font-size: 10px !important; }
  .profile-mobile-menu__status { font-size: 9px !important; }
}
