/* One readable type scale for cards, editor controls and portalled profiles. */
:root{
  --nm-readable-control:15px;
  --nm-readable-body:16px;
  --nm-readable-copy:17px;
  --nm-readable-small:13px;
  --nm-readable-trait:13px;
  --nm-readable-tab:15px;
  --nm-readable-caption:11px;
  --nm-bottom-space:100px;
}
html[data-nm-text-size=large]{
  --nm-readable-control:16px;
  --nm-readable-body:17px;
  --nm-readable-copy:18px;
  --nm-readable-small:15px;
  --nm-readable-trait:15px;
  --nm-readable-tab:16px;
  --nm-readable-caption:13px;
}
html[data-nm-text-size=larger]{
  --nm-readable-control:18px;
  --nm-readable-body:18px;
  --nm-readable-copy:20px;
  --nm-readable-small:16px;
  --nm-readable-trait:16px;
  --nm-readable-tab:18px;
  --nm-readable-caption:14px;
}
:root :is(.nm-app,.nm-modal) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),textarea,select){
  min-width:0;
  max-width:100%;
  min-height:44px;
  font-size:max(16px,var(--nm-readable-body))!important;
  line-height:1.5!important;
}
:root :is(.nm-app,.nm-modal) :is(.field-hint,.privacy-small,.nm-privacy-note){font-size:var(--nm-readable-small)!important;line-height:1.6!important}
:root :is(.page-heading>p,.form-section-heading p,.nm-start-intro p,.nm-privacy-preview header p){max-width:68ch;text-wrap:pretty}
:root .nm-profile-navigation.nm-profile-editor-nav button{font-size:var(--nm-readable-control)!important;line-height:1.5!important;overflow-wrap:normal}
:root .nm-profile-editor-nav .nm-profile-extra>summary{font-size:var(--nm-readable-control)!important;line-height:1.5!important}
:root .nm-profile-editor-nav .nm-profile-extra>summary span{font-size:var(--nm-readable-small)}
:root .nm-profile-fact-share{min-height:44px;align-items:center;padding:6px 0;line-height:1.5!important}
:root .nm-profile-fact-share input{margin:0!important}
:root .interest-editor :is(.icon-button,.choice-chips button),
:root .suggested-interests button{min-width:44px;min-height:44px!important;font-size:var(--nm-readable-control)!important;line-height:1.5!important}
:root .interest-editor .icon-button{width:44px;height:44px;flex-shrink:0}
:root .suggested-interests{gap:8px}

/* Preserve profile colors and two description columns while scaling their text. */
:root .exp-profile.nm-profile-palette.nm-profile-tabbed :is(.exp-profile-panel p,.exp-profile-presentation>.exp-bio),
:root .person-card.exp-discovery-card.nm-profile-palette .exp-card-bio{
  font-size:var(--nm-readable-copy)!important;
  line-height:1.65!important;
  max-width:68ch;
}
:root .exp-profile.nm-profile-palette.nm-profile-tabbed .nm-profile-tab{font-size:var(--nm-readable-tab)!important;line-height:1.4!important}
:root .exp-profile.nm-profile-palette.nm-profile-tabbed .exp-profile-actions button{font-size:var(--nm-readable-control)!important;line-height:1.5!important}
:root .exp-profile.nm-profile-palette.nm-profile-tabbed .exp-profile-panel :is(.exp-answer-chips>span,.nm-identity-public-group>div>span,.nm-seeking-row>dd>span,.nm-seeking-intents>li,.profile-interest-tags>span){
  font-size:var(--nm-readable-body)!important;
  line-height:1.55!important;
}
:root .exp-profile.nm-profile-palette.nm-profile-tabbed .exp-profile-panel [data-profile-question]{font-size:var(--nm-readable-body)!important;line-height:1.5!important}
:root .exp-profile.nm-profile-palette.nm-profile-tabbed .nm-expectations-title{font-size:var(--nm-readable-body)!important}
:root .exp-profile.nm-profile-palette.nm-profile-tabbed :is(.nm-expectations-more,.nm-expectations-less){font-size:var(--nm-readable-control)!important}
:root .nm-profile-basics .nm-profile-fact-label{font-size:var(--nm-readable-small);line-height:1.5;opacity:1}
:root .nm-profile-basics .nm-profile-fact-value{font-size:var(--nm-readable-body);line-height:1.5}
:root .exp-profile.nm-profile-palette .nm-profile-description-layout .nm-profile-trait-list>li{font-size:var(--nm-readable-trait)!important;line-height:1.5!important}
:root .person-card.exp-discovery-card.nm-profile-palette .person-card-actions button{font-size:var(--nm-readable-control)!important;line-height:1.5!important}
:root .person-card.exp-discovery-card.nm-profile-palette .read-profile{font-size:var(--nm-readable-copy)!important;line-height:1.5!important}
:root .person-card.exp-discovery-card.nm-profile-palette :is(.exp-card-seeking li,.exp-key-facts span,.profile-interest-tags>span){font-size:var(--nm-readable-small)!important;line-height:1.5!important}
html:is([data-nm-text-size=large],[data-nm-text-size=larger]) .nm-modal :is(p,li,label,dt,dd,summary,button){font-size:var(--nm-readable-body);line-height:1.6}
html:is([data-nm-text-size=large],[data-nm-text-size=larger]) .nm-modal .nm-privacy-preview .button{font-size:var(--nm-readable-control)!important}

/* Give icon controls a full touch target without changing their appearance. */
:root .topbar .mobile-menu-button,
:root .discover-controls .icon-button,
:root .nm-photo-gallery .nm-gallery-arrow,
:root .nm-modal .modal-heading .icon-button{min-width:44px!important;min-height:44px!important;width:auto;height:44px!important;flex-shrink:0}
:root .nm-modal:has(.exp-profile.nm-profile-palette)>.modal-heading .icon-button{font-size:var(--nm-readable-small)!important}
:root .exp-toolbar>button{min-height:44px;font-size:var(--nm-readable-small)}
:root .nm-daily-caption{font-size:var(--nm-readable-caption);line-height:1.45;letter-spacing:.04em}
:root .nm-daily-disclosure .nm-daily-title{font-size:max(17px,var(--nm-readable-body))!important;line-height:1.4!important}
:root .nm-daily-disclosure .nm-daily-toggle{font-size:var(--nm-readable-small)!important;line-height:1.5!important}

/* Narrow editor space needs two useful columns, including tablet sidebars. */
@media(max-width:1100px){
  :root .nm-profile-navigation.nm-profile-editor-nav>.nm-profile-primary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:760px){
  :root .page-content{padding-bottom:calc(var(--nm-bottom-space) + env(safe-area-inset-bottom))!important}
  :root .exp-bottom-nav{gap:4px;padding-inline:6px}
  :root .nm-app .exp-bottom-nav button{min-width:0;min-height:50px;font-size:12px!important;line-height:1.4!important;padding:6px 2px;gap:3px}
  :root .exp-bottom-nav button>span:last-child{min-width:0;max-width:100%;white-space:normal;overflow-wrap:normal}
  :root .exp-bottom-nav b{font-size:12px;line-height:1.4}
  html:is([data-nm-text-size=large],[data-nm-text-size=larger]){--nm-bottom-space:140px}
  html:is([data-nm-text-size=large],[data-nm-text-size=larger]) .exp-bottom-nav{grid-template-columns:repeat(2,minmax(0,1fr))}
  html:is([data-nm-text-size=large],[data-nm-text-size=larger]) .nm-app .exp-bottom-nav button{flex-direction:row;justify-content:center;gap:8px;font-size:var(--nm-readable-control)!important;line-height:1.4!important;padding:8px 4px}
  :root .exp-profile.nm-profile-palette.nm-profile-tabbed .nm-profile-tab{font-size:max(13px,calc(var(--nm-readable-tab) - 2px))!important}
}
@media(max-width:600px){
  html:is([data-nm-text-size=large],[data-nm-text-size=larger]) .exp-profile.nm-profile-palette .nm-profile-index{grid-template-columns:repeat(2,minmax(0,1fr))}
  html:is([data-nm-text-size=large],[data-nm-text-size=larger]) .exp-profile.nm-profile-palette.nm-profile-tabbed .nm-profile-tab{flex-direction:row;min-height:48px;font-size:var(--nm-readable-tab)!important;gap:6px}
  :root .exp-profile.nm-profile-palette .nm-profile-description-layout{gap:10px}
  :root .exp-profile.nm-profile-palette .nm-profile-description-layout>.exp-profile-presentation{padding:12px 9px}
  :root .exp-profile.nm-profile-palette .nm-profile-description-layout .nm-profile-trait-list>li{padding:7px 6px}
  html:is([data-nm-text-size=large],[data-nm-text-size=larger]) .exp-profile.nm-profile-palette .nm-profile-trait-list>li{flex-direction:column;gap:3px}
  html:is([data-nm-text-size=large],[data-nm-text-size=larger]) .person-card.exp-discovery-card.nm-profile-palette .person-card-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  html:is([data-nm-text-size=large],[data-nm-text-size=larger]) .person-card.exp-discovery-card.nm-profile-palette .person-card-actions button:last-child{grid-column:1/-1}
}
@media(max-width:360px){
  :root{--nm-bottom-space:140px}
  :root .exp-bottom-nav{grid-template-columns:repeat(2,minmax(0,1fr))}
  :root .nm-app .exp-bottom-nav button{flex-direction:row;justify-content:center;gap:8px;font-size:13px!important;padding:8px 4px}
  :root .exp-profile.nm-profile-palette .nm-profile-description-layout>.exp-profile-presentation{padding:10px 7px}
  html:is([data-nm-text-size=large],[data-nm-text-size=larger]){--nm-bottom-space:180px}
  html:is([data-nm-text-size=large],[data-nm-text-size=larger]) .nm-app .exp-bottom-nav button{flex-direction:column;gap:3px;min-height:70px;padding:6px 4px}
}
