/*
 * PopCo Atmos 1.4
 * Mobile editorial composition rebuilt from the approved visual reference.
 * This file is intentionally loaded last to retire conflicting legacy rules.
 */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.header-v2__topics {
  display: none;
}

.home-support-card-v2__shade {
  display: none;
}

.header-v2__search-button svg,
.search-field__icon {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

/* Retire the original CSS-drawn magnifier when older base CSS is cached. */
.header-v2__search-button::before,
.header-v2__search-button::after {
  content: none !important;
  display: none !important;
}

@media (max-width: 820px) {
  body {
    overflow-x: hidden;
  }

  .site-header-v2 {
    background: #011920;
    box-shadow: none;
  }

  .header-v2__primary {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    height: 64px;
    padding: 0 14px;
  }

  .header-v2__menu {
    align-items: center;
    display: flex;
    grid-column: 1;
    height: 48px;
    justify-content: flex-start;
    padding: 0;
    width: 48px;
  }

  .header-v2__menu b {
    display: none;
  }

  .header-v2__menu-mark {
    display: grid;
    gap: 6px;
    transform: none !important;
    width: 27px;
  }

  .header-v2__menu i {
    background: #fff;
    border-radius: 999px;
    height: 2px;
    opacity: 1;
    transform: none !important;
    width: 27px;
  }

  .header-v2__logo {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    max-width: min(46vw, 180px);
  }

  .header-v2__logo.atmos-custom-logo img {
    height: 42px;
    max-width: min(46vw, 180px);
    width: auto;
  }

  .header-v2__logo.brand {
    font-size: 34px;
    line-height: 0.72;
  }

  .header-v2__logo.brand small {
    font-size: 7px;
    letter-spacing: 0.22em;
    margin-top: 9px;
  }

  .header-v2__actions {
    align-items: center;
    display: flex;
    grid-column: 3;
    grid-row: 1;
    justify-content: flex-end;
    min-width: 52px;
  }

  .header-v2__actions .edition-switcher,
  .header-v2__account,
  .header-v2__search {
    display: none;
  }

  .header-v2__search-button {
    align-items: center;
    background: transparent;
    border: 0;
    color: #fff;
    display: flex;
    height: 48px;
    justify-content: flex-end;
    padding: 0;
    width: 48px;
  }

  .header-v2__search-button > span,
  .header-v2__search-button > span::after {
    display: none !important;
  }

  .header-v2__search-button svg {
    display: block;
    height: 30px;
    pointer-events: none;
    width: 30px;
  }

  .header-v2__topics {
    background: #011920;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: block;
  }

  .header-v2__topics > div {
    align-items: center;
    display: flex;
    gap: 30px;
    min-height: 44px;
    overflow-x: auto;
    padding: 0 16px;
    scrollbar-width: none;
    white-space: nowrap;
  }

  .header-v2__topics > div::-webkit-scrollbar {
    display: none;
  }

  .header-v2__topics-menu {
    align-items: center;
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .header-v2__topics a {
    color: #fff;
    display: block;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-decoration: none;
  }

  .header-v2__nav.atmos-section-nav {
    background: #fff;
    box-shadow: 0 9px 24px rgba(1, 25, 32, 0.1);
  }

  .header-v2__nav.atmos-section-nav > div {
    gap: 12px;
    min-height: 64px;
    padding: 10px 14px;
  }

  .header-v2__nav .atmos-section-menu {
    gap: 12px;
  }

  .header-v2__nav a {
    background: #f0f1ef;
    border-radius: 10px;
    color: #22282a;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    padding: 14px 18px;
  }

  .header-v2__nav .header-v2__home-link,
  .header-v2__nav .current-menu-item > a {
    background: #ffc928;
    color: #011920;
  }

  /* Reserved ad area follows the same rhythm as the reference. */
  .masthead-ad-shell {
    background: #fff;
    padding: 22px 0 28px;
  }

  .masthead-ad {
    background: repeating-linear-gradient(135deg, #fff 0, #fff 5px, #e3e4e2 5px, #e3e4e2 7px);
    border-radius: 0;
    margin: 0 auto;
    max-width: 286px;
    min-height: 90px;
    overflow: hidden;
    width: calc(100% - 104px);
  }

  .masthead-ad-placeholder,
  .masthead-adsense,
  .masthead-ad .adsbygoogle {
    background: transparent;
    min-height: 90px;
    width: 100%;
  }

  .masthead-ad-placeholder span {
    display: none;
  }

  /* First fold: one visual language for the lead and every support story. */
  .home-lead-v2 {
    padding: 28px 14px 52px;
  }

  .home-lead-v2 > .home-section-title {
    display: none;
  }

  .home-lead-grid-v2 {
    display: grid;
    gap: 28px;
    grid-template-columns: 1fr;
  }

  .home-lead-main-v2,
  .home-support-card-v2 {
    aspect-ratio: 1.29 / 1;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 10px 26px rgba(1, 25, 32, 0.09);
    min-height: 0;
    overflow: hidden;
    padding: 0;
    position: relative;
    width: 100%;
  }

  .home-lead-main-v2 > a,
  .home-support-card-v2 > a {
    color: #fff;
    display: block;
    height: 100%;
    position: relative;
    text-decoration: none;
    width: 100%;
  }

  .home-lead-main-v2 img,
  .home-support-card-v2 img {
    aspect-ratio: auto;
    border-radius: 0;
    display: block;
    height: 100%;
    inset: 0;
    object-fit: cover;
    position: absolute;
    transform: scale(1.001);
    width: 100%;
  }

  .home-lead-main-v2__shade,
  .home-support-card-v2__shade {
    background: linear-gradient(0deg, rgba(1, 13, 17, 0.96) 0%, rgba(1, 13, 17, 0.7) 25%, rgba(1, 13, 17, 0.08) 62%, transparent 78%);
    display: block;
    inset: 0;
    position: absolute;
    z-index: 1;
  }

  .home-lead-main-v2__copy,
  .home-support-card-v2__copy {
    bottom: 0;
    color: #fff;
    left: 0;
    padding: 22px;
    position: absolute;
    right: 0;
    z-index: 2;
  }

  .home-lead-main-v2__copy p,
  .home-support-card-v2__copy p {
    background: #ffc928;
    border-radius: 6px;
    color: #011920;
    display: inline-flex;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0;
    line-height: 1.1;
    margin: 0 0 11px;
    max-width: 100%;
    padding: 7px 9px;
    text-transform: none;
  }

  .home-lead-main-v2__copy h2,
  .home-support-card-v2__copy h2 {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    color: #fff;
    display: -webkit-box;
    font-size: clamp(24px, 7vw, 30px);
    font-weight: 750;
    letter-spacing: -0.035em;
    line-height: 1.08;
    margin: 0;
    max-width: 21ch;
    overflow: hidden;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.34);
  }

  .home-lead-main-v2__copy > span,
  .home-support-card-v2__copy > span,
  .home-support-card-v2 div > span {
    color: rgba(255, 255, 255, 0.76);
    display: block;
    font-size: 10px;
    margin-top: 9px;
  }

  .home-lead-support-v2 {
    display: grid;
    gap: 28px;
    grid-template-columns: 1fr;
  }

  /* Search never changes page scale on iPhone. */
  .search-panel-v2,
  .search-panel-v2 * {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  .search-panel-v2 {
    inset: 0 !important;
    position: fixed !important;
    top: 0 !important;
  }

  .search-panel-v2__dialog {
    border-radius: 0 0 22px 22px;
    margin: 0;
    max-height: min(540px, 88vh);
    max-width: none;
    overflow-y: auto;
    padding: max(22px, env(safe-area-inset-top)) 18px 24px;
    transform: translate3d(0, -20px, 0);
    width: 100%;
  }

  .search-panel-v2.is-visible .search-panel-v2__dialog {
    transform: translate3d(0, 0, 0);
  }

  .search-panel-v2__dialog h2 {
    font-size: 28px;
    line-height: 1.02;
    max-width: 13ch;
  }

  .search-panel-v2 .search-panel-v2__close {
    flex-basis: 42px;
    height: 42px;
    min-height: 42px;
    min-width: 42px;
    width: 42px;
  }

  .search-panel-v2 .search-field > div {
    align-items: center;
    display: grid;
    gap: 7px;
    grid-template-columns: 24px minmax(0, 1fr);
    padding: 7px;
  }

  .search-field__icon {
    color: #607276;
    display: block;
    height: 21px !important;
    margin-left: 5px;
    min-height: 21px;
    min-width: 21px;
    width: 21px !important;
  }

  .search-panel-v2 input[type="search"] {
    appearance: none;
    font-size: 16px !important;
    height: 48px;
    min-height: 48px;
    transform: none !important;
  }

  .search-panel-v2 .search-field button[type="submit"] {
    font-size: 14px;
    grid-column: 1 / -1;
    min-height: 48px;
    transform: none !important;
    width: 100%;
  }

  .search-panel-v2__dialog > p {
    font-size: 12px;
    line-height: 1.45;
  }
}

@media (max-width: 420px) {
  .header-v2__topics > div,
  .header-v2__topics-menu {
    gap: 26px;
  }

  .header-v2__nav.atmos-section-nav > div,
  .header-v2__nav .atmos-section-menu {
    gap: 10px;
  }

  .header-v2__nav a {
    padding: 14px 16px;
  }

  .home-lead-main-v2__copy,
  .home-support-card-v2__copy {
    padding: 19px;
  }

  .home-lead-main-v2__copy h2,
  .home-support-card-v2__copy h2 {
    font-size: clamp(22px, 6.7vw, 28px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-lead-main-v2 img,
  .home-support-card-v2 img {
    transform: none !important;
  }
}
