/* ==========================================================
   Mobile pass (≤640px): shorter pages, 44px targets, tighter type.
   Loaded after ccf.css and wic.css on every page.
   ========================================================== */
@media (max-width:640px){
  html{-webkit-tap-highlight-color:rgba(0,61,124,.15)}
  body{font-size:15.5px;line-height:1.55}
  .wrap{width:min(100% - 32px,1280px)}
  .section{padding-block:44px}
  .sec-head{margin-bottom:24px}
  h1{font-size:clamp(34px,10vw,44px)}
  h2{font-size:clamp(26px,7.5vw,32px)}
  .lead{font-size:16.5px}
  .eyebrow{font-size:11px}

  /* header */
  :root{--header-h:64px}
  .site-header .wrap{gap:8px}
  .logo img{height:40px}
  .header-actions{gap:5px}
  .header-actions .ct-entry .ct-mark{height:20px}
  .header-actions .ct-entry{width:auto;min-height:44px;padding:0 2px}
  .header-actions .wic-entry,.portal,.menu-btn{width:44px;height:44px;min-height:0;padding:0;justify-content:center;border-radius:var(--radius-md)}
  .header-actions .wic-entry img{width:34px;height:34px}
  .main-nav{padding:var(--drawer-top,80px) 20px 40px}
  .main-nav>ul>li>a{min-height:52px;font-size:17px}
  .mega a{min-height:44px;font-size:15px}

  /* home */
  .hero-inner{padding-block:44px 40px;max-width:none}
  .hero h1{margin-bottom:16px}
  .hero .lead{margin-bottom:24px;font-size:16.5px}
  .statbar .wrap{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding-block:20px}
  .stat b{font-size:30px}
  .stat svg{width:26px;height:26px}
  .statbar-tag{grid-column:1/-1;font-size:15px}
  .gear-ghost{width:180px}
  .wic-band .wrap{padding-block:32px}
  .wic-band-lockup{font-size:34px}
  .wic-band .btn{width:100%}
  .grid{gap:12px}
  .card{padding:18px}
  .card .icon{width:32px;height:32px;margin-bottom:10px}
  .card h3{font-size:20px}
  .benefits{gap:10px;margin-bottom:20px}
  .benefit{padding:14px 8px;font-size:12px}
  .member-card{padding:22px}
  .member-card h3{font-size:26px}
  .event-grid{gap:12px}
  .event-top{padding:12px 16px}
  .event-date b{font-size:32px}
  .event-body{padding:16px;gap:8px}
  .event-body h3{font-size:20px}
  .pathway{padding:16px}
  .chip{min-height:44px;padding:0 14px;font-size:14px}
  .chips{gap:8px}
  .text-link{min-height:44px}
  .resource{grid-template-columns:72px 1fr;gap:14px}
  .resource h3{font-size:20px}
  .partners{grid-template-columns:repeat(3,1fr);gap:10px}
  .partners li{height:72px;padding:10px}
  .partners img{max-height:48px}
  .search input{height:48px}
  .search button{width:52px}
  .newsletter{gap:24px}
  .btn{width:100%;min-height:50px}
  .cta-row{width:100%}

  /* footer */
  .footer-main{padding-block:40px;gap:28px}
  .footer-main img{width:120px;margin-bottom:16px}
  .site-footer h4{font-size:18px;margin-bottom:10px}
  .site-footer li{margin-bottom:0}
  .site-footer li a,.footer-legal li a{display:flex;align-items:center;min-height:44px}
  .footer-legal{flex-direction:column;gap:12px;font-size:12.5px;padding-block:20px}
  .footer-legal ul{gap:20px}
  .footer-powered{padding-bottom:20px}
  .footer-powered img{height:28px}

  /* inner pages */
  .page-hero .wrap{padding-block:28px 32px}
  .page-hero h1{font-size:clamp(30px,9vw,40px)}
  .crumbs{font-size:12px;margin-bottom:10px}
  .crumbs span[aria-current],.crumbs span[aria-hidden]:last-of-type{display:none}
  .page-grid{padding-block:32px;gap:32px}
  .prose{font-size:15.5px}
  .prose h2{font-size:24px;margin-top:1.5em}
  .prose h3{font-size:20px}
  .prose img{max-height:360px}
  .prose .tile{min-height:96px;font-size:19px}
  .cols{gap:20px}
  .people{grid-template-columns:repeat(2,1fr)!important;gap:20px 12px}
  .people img{max-height:150px}
  .people .cap{font-size:17px}
  .people p{font-size:13px}
  .people a{display:inline-flex;align-items:center;min-height:44px}
  .banner{padding:20px}
  .table-scroll{margin-inline:-16px;border-radius:0;border-left:0;border-right:0}
  .prose table{font-size:13.5px}
  .prose th,.prose td{padding:8px 10px}
  .wave-embed:not(.wave-embed--live){padding:20px}
  .wave-embed--live iframe{min-height:620px}

  /* side nav becomes a collapsible "In this section" */
  .side-nav{padding:0;border-top-width:1.5px;border-color:var(--ccf-grey);overflow:visible;max-height:none}
  .side-nav-title{display:flex;align-items:center;justify-content:space-between;min-height:52px;padding:0 16px;font-size:20px;cursor:pointer;user-select:none;margin-bottom:0}
  .side-nav-title::after{content:"+";font-size:26px;font-weight:400;color:var(--ccf-blue)}
  .side-nav.open .side-nav-title::after{content:"\2013"}
  .side-nav-title~*{display:none}
  .side-nav.open .side-nav-title~*{display:block}
  .side-nav.open{padding:0 16px 16px}
  .side-nav.open .side-nav-title{margin-inline:-16px}
  .side-nav-group{margin-top:16px}
  .side-nav a{min-height:44px;margin:0;padding:6px 10px}

  /* document library */
  .doc-list a{grid-template-columns:44px 1fr;min-height:56px;padding:10px 12px}
  .doc-ext{height:34px;font-size:10px}
  .doc-name{font-size:14.5px}
  .doc-meta{font-size:12px}

  /* Women in Civil */
  .wic .section{padding-block:44px}
  .wic-subnav{top:64px}
  .wic-subnav .wrap{width:100%;gap:0}
  .wic-subnav a{padding:0 14px;min-height:48px;font-size:13.5px}
  .wic section[id]{scroll-margin-top:112px}
  .wic-hero-grid{padding-block:40px 36px}
  .wic-hero h1{font-size:clamp(56px,17vw,72px)}
  .wic-lockup{margin-bottom:20px;font-size:11px}
  .wic-lockup span:last-child,.wic-lockup i{display:none}
  .wic-hero-strip .wrap{gap:14px;padding-block:18px}
  .wic-hero-strip .tagline{font-size:17px;margin-top:4px}
  .wic-photo{aspect-ratio:1/1}
  .wic-photo figcaption{max-width:100%;font-size:11px}
  .wic-who{gap:8px;margin-top:24px}
  .wic-who li{padding:10px 12px;font-size:13.5px}
  .wic-stats{gap:10px;margin-top:32px}
  .wic-stat{padding:14px}
  .wic-stat b{font-size:22px}
  .wic-history{margin-top:40px}
  .wic-past{padding:18px}
  .wic-speakers{gap:12px;margin-top:16px}
  .profile-img{width:96px}
  .profile-body{padding:12px 14px 14px}
  .profile-body h3{font-size:19px}
  .profile-body p{font-size:13px}
  .pathway-steps{gap:20px;margin-bottom:28px}
  .pathway-step .ring{width:60px;height:60px;margin-bottom:10px}
  .pathway-step h3{font-size:22px}
  .partner-why{gap:10px;margin-block:20px}
  .partner-why li{font-size:13.5px}
  .route-tabs{gap:10px;margin-bottom:20px}
  .route-tab{padding:16px;display:grid;grid-template-columns:34px 1fr;gap:2px 12px;align-items:center}
  .route-tab svg{grid-row:span 2;margin:0}
  .route-tab h3{font-size:20px;margin:0}
  .route-tab p{font-size:13px}
  .route-tab[aria-selected="true"]::after{top:12px;right:12px;width:14px;height:14px}
  .route-panel{padding:18px}
  .view-toggle button{padding:0 14px}
  .wic-bridge{padding:20px}
  .wic-quote blockquote{font-size:22px}
  .wic-quote .mark{font-size:64px;line-height:.6}
}
@media (max-width:400px){
  .statbar .wrap{grid-template-columns:1fr}
  .benefits,.partners{grid-template-columns:repeat(2,1fr)}
}

/* Website Mapping restructure additions */
@media (max-width:640px){
  .main-nav>ul>li>.nav-top{min-height:52px;font-size:17px}
  .hero-copy{padding-block:44px 76px;max-width:none}
  .hero-dots-wrap{bottom:32px}
  .people-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
  .person-initials{font-size:34px}
  .prose .person-name{font-size:17px}
  .acc summary{font-size:17px;min-height:52px}
  .hub-cards{grid-template-columns:1fr}
  .hub-card{padding:18px}
  .logo-wall{grid-template-columns:repeat(3,1fr);gap:8px}
  .logo-wall li{height:64px;padding:6px}
  .locked{padding:18px}
  .locked .btn{width:100%}
  .marquee-track li{width:140px;height:72px}
  .who-figure figcaption{position:static;margin-top:10px}
  .cv-hero-copy{padding:22px}
  .cv-agenda{padding:18px}
  .cv-cta .site-form{padding:0;background:transparent}
  .cv-cta .site-form .field label{color:#fff}
}

/* CCF edits 30 Oct 2026 */
@media (max-width:640px){
  .logo img{height:44px}
  .header-actions .ct-entry{min-height:40px;padding:0 5px;gap:0}
  /* phones: the full wordmark does not fit beside the logo and buttons (the bar ran to 390px in 343px), so the CT mark shows instead */
  .header-actions .ct-entry .ct-full{display:none!important}
  .header-actions .ct-entry .ct-mark{display:block!important;height:20px;width:auto}
  .header-actions .ct-entry .ct-rto{display:none}  /* 7px type is not readable; RTO stays on the Workforce page and at wider widths */
  .portal,.menu-btn{width:40px;height:40px}
}
@media (max-width:360px){
  .logo img{height:40px}
  .header-actions .ct-entry .ct-mark{height:20px}
  .search-btn{display:none}  /* search lives in the drawer on phones */
  .site-search .wrap{padding-block:12px 16px}
  .partner-band-head{flex-direction:column;align-items:flex-start;gap:6px}
  .doc-grid{grid-template-columns:1fr}
  .issue-grid{grid-template-columns:repeat(2,1fr)}
  .type-card{padding:18px}
}

/* Offers tiles with captions (19 Nov 2026): the generic .logo-wall phone rule above pinned them at 64px */
@media (max-width:640px){
  ul.logo-wall--links{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  ul.logo-wall--links li{height:auto;padding:10px 8px 8px}
  ul.logo-wall--links .logo-wall-logo{height:56px}
  ul.logo-wall--links img{max-height:52px}
}

/* Step-by-step forms on phones (20 Nov 2026) */
@media (max-width:640px){
  .sf-head{margin-bottom:16px}
  .sf .field label{font-size:24px}
  .sf-nav{flex-wrap:wrap;gap:10px}
  .sf-nav .btn{width:auto;flex:1 1 0;min-height:48px;white-space:nowrap}
  .sf-nav .sf-back{flex:0 0 auto;padding:0 18px}
  .sf-hint{display:none}
  .sf-answers div{grid-template-columns:1fr auto;grid-template-areas:"dt btn" "dd btn" "err btn";font-size:14px;gap:4px 10px}
}

/* Civil Train on phones, CCF option B (30 Nov 2026): the full Civil Train logo (tagline and RTO 5708) instead of the CT monogram.
   The Member portal and search icons make way for it; the drawer has "Search the site" and "Member portal" at phone sizes. */
@media (max-width:640px){
  .site-header .portal,.site-header .search-btn{display:none!important}
  .site-header .header-actions{flex:1 1 auto;min-width:0;justify-content:flex-end;gap:6px}
  .site-header .logo{padding-right:0}
  .header-actions .ct-entry{flex:0 1 140px;min-width:0;padding:0 2px}   /* smaller (Dan, 30 Nov 2026): 140px wide, about 29px tall */
  .header-actions .ct-entry .ct-full{display:block!important;width:100%;height:auto!important;max-height:29px;object-fit:contain}
  .header-actions .ct-entry .ct-mark{display:none!important}
}
.drawer-phone{display:none!important}
@media (max-width:640px){.drawer-phone{display:block!important}.drawer-portal{font-weight:700}}
