/* Mobile layout follows the supplied 390px design; content uses the current site. */
@media screen and (max-width:600px){
  body{font-size:15px}
  #design-root #top{min-width:0}
  #design-root #top>header>div{padding:12px 20px!important;gap:12px!important}
  #design-root header a[aria-label]{gap:10px!important;min-width:0}
  #design-root header a[aria-label]>svg{width:34px;height:34px;flex:none}
  #design-root header a[aria-label]>span{font-size:15.5px!important;line-height:1.25;min-width:0}
  #design-root .dnav{display:none}
  #design-root .mnav{display:block;flex:none}
  #design-root .mnav .sheet{max-width:calc(100vw - 40px);box-sizing:border-box;z-index:30}
  #design-root .mnav .sheet a{padding:12px 14px;min-height:44px;box-sizing:border-box}
  #design-root #top>section{width:100%!important;max-width:100%!important;box-sizing:border-box;padding:0 20px 40px!important;gap:20px!important;flex-direction:column!important;align-items:stretch!important}
  #design-root #top>section:first-of-type{padding:20px 20px 28px!important;gap:18px!important}
  #design-root #top>section>div[style*="flex:"],#design-root #top>section>div>div[style*="flex:"]{flex:none!important;min-width:0;max-width:100%!important;width:100%;box-sizing:border-box}
  #design-root h1{font-size:32px!important;line-height:1.3!important}
  #design-root h1>span{font-size:inherit!important;line-height:inherit!important}
  #design-root h2{font-size:24px!important;line-height:1.4!important}
  #design-root .reference-title{font-size:15px!important;line-height:1.6!important}
  #design-root p[style*="font-size:17px"],#design-root p[style*="font-size:18px"]{font-size:16px!important;line-height:1.85!important}
  #design-root input:not([type=checkbox]):not([type=radio]),#design-root textarea,#design-root select{font-size:16px!important;max-width:100%;box-sizing:border-box}
  #design-root input[type=checkbox]{flex:none;width:18px;height:18px}
  #design-root .btn{min-height:50px;padding:0 22px;font-size:15px;max-width:100%;box-sizing:border-box;line-height:1.4;text-align:center}
  #design-root .chip{min-height:44px;padding:0 16px;font-size:15px;white-space:normal;line-height:1.4}
  #design-root footer>div,#design-root footer{max-width:100%;box-sizing:border-box}
  #design-root footer>div{padding:24px 20px 40px!important;flex-direction:column!important;align-items:flex-start!important;gap:10px!important;font-size:13.5px!important}
  #design-root footer>div>span:last-child{gap:10px 20px!important}
  /* Home: the mobile reference's stacked hero and two-column icon tiles. */
  #design-root .home-hero{padding:32px 20px 36px!important;gap:22px!important}
  #design-root .home-hero .hero-copy{display:contents!important}
  #design-root .home-hero .hero-copy>span{order:1;font-size:13px!important}
  #design-root .home-hero h1{order:2;font-size:34px!important;line-height:1.25!important}
  #design-root .home-hero .hero-copy>p{order:3}
  #design-root .home-hero .hero-copy>div{order:4;display:flex!important;flex-direction:column;gap:12px!important}
  #design-root .home-hero .hero-copy>div .btn-primary{width:100%}
  #design-root .home-hero .hero-copy>div>a:last-child:not(.btn-primary){align-self:center;min-height:44px;display:inline-flex;align-items:center}
  #design-root .home-hero .hero-art{order:5;flex:none!important;width:100%;max-width:none!important}
  #design-root .home-hero .hero-art>svg:not(.mobile-hero-art){display:none!important}
  #design-root .home-hero .mobile-hero-art{display:block!important}
  #design-root .home-hero .hero-copy>p:last-child{order:6;font-size:13px!important}
  #design-root #finder{padding:0 16px 64px!important;scroll-margin-top:8px}
  #design-root .finder-shell{padding:22px 18px 24px!important;border-radius:24px!important;gap:22px!important;box-sizing:border-box}
  #design-root .finder-intro{flex-direction:column;align-items:stretch!important;gap:18px!important}
  #design-root .finder-intro>div{flex:none!important;gap:6px!important}
  #design-root .finder-layout{display:flex!important;flex-direction:column;gap:0!important}
  #design-root .finder-layout>div{flex:none!important;width:100%;box-sizing:border-box}
  #design-root .desktop-progress{display:none!important}
  #design-root .mobile-only{display:flex!important}
  #design-root .mobile-progress{padding:0;margin:0;list-style:none;align-items:center;justify-content:space-between;gap:8px}
  #design-root .mobile-progress li{flex:1;min-width:0}
  #design-root .mobile-progress button{display:flex;align-items:center;gap:7px;min-height:44px;padding:0;background:none;border:0;color:#4A6265;font:400 13px/1.3 'Noto Sans SC',sans-serif;cursor:pointer}
  #design-root .mobile-progress button>span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;flex:none;background:#E6EFEB;border-radius:50%;color:#17696A}
  #design-root .mobile-progress button[aria-current=step]{color:#0C3638;font-weight:500}
  #design-root .mobile-progress button[aria-current=step]>span{background:#17696A;color:white}
  #design-root [data-mobile-active=false]{display:none!important}
  #design-root .finder-cancers>[role=group]{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  #design-root .cc{flex-direction:row;align-items:center;min-height:56px;padding:10px 12px;border-radius:14px;font-size:15px;gap:10px;box-sizing:border-box}
  #design-root .cc .ic{width:36px;height:36px;border-radius:10px}
  #design-root .cc .ic svg{width:22px;height:22px}
  #design-root .finder-right{padding:0!important;background:transparent!important;border-radius:0!important;gap:18px!important}
  #design-root .finder-refine,#design-root .finder-output{gap:18px!important}
  #design-root .finder-refine .mobile-only,#design-root .finder-output .mobile-only{width:100%}
  #design-root .finder-divider{display:none}
  #design-root [data-local-trials]{width:100%;font-size:15px}
  #design-root [data-copy-keywords]{min-height:44px;font-size:13.5px}
  #design-root #databases{padding:0 20px 64px!important;gap:16px!important}
  #design-root #databases>div{flex:none!important;width:100%;max-width:none!important}
  #design-root .dbrow{padding:18px 4px;gap:14px;min-height:44px}
  #design-root .dbrow>svg{width:36px;height:36px;flex:none}
  #design-root .tool{padding:18px;border-radius:20px;gap:14px}
  #design-root .tool>svg{width:48px;height:48px}
  #design-root .tool h3{font-size:18px!important}
  #design-root #top>section:has(.tool)>div[style*="display:grid"]{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
  #design-root #top>section:has(.tool) h2{font-size:24px!important}
  /* Current cancer pages retain trials first, not the reference's sample order. */
  body[data-design-page=cancer] #top>section:first-of-type>div{gap:22px!important;flex-direction:column!important;align-items:stretch!important}
  body[data-design-page=cancer] #top>section:first-of-type>div>div{flex:none!important;width:100%;max-width:none!important;gap:18px!important}
  body[data-design-page=cancer] h1{font-size:36px!important;line-height:1.2!important}
  body[data-design-page=cancer] h1>span{font-size:22px!important;line-height:1.5!important}
  body[data-design-page=cancer] #top>section:first-of-type svg[role=img]{max-height:210px}
  body[data-design-page=cancer] a[href="#collected-trials"]{width:100%}
  #design-root .live-tools{width:100%;max-width:100%!important;padding:0 16px 32px!important;box-sizing:border-box}
  #design-root .live-tools .trial-section{padding:20px 16px;border-radius:20px;min-width:0}
  #design-root .live-tools .trial-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  #design-root .live-tools .trial-summary>div{min-width:0;overflow-wrap:anywhere}
  #design-root .live-tools .trial-filter-bar{display:flex;flex-direction:column;gap:12px}
  #design-root .live-tools .trial-search,#design-root .live-tools .filter-panel{width:100%;min-width:0}
  #design-root .live-tools .trial-search input{width:100%;min-width:0}
  #design-root .live-tools .trial-filters{grid-template-columns:1fr;gap:12px}
  #design-root .live-tools .multi-menu{max-width:100%;box-sizing:border-box}
  #design-root .live-tools .trial-card{padding:18px 16px;border-radius:18px;overflow-wrap:anywhere;min-width:0}
  #design-root .live-tools .trial-card h3{font-size:17px;line-height:1.6}
  #design-root .live-tools .trial-card-top,#design-root .live-tools .trial-links{flex-wrap:wrap;gap:10px}
  #design-root .live-tools .trial-pagination{padding:16px;display:flex;flex-direction:column;gap:14px;align-items:stretch}
  #design-root .live-tools .trial-page-controls{display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between}
  #design-root .live-tools .trial-page-controls [data-page-status]{order:-1;width:100%;text-align:center;font-size:13px}
  #design-root .live-tools .trial-page-controls button{min-height:44px;font-size:14px;padding:0 12px}
  #design-root .live-tools .page-jump input{width:54px}
  #design-root .term{flex-direction:column;align-items:stretch;gap:10px;padding:18px 0}
  #design-root .term>span{flex:none!important}
  #design-root .term>button{align-self:flex-start}
  /* Contact assistant: form first, editable paper preview underneath. */
  body[data-design-page=contact] #top>section:nth-of-type(2){padding:0 16px 56px!important;gap:28px!important}
  body[data-design-page=contact] article{padding:24px 20px!important;border-radius:18px!important;gap:20px!important}
  body[data-design-page=contact] article h2{font-size:23px!important}
  #design-root .contact-form{gap:22px!important}
  #design-root .contact-step{font-size:16px!important}
  #design-root .contact-email{min-height:460px;line-height:1.75}
  #design-root .contact-form>button{width:100%}
  /* Small cards, checklists and prose from the remaining mobile design sheets. */
  #design-root #top>section[style*="display:grid"]{grid-template-columns:1fr!important;gap:16px!important}
  body[data-design-page=checklist] #top>section>div[style*="background:#EDF3F0"]{padding:22px 20px!important;border-radius:20px!important}
  body[data-design-page=glossary] article{padding:20px!important;border-radius:18px!important;min-width:0;overflow-wrap:anywhere}
  #design-root .search{min-height:50px;font-size:16px}
  #design-root [style*="padding:32px 36px"],#design-root [style*="padding:36px 40px"]{padding:24px 20px!important;box-sizing:border-box}
  #design-root [style*="padding:56px"],#design-root [style*="padding:48px"]{padding:28px 22px!important;box-sizing:border-box}
}
@media screen and (max-width:360px){
  #design-root #top>header>div{padding-left:16px!important;padding-right:16px!important}
  #design-root header a[aria-label]>span{font-size:14px!important}
  #design-root .cc{padding:10px 8px;gap:7px;font-size:14px}
}
@media screen and (max-width:600px){
  #design-root h1,#design-root h2,#design-root h3{width:auto!important;max-width:100%;box-sizing:border-box}
  #design-root .toc{flex:none!important;width:100%;max-width:none!important;box-sizing:border-box}
  body[data-design-page=contact] h1{text-wrap:wrap!important}
  body[data-design-page=contact] h1>span{display:block}
}
