/* Homepage only: a separate mobile layout using the existing CMS content. */
.home-mobile-preview { display: none; }

@media (max-width: 980px) {
  body.home-page {
    --home-gutter: 18px;
    --home-blue: #0b6f95;
    color: #24272b;
    text-align: left;
    -webkit-text-size-adjust: 100%;
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
  .home-page .site-header,
  .home-page section,
  .home-page .foot { box-sizing: border-box; }
  .home-page .site-header {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 64px;
    border: 0;
    border-bottom: 1px solid #e3edf2;
    border-radius: 0;
    background: #eff7fc;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .home-page .site-header > .topmain {
    width: calc(100% - 36px);
    max-width: none;
    height: 64px;
  }
  .home-page .site-header .logo img { width: 120px; height: auto; max-width: 120px; filter: invert(1) hue-rotate(180deg) saturate(4) brightness(.82); }
  .home-page .site-header .sp_nav {
    top: 10px; right: 0;
    width: 44px; height: 44px;
    padding: 0; border: 0; border-radius: 8px;
    background: transparent;
  }
  .home-page .sp_nav span { left: 11px; width: 22px; height: 2px; }
  .home-page .sp_nav span:nth-child(1) { top: 14px; }
  .home-page .sp_nav span:nth-child(2) { top: 21px; }
  .home-page .sp_nav span:nth-child(3) { top: 28px; }
  .home-page .sp_nav_se span:nth-child(1),
  .home-page .sp_nav_se span:nth-child(3) { top: 21px; }
  .home-page .sp_nav_se span:nth-child(2) { width: 0; }
  .home-page .site-header .sjj_nav {
    top: 100%; right: -8px;
    width: min(360px, calc(100% + 16px));
    max-height: calc(100dvh - 84px);
    background: #f4f9fc;
  }
  .home-page .site-header .sjj_nav ul li a { text-align: left; line-height: 24px; }
  .home-page .sp_nav:focus-visible { outline: 2px solid var(--home-blue); outline-offset: 2px; }

  /* The artwork always fits within a 16:9 canvas; no cropping or stretching. */
  .home-page .slider { height: auto; aspect-ratio: 16 / 9; background: #edf4f8; touch-action: pan-y pinch-zoom; }
  .home-page .slider .jquery-reslider { position: absolute; inset: 0; }
  .home-page .slider .slider-image { padding: 0; object-fit: contain; object-position: center; }
  .home-page .slider .slider-block::before { display: none; }
  .home-page .slider .jquery-reslider .slider-direction {
    top: 50%; bottom: auto; transform: translateY(-50%);
    width: 44px; height: 44px;
    opacity: .8; border-radius: 50%;
    background-color: rgba(12, 39, 49, .18);
    background-position: center; background-size: 28px;
  }
  .home-page .slider .jquery-reslider .slider-direction-prev { left: 4px; }
  .home-page .slider .jquery-reslider .slider-direction-next { right: 4px; }
  .home-page .slider .jquery-reslider .slider-dots { bottom: 0; }
  .home-page .slider .jquery-reslider .slider-dots ul { width: min(44%, 220px); gap: 8px; }
  .home-page .slider .jquery-reslider .slider-dots button { height: 28px; }
  .home-page .slider .jquery-reslider .slider-dots button::before { background: rgba(23, 59, 80, .25); box-shadow: 0 1px 2px #fff; }
  .home-page .slider .jquery-reslider .slider-progress { background: #087eae; }

  .home-page .home-products,
  .home-page .home-about,
  .home-page .home-cloud,
  .home-page .home-map,
  .home-page .home-news { padding: 40px var(--home-gutter); }
  .home-page .home-products .main,
  .home-page .home-news .main { width: 100%; max-width: none; }
  .home-page .home-products .products-head h2,
  .home-page .home-about h2,
  .home-page .home-cloud .cloud-intro h2,
  .home-page .home-map h2,
  .home-page .home-news .section-head h2 {
    font-size: 27px; line-height: 1.4; letter-spacing: 0; text-align: left;
  }

  /* Keep the two-column product wall, with all controls above the cards. */
  .home-page .home-products { --col-gap: 12px; --row-gap: 12px; }
  .home-page .home-products .products-head { flex-direction: column; align-items: stretch; gap: 16px; margin-bottom: 14px; }
  .home-page .home-products .products-head .sub { max-width: none; font-size: 14px; line-height: 1.8; }
  .home-page .home-products .head-rule { margin: 10px 0; }
  .home-page .home-products .cluster { width: 100%; gap: 10px; }
  .home-page .home-products .view-all { display: inline-flex; margin-right: auto; }
  .home-page .home-products .pc-grid,
  .home-page .home-products .pc-grid[data-count],
  .home-page .home-products .marquee:not(.is-ready) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-page .home-products .card-link { min-height: 0; padding: 12px; box-shadow: 0 4px 12px rgba(25, 28, 32, .04); }
  .home-page .home-products .card-head { min-height: 44px; }
  .home-page .home-products .card-title { font-size: 15px; line-height: 1.45; }
  .home-page .home-products .card-art { height: clamp(130px, 38vw, 210px); padding: 0; }
  .home-page .home-products .art-layer { position: absolute; inset: 0; height: 100%; min-height: 0; }
  .home-page .home-products .art-layer img { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; object-fit: contain; }
  .home-page .home-products .card-link:hover .art-a { opacity: 1; transform: none; }
  .home-page .home-products .card-link:hover .art-b { opacity: 0; }
  .home-page .home-products .card-more { margin-top: 8px; font-size: 13px; }
  .home-page .home-products .pc-status { flex-wrap: wrap; gap: 4px 12px; margin-top: 12px; font-size: 12px; }

  .home-page .home-about { min-height: 0; background-attachment: scroll; }
  .home-page .home-about .content { flex-direction: column; align-items: stretch; gap: 26px; }
  .home-page .home-about .copy { max-width: none; }
  .home-page .home-about .kicker { margin-bottom: 14px; }
  .home-page .home-about h2 .lede:empty { display: none; }
  .home-page .home-about p.body { max-width: none; margin: 18px 0 22px; font-size: 15px; line-height: 1.9; }
  .home-page .home-about .detail-link { min-height: 44px; box-sizing: border-box; padding: 9px 18px; }
  .home-page .home-about .facts dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .home-page .home-about .facts dd,
  .home-page .home-about .facts dd:first-child,
  .home-page .home-about .facts dd:last-child { align-items: flex-start; text-align: left; padding: 0 0 0 12px; gap: 10px; border: 0; border-left: 1px solid var(--hairline); }
  .home-page .home-about .facts dd:first-child { padding-left: 0; border-left: 0; }
  .home-page .home-about .f-num { font-size: clamp(28px, 7.8vw, 42px); line-height: 1.15; }
  .home-page .home-about .f-num span,
  .home-page .home-about .f-num sup { color: inherit; line-height: inherit; }
  .home-page .home-about .f-label { font-size: 12px; letter-spacing: 0; }

  /* Mobile opens the interactive workbench on its own page. */
  .home-page .home-cloud .cloud-wrap { gap: 24px; }
  .home-page .home-cloud .cloud-intro { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .home-page .home-cloud .cloud-intro .kicker { margin-bottom: 12px; }
  .home-page .home-cloud .cloud-intro .lede { margin-top: 12px; font-size: 16px; }
  .home-page .home-cloud .caps { gap: 12px; margin-top: 18px; }
  .home-page .home-cloud .cloud-cta { justify-content: center; min-height: 46px; width: 100%; margin-top: 22px; padding: 10px 12px; border-radius: 8px; }
  .home-page .home-cloud .console { display: none; }
  .home-page .home-mobile-preview { display: block; border: 1px solid #cddfe7; border-radius: 8px; overflow: hidden; background: #fff; }
  .home-page .home-mobile-preview img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: contain; }
  .home-page .home-mobile-preview > span { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; color: #4d6672; font-size: 12px; line-height: 1.6; }
  .home-page .home-mobile-preview:focus-visible { outline: 2px solid var(--home-blue); outline-offset: 3px; }

  .home-page .home-map .hm-wrap { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .home-page .home-map .hm-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 22px; }
  .home-page .home-map .hm-stat:nth-child(n) { padding: 16px 10px; border-left: 1px solid var(--hm-line); }
  .home-page .home-map .hm-stat:first-child { padding-left: 0; border-left: 0; }
  .home-page .home-map .hm-stat dd { font-size: clamp(26px, 7vw, 36px); line-height: 1.25; }
  .home-page .home-map .hm-stat dd span { color: inherit; line-height: inherit; }
  .home-page .home-map .hm-stat sup { font-size: 12px; margin-left: 2px; }
  .home-page .home-map .hm-legend { margin-top: 18px; }
  .home-page .home-map .hm-lede { margin-top: 14px; line-height: 1.8; }
  .home-page .home-map .hm-note { font-size: 10px; }
  .home-page .home-map .hm-stage { width: 100%; max-width: 580px; margin: 0 auto; }

  /* News images keep their own ratio; text stays below instead of covering them. */
  .home-page .home-news .section-head { flex-direction: row; align-items: center; gap: 12px; margin-bottom: 22px; }
  .home-page .home-news .eyebrow { display: none; }
  .home-page .home-news .view-all { font-size: 13px; white-space: nowrap; min-height: 44px; align-items: center; padding: 0; }
  .home-page .home-news .news-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .home-page .home-news .news-card { border-radius: 8px; box-shadow: none; border: 1px solid #dce5e9; background: #fff; }
  .home-page .home-news .news-media { display: flex; flex-direction: column; height: auto; background: #fff; }
  .home-page .home-news .news-scene { position: static; width: 100%; height: auto; object-fit: contain; transform: none; }
  .home-page .home-news .news-scrim { display: none; }
  .home-page .home-news .news-date { top: 12px; right: 12px; padding: 6px 8px; border-radius: 4px; background: rgba(12, 39, 49, .8); }
  .home-page .home-news .news-date b { font-size: 24px; }
  .home-page .home-news .news-overlay { position: static; gap: 12px; padding: 18px; color: #14252c; }
  .home-page .home-news .news-tag { padding: 0; border: 0; border-radius: 0; color: var(--home-blue); background: none; }
  .home-page .home-news .news-title { display: block; max-width: none; font-size: 18px; line-height: 1.6; color: #14252c; text-shadow: none; text-align: left; }
  .home-page .home-news .news-reveal { opacity: 1; transform: none; gap: 12px; }
  .home-page .home-news .news-excerpt { max-width: none; font-size: 14px; line-height: 1.8; color: #546974; }
  .home-page .home-news .news-read { font-size: 14px; color: var(--home-blue); }
  .home-page .home-news .news-card:hover { transform: none; box-shadow: none; }

  .home-page .ft-single .ft-single-grid,
  .home-page .ft-single .ft-single-grid.no-wechat { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 32px; padding-bottom: 32px; }
  .home-page .ft-single .ft-brand,
  .home-page .ft-single .ft-single-qr { grid-column: auto; grid-row: auto; }
  .home-page .ft-single .ft-single-qr { flex-direction: row !important; justify-content: flex-start; }
  .home-page .ft-single .ft-legal a,
  .home-page .ft-single .ft-legal span { font-size: 12px; }
  .home-page .ft-single .ft-nav { gap: 4px 20px; }
  .home-page .ft-single .ft-nav > a { min-height: 44px; }
  .home-page .ft-single .ft-channels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .home-page .ft-single .ft-channel-value { font-size: clamp(15px, 4.2vw, 19px); }

  /* Keep contact actions in the thumb area, clear of page text and imagery. */
  .home-page .consult-rail {
    inset: auto 12px max(10px, env(safe-area-inset-bottom, 0px)) 12px !important;
    width: auto !important; max-height: none;
    display: flex; flex-direction: row; gap: 4px;
    padding: 4px; background: rgba(243, 249, 253, .96);
    border-color: #d6e5ed;
  }
  .home-page .consult-rail .consult-rail-handle,
  .home-page .consult-rail .consult-rail-switch { display: none; }
  .home-page .consult-rail .consult-rail-item { flex: 1; width: auto; min-height: 48px; flex-direction: row; gap: 6px; font-size: 13px; }
}

@media (max-width: 360px) {
  body.home-page { --home-gutter: 14px; }
  .home-page .home-products .card-link { padding: 10px; }
  .home-page .home-products .card-title { font-size: 14px; }
  .home-page .home-about .facts dl { gap: 8px; }
  .home-page .home-about .facts dd:nth-child(n) { padding-left: 8px; }
  .home-page .home-about .facts dd:first-child { padding-left: 0; }
}

@media (min-width: 640px) and (max-width: 980px) {
  body.home-page { --home-gutter: 28px; }
  .home-page .home-news .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-page .home-products .pc-grid[data-count],
  .home-page .home-products .marquee:not(.is-ready) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-page .home-products .card-art { height: clamp(150px, 22vw, 210px); }
  .home-page .consult-rail { left: auto !important; width: 320px !important; }
}

@media (min-width: 981px) and (max-width: 1100px) {
  .home-page .site-header .logo img { width: 120px; }
  .home-page .site-header .nav > ul { gap: 8px; }
  .home-page .site-header .nav > ul > li > a { padding-inline: 4px; font-size: 13px; }
  .home-page .site-header .nav > ul > li:last-child .subnav { left: auto; right: 0; }
}
