/* QilyLean sitewide layout + typography closure V20 | 2026-08-10
 * Scope: card-grid balance, resource intro width, footer/tail closure, readable typography.
 * This is the final visual convergence layer for the 2026-08-10 marked screenshots.
 */
:root{
  --qily-type-nav-1:18.2px;
  --qily-type-nav-2:17.2px;
  --qily-type-nav-3:16px;
  --qily-type-h1:clamp(45px,4.35vw,70px);
  --qily-type-h2:clamp(34px,3vw,49px);
  --qily-type-h3:clamp(23.5px,1.65vw,28px);
  --qily-type-h4:20.5px;
  --qily-type-body:19.5px;
  --qily-type-card:19.25px;
  --qily-type-note:17px;
  --qily-type-small:15.5px;
}

/* A. 全站字号整体上移一档；原有 typography 变量继续作为唯一字号体系。 */
html body{
  font-size:var(--qily-type-body)!important;
}
html body :is(
  .module-eyebrow,.eyebrow,.qtc-kicker,.resource-kicker,
  .module-card small,.paper-card small,.career-full-card small,.qtc-card small,
  .tag,.qtc-mini-badge,.resource-status,.stat span
){
  font-size:var(--qily-type-small)!important;
}
html body :is(
  .module-result,.module-note,.career-result,.note,figcaption,.caption,.meta,
  .gallery-tip,.empty,.moment-count,.project-meta,.article-meta,
  .qtc-disclosure,.qtc-cert-note,.qtc-archive-item span,
  .qtc-global-trust-footer,.qily-global-contact-footer
){
  font-size:var(--qily-type-note)!important;
}
html body :is(.qtc-card p,.qtc-card ul,.resource-item p,.resource-stage p,.result){
  font-size:17px!important;
  line-height:1.72!important;
}
html body #floatDock.qily-float-dock .qily-float-btn{
  font-size:14.5px!important;
}

/* B. 八模块方法图谱及同类“正好8张四列卡片”在桌面端统一4x2。 */
@media(min-width:1180px){
  html:root:root:root body .capability-map.module-grid.four,
  html:root:root:root body .module-grid.four:has(> :nth-child(8):last-child){
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    align-items:stretch!important;
  }
}
@media(min-width:760px) and (max-width:1179px){
  html:root:root:root body .capability-map.module-grid.four,
  html:root:root:root body .module-grid.four:has(> :nth-child(8):last-child){
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    align-items:stretch!important;
  }
}
@media(max-width:759px){
  html:root:root:root body .capability-map.module-grid.four,
  html:root:root:root body .module-grid.four:has(> :nth-child(8):last-child){
    grid-template-columns:1fr!important;
  }
}
html:root:root:root body .capability-map>.module-card,
html:root:root:root body .module-grid.four:has(> :nth-child(8):last-child)>.module-card{
  display:flex!important;
  flex-direction:column!important;
  height:100%!important;
}
html:root:root:root body .capability-map>.module-card>.module-result:last-child,
html:root:root:root body .module-grid.four:has(> :nth-child(8):last-child)>.module-card>.module-result:last-child{
  margin-top:auto!important;
}

/* C. 行业资源入驻服务：正文优先占满剩余宽度，状态按钮只占自身宽度。 */
html:root:root:root body .resource-service-head{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) max-content!important;
  align-items:end!important;
  column-gap:16px!important;
  row-gap:10px!important;
}
html:root:root:root body .resource-service-head>div:first-child{
  min-width:0!important;
  width:100%!important;
}
html:root:root:root body .resource-service-lead{
  width:100%!important;
  max-width:none!important;
  max-inline-size:none!important;
  margin-right:0!important;
}
html:root:root:root body .resource-status{
  justify-self:end!important;
  align-self:end!important;
  margin:0 0 3px!important;
  white-space:nowrap!important;
}
@media(min-width:1480px){
  html:root:root:root body .resource-service-lead{
    white-space:nowrap!important;
  }
}
@media(max-width:1099px){
  html:root:root:root body .resource-service-head{
    grid-template-columns:1fr!important;
  }
  html:root:root:root body .resource-service-lead{
    white-space:normal!important;
  }
  html:root:root:root body .resource-status{
    justify-self:start!important;
  }
}

/* D. 页尾：品牌/标语、技术联系、可信度栏使用同一内容轴和同一基线。 */
html:root:root:root body.qily-tail-compact :is(.module-footer,.footer,footer){
  box-sizing:border-box!important;
  flex:0 0 auto!important;
  margin-top:0!important;
  margin-bottom:0!important;
  padding-top:16px!important;
  padding-bottom:16px!important;
}
html:root:root:root body.qily-tail-compact :is(.module-footer,.footer,footer) > :is(.module-inner,.footer-inner){
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:24px!important;
  flex-wrap:wrap!important;
  width:min(var(--qily-site-content-width,var(--qily-wide-content,1560px)),100%)!important;
  max-width:var(--qily-site-content-width,var(--qily-wide-content,1560px))!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
html:root:root:root body.qily-tail-compact :is(.module-footer,.footer,footer) > :is(.module-inner,.footer-inner) > :first-child{
  margin-right:auto!important;
  text-align:left!important;
}
html:root:root:root body.qily-tail-compact :is(.module-footer,.footer,footer) > :is(.module-inner,.footer-inner) > :last-child{
  margin-left:auto!important;
  text-align:right!important;
}
html:root:root:root body.qily-tail-compact .qily-global-contact-footer{
  box-sizing:border-box!important;
  width:min(var(--qily-site-content-width,var(--qily-wide-content,1560px)),100%)!important;
  max-width:var(--qily-site-content-width,var(--qily-wide-content,1560px))!important;
  margin:10px auto 0!important;
  padding:12px 0 0!important;
  border-top:1px solid rgba(255,227,155,.28)!important;
  justify-content:center!important;
  gap:12px!important;
  text-align:center!important;
}
html:root:root:root body.qily-tail-compact > .qtc-global-trust-footer{
  box-sizing:border-box!important;
  order:9000!important;
  flex:0 0 auto!important;
  width:100%!important;
  margin:0!important;
  padding-top:14px!important;
  padding-bottom:14px!important;
  border-top:1px solid rgba(255,255,255,.10)!important;
}
html:root:root:root body.qily-tail-compact > .qtc-global-trust-footer .qtc-inner{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  flex-wrap:wrap!important;
  width:min(var(--qily-site-content-width,var(--qily-wide-content,1560px)),100%)!important;
  max-width:var(--qily-site-content-width,var(--qily-wide-content,1560px))!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
html:root:root:root body.qily-tail-compact .qtc-global-trust-footer .qtc-global-trust-links > a[href]{
  font-size:15.5px!important;
  min-height:46px!important;
  padding:9px 16px!important;
}

/* E. 短页真实收口：Main只承担剩余高度，工具与废弃持久导航不参与文档流。 */
html:root:root:root body.qily-tail-compact{
  min-height:100vh!important;
  min-height:100dvh!important;
  height:auto!important;
  margin:0!important;
  padding-bottom:0!important;
  display:flex!important;
  flex-direction:column!important;
}
html:root:root:root body.qily-tail-compact > main{
  flex:1 0 auto!important;
  min-height:0!important;
  margin-bottom:0!important;
  padding-bottom:0!important;
}
html:root:root:root body.qily-tail-compact > :is(
  #floatDock,#shareMask,#wxMask,#qilySearchMask,#qilyDockToast,#siteMusicMute
){
  position:fixed!important;
  flex:0 0 auto!important;
  margin:0!important;
}
html:root:root:root body.qily-tail-compact > :is(
  #qilyPersistentNavigationFrame,#qilyPersistentNavigationLoader
){
  display:none!important;
  width:0!important;
  height:0!important;
  min-width:0!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  overflow:hidden!important;
}
html:root:root:root body.qily-tail-compact > #siteBackgroundMusic:not([controls]){
  display:none!important;
  width:0!important;
  height:0!important;
}
html:root:root:root body.qily-tail-compact::after{
  content:none!important;
  display:none!important;
}
html:root:root:root body.qily-tail-compact .qily-global-contact-footer-shell:empty{
  display:none!important;
}

/* F. 悬浮按钮保持完整圆形和可读字号，不因字号提升挤出边界。 */
html:root:root:root body #floatDock.qily-float-dock{
  right:max(20px,env(safe-area-inset-right))!important;
  overflow:visible!important;
}
html:root:root:root body #floatDock.qily-float-dock .qily-float-btn{
  box-sizing:border-box!important;
  width:62px!important;
  height:62px!important;
  min-width:62px!important;
  min-height:62px!important;
  border-radius:50%!important;
  line-height:1.16!important;
}

@media(max-width:900px){
  :root{
    --qily-type-nav-1:14.5px;
    --qily-type-nav-2:15.5px;
    --qily-type-nav-3:15px;
    --qily-type-h3:23px;
    --qily-type-body:18.5px;
    --qily-type-card:18px;
    --qily-type-note:16.2px;
    --qily-type-small:14.8px;
  }
  html:root:root:root body.qily-tail-compact :is(.module-footer,.footer,footer) > :is(.module-inner,.footer-inner),
  html:root:root:root body.qily-tail-compact > .qtc-global-trust-footer .qtc-inner{
    align-items:flex-start!important;
    flex-direction:column!important;
  }
  html:root:root:root body.qily-tail-compact :is(.module-footer,.footer,footer) > :is(.module-inner,.footer-inner) > :last-child{
    margin-left:0!important;
    text-align:left!important;
  }
  html:root:root:root body.qily-tail-compact .qily-global-contact-footer{
    justify-content:flex-start!important;
    text-align:left!important;
  }
}

@media(max-width:620px){
  :root{
    --qily-type-nav-1:13px;
    --qily-type-nav-2:14.5px;
    --qily-type-nav-3:14px;
    --qily-type-h1:clamp(37px,10vw,45px);
    --qily-type-h2:clamp(30.5px,8vw,38px);
    --qily-type-h3:22px;
    --qily-type-h4:19px;
    --qily-type-body:18px;
    --qily-type-card:17.5px;
    --qily-type-note:15.5px;
    --qily-type-small:14.5px;
  }
  html body #floatDock.qily-float-dock .qily-float-btn{
    width:54px!important;
    height:54px!important;
    min-width:54px!important;
    min-height:54px!important;
    font-size:12.5px!important;
  }
  html:root:root:root body.qily-tail-compact .qtc-global-trust-footer .qtc-global-trust-links{
    width:100%!important;
    flex-direction:column!important;
    align-items:stretch!important;
  }
  html:root:root:root body.qily-tail-compact .qtc-global-trust-footer .qtc-global-trust-links > a[href]{
    width:100%!important;
    min-width:0!important;
  }
}

/* G. V21 页尾视觉闭环：删除重复左侧身份文案，只保留标语、联系方式和可信度三层。 */
html:root:root:root body.qily-tail-compact :is(.module-footer,.footer,footer) > :is(.module-inner,.footer-inner):has(> :nth-child(2)) > :first-child{
  display:none!important;
}
html:root:root:root body.qily-tail-compact :is(.module-footer,.footer,footer) > :is(.module-inner,.footer-inner):has(> :nth-child(2)){
  display:block!important;
  padding:0!important;
}
html:root:root:root body.qily-tail-compact :is(.module-footer,.footer,footer) > :is(.module-inner,.footer-inner):has(> :nth-child(2)) > :last-child{
  display:block!important;
  width:100%!important;
  margin:0!important;
  color:#e6efec!important;
  font-size:15.5px!important;
  font-weight:750!important;
  line-height:1.45!important;
  letter-spacing:.015em!important;
  text-align:center!important;
}
html:root:root:root body.qily-tail-compact :is(.module-footer,.footer,footer){
  padding-top:12px!important;
  padding-bottom:12px!important;
}

/* 联系信息拆成“标题 + 两组联系方式”两行，避免所有内容挤在同一行。 */
html:root:root:root body.qily-tail-compact .qily-global-contact-footer{
  display:grid!important;
  grid-template-columns:auto max-content auto max-content!important;
  align-items:center!important;
  justify-content:center!important;
  column-gap:10px!important;
  row-gap:9px!important;
  width:min(980px,100%)!important;
  max-width:980px!important;
  margin:10px auto 0!important;
  padding:12px 12px 0!important;
  color:#dbe8e4!important;
  font-size:14.5px!important;
  line-height:1.35!important;
  text-align:center!important;
}
html:root:root:root body.qily-tail-compact .qily-global-contact-footer > :first-child{
  grid-column:1 / -1!important;
  color:#ffffff!important;
  font-size:15.5px!important;
  font-weight:900!important;
  letter-spacing:.01em!important;
}
html:root:root:root body.qily-tail-compact .qily-global-contact-footer > span:not(:first-child){
  color:#dbe8e4!important;
  font-size:14px!important;
  font-weight:800!important;
  white-space:nowrap!important;
}
html:root:root:root body.qily-tail-compact .qily-global-contact-footer > a{
  min-height:36px!important;
  padding:6px 11px!important;
  border:1px solid rgba(255,227,155,.55)!important;
  border-radius:8px!important;
  color:#ffe39b!important;
  -webkit-text-fill-color:#ffe39b!important;
  background:rgba(255,255,255,.045)!important;
  font-size:14.5px!important;
  font-weight:900!important;
  line-height:1.2!important;
  text-decoration:none!important;
  white-space:nowrap!important;
}
html:root:root:root body.qily-tail-compact .qily-global-contact-footer > a:is(:hover,:focus-visible){
  color:#17322d!important;
  -webkit-text-fill-color:#17322d!important;
  background:#ffe39b!important;
  border-color:#ffe39b!important;
  outline:2px solid rgba(255,227,155,.35)!important;
  outline-offset:2px!important;
}

/* 可信度栏压缩为清晰的一行决策信息 + 三个操作入口。 */
html:root:root:root body.qily-tail-compact > .qtc-global-trust-footer{
  padding-top:12px!important;
  padding-bottom:12px!important;
}
html:root:root:root body.qily-tail-compact > .qtc-global-trust-footer .qtc-inner{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:18px!important;
}
html:root:root:root body.qily-tail-compact > .qtc-global-trust-footer .qtc-inner > div:first-child{
  min-width:0!important;
  color:#d7e8e4!important;
  font-size:14.5px!important;
  line-height:1.55!important;
  letter-spacing:0!important;
}
html:root:root:root body.qily-tail-compact > .qtc-global-trust-footer .qtc-inner > div:first-child strong{
  color:#ffe39b!important;
  font-size:14.5px!important;
}
html:root:root:root body.qily-tail-compact .qtc-global-trust-footer .qtc-global-trust-links{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:9px!important;
  margin:0!important;
  flex-wrap:nowrap!important;
}
html:root:root:root body.qily-tail-compact .qtc-global-trust-footer .qtc-global-trust-links > a[href]{
  min-height:40px!important;
  padding:7px 13px!important;
  font-size:14px!important;
  line-height:1.2!important;
  white-space:nowrap!important;
}

@media(max-width:1050px){
  html:root:root:root body.qily-tail-compact > .qtc-global-trust-footer .qtc-inner{
    grid-template-columns:1fr!important;
    justify-items:center!important;
    text-align:center!important;
  }
  html:root:root:root body.qily-tail-compact .qtc-global-trust-footer .qtc-global-trust-links{
    justify-content:center!important;
    flex-wrap:wrap!important;
  }
}

@media(max-width:720px){
  html:root:root:root body.qily-tail-compact .qily-global-contact-footer{
    grid-template-columns:auto minmax(0,1fr)!important;
    width:100%!important;
    max-width:100%!important;
    justify-content:stretch!important;
    text-align:left!important;
  }
  html:root:root:root body.qily-tail-compact .qily-global-contact-footer > :first-child{
    text-align:center!important;
  }
  html:root:root:root body.qily-tail-compact .qily-global-contact-footer > a{
    min-width:0!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
}

@media(max-width:520px){
  html:root:root:root body.qily-tail-compact :is(.module-footer,.footer,footer) > :is(.module-inner,.footer-inner):has(> :nth-child(2)) > :last-child{
    font-size:14px!important;
  }
  html:root:root:root body.qily-tail-compact .qily-global-contact-footer{
    grid-template-columns:1fr!important;
    row-gap:7px!important;
    padding-left:0!important;
    padding-right:0!important;
  }
  html:root:root:root body.qily-tail-compact .qily-global-contact-footer > :first-child,
  html:root:root:root body.qily-tail-compact .qily-global-contact-footer > span:not(:first-child),
  html:root:root:root body.qily-tail-compact .qily-global-contact-footer > a{
    grid-column:1!important;
    width:100%!important;
    text-align:center!important;
  }
  html:root:root:root body.qily-tail-compact .qtc-global-trust-footer .qtc-global-trust-links{
    width:100%!important;
    flex-direction:column!important;
    align-items:stretch!important;
  }
  html:root:root:root body.qily-tail-compact .qtc-global-trust-footer .qtc-global-trust-links > a[href]{
    width:100%!important;
    min-width:0!important;
  }
}

/* QILY-FOOTER-SINGLE-LINE-V25:START */
/* Desktop footer information-density closure.
 * Merge the former slogan / contact-title / official-contact rows into one visual line.
 * Keep mobile V23 responsive layout unchanged because a forced single line is not usable there.
 */
@media (min-width:1051px){
  html:root:root:root body.qily-tail-compact :is(.module-footer,.footer,footer):has(> #qilyGlobalContactFooter){
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex-wrap:nowrap!important;
    gap:0!important;
    padding:9px clamp(22px,3vw,54px)!important;
  }

  html:root:root:root body.qily-tail-compact :is(.module-footer,.footer,footer):has(> #qilyGlobalContactFooter)
  > :is(.module-inner,.footer-inner):has(> :nth-child(2)){
    display:contents!important;
    width:auto!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
  }

  html:root:root:root body.qily-tail-compact :is(.module-footer,.footer,footer):has(> #qilyGlobalContactFooter)
  > :is(.module-inner,.footer-inner):has(> :nth-child(2)) > :first-child{
    display:none!important;
  }

  html:root:root:root body.qily-tail-compact :is(.module-footer,.footer,footer):has(> #qilyGlobalContactFooter)
  > :is(.module-inner,.footer-inner):has(> :nth-child(2)) > :last-child{
    display:inline-flex!important;
    align-items:center!important;
    flex:0 0 auto!important;
    width:auto!important;
    margin:0!important;
    color:#e6efec!important;
    font-size:clamp(11px,.78vw,13.5px)!important;
    font-weight:800!important;
    line-height:1.25!important;
    letter-spacing:0!important;
    white-space:nowrap!important;
    text-align:left!important;
  }

  html:root:root:root body.qily-tail-compact :is(.module-footer,.footer,footer):has(> #qilyGlobalContactFooter)
  > :is(.module-inner,.footer-inner):has(> :nth-child(2)) > :last-child::after{
    content:' ｜ '!important;
    display:inline!important;
    margin:0 5px!important;
    color:rgba(255,227,155,.82)!important;
    font-weight:700!important;
  }

  html:root:root:root body.qily-tail-compact #qilyGlobalContactFooter.qily-global-contact-footer{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 1 auto!important;
    flex-wrap:nowrap!important;
    gap:6px!important;
    width:auto!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    border-top:0!important;
    color:#dbe8e4!important;
    font-size:clamp(11px,.78vw,13.5px)!important;
    line-height:1.25!important;
    white-space:nowrap!important;
    text-align:left!important;
  }

  html:root:root:root body.qily-tail-compact #qilyGlobalContactFooter > :first-child{
    display:inline-flex!important;
    align-items:center!important;
    grid-column:auto!important;
    flex:0 0 auto!important;
    width:auto!important;
    color:#fff!important;
    font-size:inherit!important;
    font-weight:900!important;
    line-height:inherit!important;
    letter-spacing:0!important;
    white-space:nowrap!important;
  }

  html:root:root:root body.qily-tail-compact #qilyGlobalContactFooter > :first-child::after{
    content:' ｜ '!important;
    display:inline!important;
    margin-left:5px!important;
    color:rgba(255,227,155,.82)!important;
    font-weight:700!important;
  }

  html:root:root:root body.qily-tail-compact #qilyGlobalContactFooter > span:not(:first-child){
    display:inline-flex!important;
    align-items:center!important;
    flex:0 0 auto!important;
    color:#dbe8e4!important;
    font-size:inherit!important;
    font-weight:800!important;
    line-height:inherit!important;
    white-space:nowrap!important;
  }

  html:root:root:root body.qily-tail-compact #qilyGlobalContactFooter > a{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 auto!important;
    min-width:0!important;
    min-height:28px!important;
    padding:3px 8px!important;
    border-radius:7px!important;
    color:#ffe39b!important;
    -webkit-text-fill-color:#ffe39b!important;
    font-size:inherit!important;
    font-weight:900!important;
    line-height:1.2!important;
    white-space:nowrap!important;
  }
}
/* QILY-FOOTER-SINGLE-LINE-V25:END */
