@media (max-width: 1023px) {
  .sm-container {
    width: min(calc(100% - 48px), var(--sm-container));
  }

  .sm-main-header__inner {
    grid-template-columns: 220px 1fr;
  }

  .sm-main-header__cta {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .sm-home-fv__inner,
  .sm-page-grid,
  .sm-thought-grid,
  .sm-area-panel,
  .sm-compare-tables,
  .sm-dual-panels,
  .sm-inline-cta__inner {
    grid-template-columns: 1fr;
  }

  .sm-service-grid,
  .sm-problem-grid,
  .sm-archive-grid--cases,
  .sm-archive-grid--column,
  .sm-voice-grid,
  .sm-contact-summary,
  .sm-site-footer__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sm-sidebar {
    width: auto;
  }

  .sm-filter-panel--works {
    grid-template-columns: 1fr;
  }

  .sm-related-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  body {
    padding-bottom: 56px;
    font-size: 15px;
    line-height: 1.85;
  }

  body.sm-mobile-nav-open {
    overflow: hidden;
  }

  .sm-container {
    width: calc(100% - 36px);
  }

  .sm-info-bar,
  .sm-global-nav,
  .sm-mega-menu-layer,
  .sm-main-header__contact,
  .sm-main-header__cta {
    display: none;
  }

  .sm-main-header__inner {
    min-height: 64px;
    grid-template-columns: minmax(150px, 1fr) auto;
    gap: 12px;
  }

  .sm-main-header__logo a {
    max-width: 150px;
    font-size: 24px;
    line-height: 1.2;
  }

  .sm-main-header__logo img {
    width: 150px;
    max-width: 100%;
    height: auto;
  }

  .sm-main-header__mobile-actions,
  .sm-fixed-cta {
    display: grid;
  }

  .sm-main-header__mobile-actions {
    grid-auto-flow: column;
    align-items: center;
    gap: 8px;
  }

  .sm-button--mobile {
    min-width: 92px;
  }

  .sm-mobile-nav[hidden],
  .sm-mobile-nav__overlay[hidden] {
    display: none !important;
  }

  .sm-mobile-nav {
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    height: calc(100dvh - 64px);
    overflow-y: auto;
    background: #fff;
    z-index: 80;
  }

  .sm-mobile-nav__overlay {
    position: fixed;
    inset: 64px 0 56px;
    background: rgba(0, 0, 0, 0.35);
    z-index: 70;
  }

  .sm-mobile-nav__parent-row {
    display: block;
    min-height: 52px;
    border-bottom: 1px solid var(--sm-color-border-light);
  }

  .sm-mobile-nav__toggle {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    font-size: 16px;
    font-weight: 700;
    text-align: left;
  }

  .sm-mobile-nav__toggle {
    justify-content: flex-start;
    border: 0;
    background: transparent;
    color: var(--sm-color-primary);
    cursor: pointer;
  }

  .sm-mobile-nav__toggle::before {
    order: 2;
    margin-left: auto;
  }

  .sm-mobile-nav__children {
    padding: 12px 18px 18px;
    background: var(--sm-color-bg-soft);
  }

  .sm-mobile-nav__children section + section {
    margin-top: 14px;
  }

  .sm-mobile-nav__heading {
    margin: 14px 0 4px;
    color: var(--sm-color-primary);
    font-size: 13px;
    font-weight: 700;
  }

  .sm-mobile-nav__children ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .sm-mobile-nav__children li a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 9px 8px;
    border-bottom: 1px solid #e3e3e3;
    font-size: 14px;
  }

  .sm-fixed-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--sm-color-border);
  }

  .sm-fixed-cta a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
  }

  .sm-fixed-cta a:first-child {
    background: var(--sm-color-primary);
  }

  .sm-fixed-cta a:last-child {
    background: var(--sm-color-cta-primary);
  }

  .sm-home-fv__inner {
    min-height: 0;
    padding: 32px 0;
  }

  .sm-home-fv__body {
    padding: 0;
  }

  .sm-home-fv h1 {
    font-size: 30px;
  }

  .sm-home-fv__actions {
    flex-direction: column;
  }

  .sm-home-section {
    padding-top: 52px;
  }

  .sm-home-section:last-child,
  .sm-home-section--soft {
    padding-bottom: 52px;
  }

  .sm-archive-grid--cases,
  .sm-voice-grid {
    grid-template-columns: 1fr;
    gap: 28px 20px;
    margin-top: 28px;
  }

  .sm-related-card-grid {
    grid-template-columns: 1fr;
  }

  .sm-voice-detail__section {
    margin-top: 32px;
  }

  .sm-voice-detail__facts > div {
    grid-template-columns: 1fr;
  }

  .sm-voice-detail__facts dt,
  .sm-voice-detail__facts dd {
    padding: 11px 12px;
  }

  .sm-voice-rating-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px 0;
  }

  .sm-voice-rating-row__scale {
    grid-template-columns: repeat(5, minmax(34px, 40px));
    gap: 8px;
    justify-content: start;
  }

  .sm-voice-rating-row__number {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }

  .sm-voice-detail__message-text {
    padding: 18px;
  }

  .sm-service-grid,
  .sm-problem-grid,
  .sm-archive-grid--column,
  .sm-contact-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
    margin-top: 28px;
  }

  .sm-site-footer {
    padding: 38px 0 24px;
  }

  .sm-site-footer__nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 20px;
    margin-top: 26px;
  }

  .sm-site-footer__nav section {
    min-width: 0;
  }

  .sm-site-footer__nav h3 {
    margin: 0 0 11px;
    font-size: 15px;
  }

  .sm-site-footer__nav li + li {
    margin-top: 7px;
  }

  .sm-site-footer__nav a {
    display: block;
    padding: 2px 0;
    font-size: 14px;
    line-height: 1.55;
  }

  .sm-site-footer__brand {
    padding-bottom: 22px;
  }

  .sm-site-footer__secondary {
    justify-content: flex-start;
    gap: 10px 18px;
    margin-top: 28px;
    padding-top: 20px;
  }

  .sm-page-header__grid,
  .sm-page-header__grid.has-image {
    padding: 28px 0 32px;
    grid-template-columns: 1fr;
  }

  .sm-page-header__title {
    font-size: 28px;
    line-height: 1.45;
  }

  .sm-entry-content h2,
  .sm-main-content .content-sectiontitle h2,
  .sm-main-content .center-header h2,
  .sm-main-content .fullsize-header h2,
  .sm-main-content .contents-header h1 {
    margin-top: 44px;
    font-size: 23px;
  }

  .sm-entry-content h3,
  .sm-main-content .contentitem .title,
  .sm-main-content .center-header p {
    margin-top: 32px;
    font-size: 19px;
  }

  .sm-sidebar {
    display: none;
  }

  .sm-main-content .compare-image-wrap,
  .sm-main-content .llghtbox-image-wrap,
  .sm-main-content .wrap-vertical-table-wrap dl {
    grid-template-columns: 1fr;
  }

  .sm-inline-cta {
    padding: 24px 18px;
  }

  .sm-inline-cta.is-final {
    padding: 32px 18px;
  }
}

/* Below 1024px, reuse the existing mobile header before the full PC header can wrap. */
@media (max-width: 1023px) {
  .sm-site-header { display: block !important; }

  .sm-site-header .sm-info-bar,
  .sm-site-header .sm-global-nav,
  .sm-site-header .sm-mega-menu-layer,
  .sm-site-header .sm-main-header__contact,
  .sm-site-header .sm-main-header__cta { display: none; }

  .sm-site-header .sm-main-header__inner {
    width: min(calc(100% - 48px), var(--sm-container));
    min-height: 64px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .sm-site-header .sm-main-header__logo a { max-width: 150px; font-size: 24px; line-height: 1.2; }
  .sm-site-header .sm-main-header__logo img { width: 150px; max-width: 100%; height: auto; }

  .sm-site-header .sm-main-header__mobile-actions {
    display: grid;
    grid-auto-flow: column;
    justify-self: end;
    align-items: center;
    gap: 8px;
  }

  .sm-site-header .sm-mobile-nav[hidden],
  .sm-site-header .sm-mobile-nav__overlay[hidden] { display: none !important; }

  body.sm-mobile-nav-open { overflow: hidden; }

  .sm-site-header .sm-mobile-nav {
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    height: calc(100dvh - 64px);
    overflow-y: auto;
    background: #fff;
    z-index: 80;
  }

  .sm-site-header .sm-mobile-nav__overlay {
    position: fixed;
    inset: 64px 0 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 70;
  }

  .sm-site-header .sm-mobile-nav__parent-row {
    display: block;
    min-height: 52px;
    border-bottom: 1px solid var(--sm-color-border-light);
  }

  .sm-site-header .sm-mobile-nav__toggle {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    font-size: 16px;
    font-weight: 700;
    text-align: left;
  }

  .sm-site-header .sm-mobile-nav__toggle {
    justify-content: flex-start;
    border: 0;
    background: transparent;
    color: var(--sm-color-primary);
    cursor: pointer;
  }

  .sm-site-header .sm-mobile-nav__toggle::before {
    order: 2;
    margin-left: auto;
  }

  .sm-site-header .sm-mobile-nav__children { padding: 12px 18px 18px; background: var(--sm-color-bg-soft); }
  .sm-site-header .sm-mobile-nav__children section + section { margin-top: 14px; }
  .sm-site-header .sm-mobile-nav__heading { margin: 14px 0 4px; color: var(--sm-color-primary); font-size: 13px; font-weight: 700; }
  .sm-site-header .sm-mobile-nav__children ul { margin: 0; padding: 0; list-style: none; }

  .sm-site-header .sm-mobile-nav__children li a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 9px 8px;
    border-bottom: 1px solid #e3e3e3;
    font-size: 14px;
  }
}

@media (max-width: 767px) {
  .sm-site-header .sm-main-header__inner { width: calc(100% - 36px); }
}
