:root{--mobile-touch-target:44px;--mobile-readable-label:.8125rem}

@media(max-width:767px){
  html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
  body{min-width:320px}

  /* Keep operational text readable on the phones used by most members. */
  :is(#main-content,main) :is([class~="text-[8px]"],[class~="text-[9px]"],[class~="text-[10px]"],[class~="text-[11px]"]){font-size:var(--mobile-readable-label)!important;line-height:1.45!important}
  :is(#main-content,main) :where(label,small,[class*="eyebrow"],[class*="kicker"],[class*="overline"],[class*="microcopy"],[class*="caption"]){font-size:var(--mobile-readable-label)!important;line-height:1.45!important}
  :is(#main-content,main) :where(.mp-button,.gov-button,.pp17-button,[class*="trust"],[class*="security"],[class*="status"],[class*="meta"],[class*="insight"],[class*="command"],[class*="access"],[class*="source"]) :where(span,p,a,button,label,small),
  :is(#main-content,main) :where(.mp-button,.gov-button,.pp17-button,[class*="trust"],[class*="security"],[class*="status"],[class*="meta"],[class*="eyebrow"]){font-size:var(--mobile-readable-label)!important;line-height:1.4!important}
  :where(.hero-eyebrow,.story-eyebrow,.reunion-live,.reunion-overline,.reunion-kicker,.reunion-snapshot small,.reunion-programme small,.reunion-update small,.reunion-projects small,.reunion-form label>span,.pp17-kicker,.pp17-metric-label){font-size:var(--mobile-readable-label)!important;line-height:1.45!important}
  .reunion-countdown small{font-size:.6875rem!important;line-height:1.25!important;letter-spacing:.02em}
  .ipakodo-home-v51 :is(.hero-eyebrow,.hero-slide-count,.hero-autoplay-toggle,.hero-autoplay-label){font-size:var(--mobile-readable-label)!important;line-height:1.4!important}
  .registration-panel .panel-heading span{font-size:var(--mobile-readable-label)!important;line-height:1.4!important}
  .mp-topbar .mp-page-kicker{font-size:var(--mobile-readable-label)!important;line-height:1.4!important}
  .identity-premium-page main p,.content-studio-premium-page main p,.help-manager-body main p{font-size:var(--mobile-readable-label)!important;line-height:1.5!important}
  .content-studio-premium-page main :is(.studio-kicker,.studio-priority-badge,.studio-workflow-tabs button,.studio-status,.studio-source-status strong,.studio-source-status small,.studio-source-status>b,.studio-status-card b,.studio-metric small,.studio-priority small,.studio-priority p,.studio-schedule-item strong,.studio-schedule-item small,.studio-schedule-item>b,.studio-audit-item strong,.studio-audit-item small,.studio-audit-item>b){font-size:var(--mobile-readable-label)!important;line-height:1.4!important}

  /* 16px form text prevents automatic iOS zoom and improves legibility. */
  :is(#main-content,main,header) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea){min-height:var(--mobile-touch-target);font-size:1rem!important;line-height:1.4}
  :is(#main-content,main,header) :is(input,select,textarea)::placeholder{color:#64748b;opacity:1}
  :is(#main-content,main) :is(button,[role="button"],a[class*="button"],a[class*="btn"]){min-height:var(--mobile-touch-target)}

  /* Shared member and administrator navigation. */
  :where(.dashboard-nav,.portal-nav,.canonical-dashboard-nav,.dashboard-nav-group-links) :where(.dashboard-nav-link,.portal-nav-link){min-height:var(--mobile-touch-target)!important;font-size:.8125rem!important;line-height:1.3!important}
  :where(.unified-dashboard-brand button,.dashboard-brand button,.portal-brand button,#sidebar-toggle,#sidebar-close,#dashboard-sidebar-toggle,#dashboard-sidebar-close){min-width:var(--mobile-touch-target)!important;min-height:var(--mobile-touch-target)!important}
  .canonical-dashboard-nav .dashboard-nav-group-summary{min-height:var(--mobile-touch-target)!important;font-size:var(--mobile-readable-label)!important;line-height:1.3!important}
  .canonical-dashboard-nav .dashboard-nav-group-summary small{min-width:1.5rem!important;min-height:1.5rem!important;height:auto!important;font-size:.75rem!important}
  .dashboard-header .dashboard-heading h1,.portal-header .portal-page-title,.mp-topbar .mp-page-title,.gov-header .gov-page-title h1,.admin-premium-dashboard header h1{font-size:1.1rem!important;line-height:1.2!important;font-weight:900!important}
  :where(.dashboard-header,.portal-header,.mp-topbar) :where(.dashboard-heading p,.portal-page-heading>p:not(.portal-page-title)){font-size:.75rem!important;line-height:1.4!important}
  .dashboard-header :where(.dashboard-action,.mp-menu),.portal-header :where(.portal-icon-button,.portal-header-link),.mp-topbar :where(.mp-icon-button,.mp-menu){min-width:var(--mobile-touch-target)!important;min-height:var(--mobile-touch-target)!important}
  .mp-topbar .mp-menu{width:var(--mobile-touch-target)!important;height:var(--mobile-touch-target)!important}

  :where(.unified-dashboard-mobile-dock,.dashboard-mobile-dock,.portal-mobile-dock):is(.unified-dashboard-mobile-dock,.dashboard-mobile-dock,.portal-mobile-dock)>:is(a,button){min-height:3.75rem!important;font-size:.75rem!important;line-height:1.15!important}
  :where(.unified-dashboard-mobile-dock,.dashboard-mobile-dock,.portal-mobile-dock):is(.unified-dashboard-mobile-dock,.dashboard-mobile-dock,.portal-mobile-dock)>:is(a,button)>span{display:-webkit-box!important;max-width:100%!important;overflow:hidden!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal!important;text-overflow:ellipsis!important;text-wrap:balance}
  body.has-unified-dashboard-dock :where(.dashboard-content,.portal-content,.mp-main){padding-bottom:calc(7.5rem + env(safe-area-inset-bottom))!important}

  /* The local preview notice must remain readable without hiding page content. */
  body.has-dashboard-build-preview :where(.dashboard-content,.portal-content,.mp-main){padding-bottom:calc(14rem + env(safe-area-inset-bottom))!important}
  .dashboard-build-preview{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:.55rem!important;padding:.65rem!important}
  .dashboard-build-preview strong{font-size:var(--mobile-readable-label)!important;line-height:1.35!important}
  .dashboard-build-preview small{font-size:.75rem!important;line-height:1.4!important;white-space:normal!important}
  .dashboard-build-preview button{min-height:var(--mobile-touch-target)!important;max-width:7.5rem!important;padding:.5rem .65rem!important;font-size:.75rem!important;line-height:1.2!important}
  body.dashboard-navigation-open .dashboard-build-preview{visibility:hidden!important;opacity:0!important;pointer-events:none!important}

  /* Preserve contrast for compact status text in light mode. */
  html:not(.dark) :where(.dashboard-standard-page,.member-standard-page) main :is(.text-slate-400,.text-slate-500){color:#475569!important}
}

@media(max-width:430px){
  .dashboard-header-inner,.portal-header-inner{gap:.4rem!important;padding:.45rem .55rem!important}
  .dashboard-heading,.portal-header-left,.portal-page-heading{min-width:0!important}
  .dashboard-heading p,.portal-page-heading>p:not(.portal-page-title){display:none!important}
  .dashboard-heading h1,.portal-page-title,.mp-page-title{max-width:none!important;overflow:visible!important;white-space:normal!important;text-overflow:clip!important}
  .dashboard-header-actions,.portal-header-actions{gap:.3rem!important}
  .dashboard-action span,.portal-header-link span,.dashboard-profile span,.dashboard-profile .fa-chevron-down,.portal-profile-copy,.portal-profile-button>.fa-chevron-down{display:none!important}
  .dashboard-profile>button,.portal-profile-button{min-width:var(--mobile-touch-target)!important;width:var(--mobile-touch-target)!important;min-height:var(--mobile-touch-target)!important;padding:.25rem!important}
  .dashboard-profile img,.portal-profile-button img{width:2rem!important;height:2rem!important;margin:0!important}
}

@media(max-width:360px){
  :where(.unified-dashboard-mobile-dock,.dashboard-mobile-dock,.portal-mobile-dock)>:is(a,button){font-size:.75rem!important}
  .dashboard-build-preview{grid-template-columns:1fr!important}
  .dashboard-build-preview button{width:100%!important;max-width:none!important}
  body.has-dashboard-build-preview :where(.dashboard-content,.portal-content,.mp-main){padding-bottom:calc(17rem + env(safe-area-inset-bottom))!important}
}

@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}}
