/* Responsive rules kept separate so the presentation modules stay bounded. */

@media (max-width: 1199px) and (min-width: 901px) {
  .cbc-desktop-navigation > ul > .cbc-nav-item > a {
    font-size: 13px;
    padding-inline: 10px;
  }

  body.cbc-tccc-smart-match-page [data-catalog-profile="cbc"] .sm-result-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .cbc-utility-bar,
  .cbc-desktop-navigation {
    display: none;
  }

  .cbc-primary-bar,
  .cbc-primary-bar__inner,
  .cbc-brand {
    height: 56px;
  }

  .cbc-brand {
    flex-basis: 150px;
  }

  .cbc-mobile-navigation {
    display: block;
    margin-left: auto;
    position: relative;
  }

  .cbc-mobile-navigation > summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    height: 44px;
    justify-content: center;
    list-style: none;
    min-width: 44px;
  }

  .cbc-mobile-navigation > summary::-webkit-details-marker {
    display: none;
  }

  .cbc-hamburger {
    display: grid;
    gap: 5px;
    width: 24px;
  }

  .cbc-hamburger > span {
    background: var(--cbc-shell);
    display: block;
    height: 2px;
    transform-origin: center;
    transition: opacity 180ms ease, transform 180ms ease;
    width: 24px;
  }

  .cbc-mobile-navigation[open] .cbc-hamburger > span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .cbc-mobile-navigation[open] .cbc-hamburger > span:nth-child(2) {
    opacity: 0;
  }

  .cbc-mobile-navigation[open] .cbc-hamburger > span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .cbc-mobile-menu {
    background: #ffffff;
    border-top: 1px solid var(--cbc-line);
    box-shadow: 0 18px 30px rgba(20, 43, 59, 0.2);
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    position: absolute;
    right: -15px;
    top: 50px;
    width: 100vw;
  }

  .cbc-mobile-menu > ul,
  .cbc-mobile-menu .cbc-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .cbc-mobile-menu > ul > li {
    border-bottom: 1px solid var(--cbc-line);
  }

  .cbc-mobile-menu > ul > li > a {
    align-items: center;
    color: var(--cbc-ink);
    display: flex;
    font-size: 15px;
    font-weight: 600;
    min-height: 48px;
    padding: 12px 20px;
    text-decoration: none;
  }

  .cbc-mobile-menu > ul > li > a[aria-current="page"] {
    box-shadow: inset 4px 0 0 var(--cbc-gold);
    color: var(--cbc-shell);
  }

  .cbc-mobile-menu .cbc-submenu {
    background: var(--cbc-panel);
    border: 0;
    box-shadow: none;
    min-width: 0;
    opacity: 1;
    pointer-events: auto;
    position: static;
    transform: none;
    visibility: visible;
  }

  .cbc-mobile-menu .cbc-submenu a {
    min-height: 44px;
    padding: 10px 20px 10px 36px;
  }

  .cbc-alliance-hero__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .cbc-alliance-hero__visual {
    min-height: clamp(500px, 65vw, 600px);
  }

  .cbc-alliance-hero__photo {
    width: 56%;
  }

  .cbc-alliance-hero__visual figcaption {
    right: calc(44% + 14px);
  }

  body.cbc-tccc-smart-match-page [data-catalog-profile="cbc"] .tccc-smart-match__head {
    grid-template-columns: minmax(0, 1fr);
  }

  body.cbc-tccc-smart-match-page [data-catalog-profile="cbc"] .sm-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.cbc-tccc-smart-match-page [data-catalog-profile="cbc"] .sm-rec-img {
    aspect-ratio: 4 / 5;
  }
}

@media (max-width: 782px) {
  body.admin-bar .cbc-site-header {
    top: 46px;
  }
}

@media (max-width: 620px) {
  .cbc-breadcrumb nav {
    min-height: 44px;
    padding-block: 8px;
  }

  .cbc-contact-rail {
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    height: calc(50px + env(safe-area-inset-bottom));
    left: 0;
    padding-bottom: env(safe-area-inset-bottom);
    position: fixed;
    right: 0;
    z-index: 9998;
  }

  .cbc-alliance-hero {
    padding: 46px 0 72px;
  }

  .cbc-alliance-hero__layout {
    gap: 44px;
  }

  .cbc-alliance-lockup {
    gap: 10px;
    margin-bottom: 32px;
  }

  .cbc-alliance-lockup__brand {
    height: 40px;
  }

  .cbc-alliance-lockup__brand strong {
    font-size: 26px;
  }

  .cbc-alliance-lockup__brand--cbc {
    gap: 6px;
  }

  .cbc-alliance-lockup > span {
    font-size: 24px;
  }

  .cbc-alliance-hero h1 {
    font-size: clamp(44px, 13vw, 56px);
  }

  .cbc-alliance-hero__tagline {
    font-size: 21px;
  }

  .cbc-alliance-hero__cta {
    width: 100%;
  }

  .cbc-alliance-hero__visual {
    display: grid;
    gap: 0;
    min-height: 0;
  }

  .cbc-alliance-hero__photo {
    border-width: 8px;
    position: relative;
    width: 88%;
  }

  .cbc-alliance-hero__photo--jingmei {
    inset: auto;
    margin-left: auto;
  }

  .cbc-alliance-hero__photo--tccc {
    bottom: auto;
    left: auto;
    margin-right: auto;
    margin-top: -28px;
    width: 88%;
  }

  .cbc-alliance-hero__visual figcaption {
    bottom: 16px;
    font-size: 9px;
    left: auto;
    right: calc(12% + 10px);
  }

  .cbc-alliance-faq summary {
    font-size: 17px;
  }

  .cbc-contact-rail a {
    align-items: center;
    display: flex;
    font-size: 13px;
    font-weight: 750;
    justify-content: center;
    min-height: 50px;
    text-decoration: none;
  }

  .cbc-contact-rail__tel {
    background: var(--cbc-shell);
    color: #ffffff;
  }

  .cbc-contact-rail__line {
    background: #06c755;
    color: #061b31;
  }

  .cbc-contact-rail__facebook {
    background: #1877f2;
    color: #ffffff;
  }

  body.cbc-tccc-smart-match-page #socket {
    margin-bottom: calc(50px + env(safe-area-inset-bottom));
  }

  body.cbc-tccc-smart-match-page .tccc-smart-match[data-catalog-profile="cbc"] {
    padding: 40px 15px 88px;
  }

  body.cbc-tccc-smart-match-page [data-catalog-profile="cbc"] .tccc-smart-match__head {
    margin-bottom: 64px;
  }

  body.cbc-tccc-smart-match-page [data-catalog-profile="cbc"] .tccc-smart-match__head h1,
  body.cbc-tccc-smart-match-page [data-catalog-profile="cbc"] .tccc-smart-match__head h2 {
    font-size: clamp(36px, 11vw, 44px);
  }

  body.cbc-tccc-smart-match-page [data-catalog-profile="cbc"] .sm-search-panel {
    padding: 16px;
  }

  body.cbc-tccc-smart-match-page [data-catalog-profile="cbc"] .sm-result-grid {
    gap: 34px;
    grid-template-columns: minmax(0, 1fr);
  }

  body.cbc-tccc-smart-match-page [data-catalog-profile="cbc"] .sm-result {
    scroll-margin-top: 76px;
  }

  body.cbc-tccc-smart-match-page [data-catalog-profile="cbc"] .sm-rec-img {
    aspect-ratio: 4 / 5;
  }

  body.cbc-tccc-smart-match-page [data-catalog-profile="cbc"] .sm-rec-body {
    padding: 20px 18px 22px;
  }

  body.cbc-tccc-smart-match-page [data-catalog-profile="cbc"] .sm-alliance-purpose {
    font-size: 16px;
  }

  body.cbc-tccc-smart-match-page [data-catalog-profile="cbc"] .sm-alliance-operator {
    font-size: 14px;
  }

  body.cbc-tccc-smart-match-page [data-catalog-profile="cbc"] .sm-space-fact b {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cbc-smart-match-shell *,
  .cbc-smart-match-shell *::before,
  .cbc-smart-match-shell *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
