/*
 * 2026-07-27: owner-approved mobile-only corrections.
 *
 * Strict scope:
 * - all layout corrections below are limited to phones up to 767px;
 * - the only global exception is the social-channel pictogram set.
 */

/* Approved exception for every viewport: real, consistent channel pictograms. */
.channel-dot {
  width: 24px !important;
  height: 24px !important;
  flex: 0 0 24px !important;
  display: block !important;
  overflow: hidden;
  border-radius: 6px !important;
  background-color: transparent !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: contain !important;
  box-shadow: none !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

.channel-dot::before,
.channel-dot::after {
  content: none !important;
  display: none !important;
}

.channel-telegram { background-image: url("../assets/icons/social-telegram.svg") !important; }
.channel-max { background-image: url("../assets/icons/social-max.svg") !important; }
.channel-zen { background-image: url("../assets/icons/social-dzen.svg") !important; }
.channel-youtube { background-image: url("../assets/icons/social-youtube.svg") !important; }
.channel-rutube { background-image: url("../assets/icons/social-rutube.svg") !important; }
.channel-vk { background-image: url("../assets/icons/social-vk-video.svg") !important; }

/* New phone-only assets are inert at tablet and desktop widths. */
.phone-revision-only {
  display: none !important;
}

@media (max-width: 767px) {
  /* One fixed icon column keeps both rows aligned regardless of label length. */
  .channel-grid a {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    justify-content: start;
    gap: 8px;
    padding-inline: 10px;
    text-align: left;
  }

  .channel-grid .channel-dot {
    justify-self: start;
  }

  .phone-legacy-copy {
    display: none !important;
  }

  .phone-revision-copy {
    display: inline !important;
  }

  /* Final service forms use the same brand gradient as the floating CTA. */
  .lead-form-submit,
  .lead-form-submit:hover,
  .lead-form-submit:focus-visible {
    background: linear-gradient(100deg, #3157ff 0%, #8d72ec 52%, #ff7f21 100%);
  }

  .lead-form-submit:hover {
    filter: saturate(1.08) brightness(1.04);
    box-shadow: 0 12px 24px rgba(84, 80, 222, .24);
  }

  /*
   * Legal checklists: one centred check inside one circle.
   * This replaces the conflicting two-pseudo-element construction.
   */
  .screen-05-content li,
  .check-method-card li,
  .check-conclusion li,
  .criteria-card li {
    position: relative;
  }

  .screen-05-content li {
    padding-left: 29px;
  }

  .check-method-card li {
    padding-left: 31px;
  }

  .check-conclusion li {
    padding-left: 34px;
  }

  .criteria-card li {
    padding-left: 42px;
  }

  .screen-05-content li::before,
  .check-method-card li::before,
  .check-conclusion li::before,
  .criteria-card li::before {
    content: "✓" !important;
    box-sizing: border-box;
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    width: 21px !important;
    height: 21px !important;
    margin: 0 !important;
    display: grid !important;
    place-items: center;
    border: 1.5px solid #57c759 !important;
    border-radius: 50% !important;
    background: rgba(87, 199, 89, .07) !important;
    color: #57c759 !important;
    font-size: 13px !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    text-align: center;
    box-shadow: none !important;
    transform: translateY(-50%) !important;
  }

  .screen-05-content li::after,
  .check-method-card li::after,
  .check-conclusion li::after,
  .criteria-card li::after {
    content: none !important;
    display: none !important;
  }

  /* Exchange: the result panel is typographic, without a decorative check. */
  body.exchange-page .exchange-screen-05 .exchange-result-summary {
    display: block;
    margin-top: 18px;
    padding: 18px 16px 20px;
  }

  body.exchange-page .exchange-screen-05 .exchange-result-summary > span {
    display: none !important;
  }

  body.exchange-page .exchange-screen-05 .exchange-result-summary.phone-revision-only {
    display: block !important;
  }

  body.exchange-page .exchange-screen-05 .exchange-result-summary h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: -.018em;
  }

  body.exchange-page .exchange-screen-05 .exchange-result-summary h2 span {
    display: block;
    white-space: nowrap;
  }

  body.exchange-page .exchange-screen-05 .exchange-result-summary p {
    margin-top: 15px;
    color: #f1f3ff;
    font-size: 16px;
    line-height: 1.38;
  }

  /* Exchange: restore the reference composition; the scheme belongs below the copy. */
  body.exchange-page .exchange-screen-09 {
    min-height: 0;
    display: block;
    padding: 34px 27px 42px;
    overflow: visible;
  }

  body.exchange-page .exchange-screen-09 h1 {
    position: relative;
    z-index: 1;
    margin: 0;
  }

  body.exchange-page .exchange-screen-09 strong {
    position: relative;
    z-index: 1;
    display: block;
    margin: 26px 0 18px;
  }

  body.exchange-page .exchange-screen-09 p {
    position: relative;
    z-index: 1;
  }

  body.exchange-page .exchange-screen-09 .exchange-complex-art {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    margin: 34px auto 0 !important;
    display: block;
    opacity: 1 !important;
    transform: none !important;
  }

  /* Apartment check: remove pictograms from the two typographic conclusions. */
  body.check-page .criteria-card > img.mobile-baseline-only,
  body.check-page .criteria-summary > img,
  body.check-page .advance-summary.mobile-baseline-only > img {
    display: none !important;
  }

  body.check-page .criteria-card {
    padding-top: 12px;
  }

  body.check-page .criteria-card li:first-child {
    border-top: 0;
  }

  body.check-page .criteria-summary,
  body.check-page .advance-summary.mobile-baseline-only {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 15px 14px;
  }

  body.check-page .criteria-summary p {
    font-size: clamp(15.5px, 4.25vw, 17px);
    line-height: 1.3;
    letter-spacing: -.02em;
  }

  body.check-page .criteria-summary p span,
  body.check-page .advance-summary p span {
    display: block;
  }

  body.check-page .advance-summary.mobile-baseline-only p {
    font-size: 12.5px;
    line-height: 1.32;
    letter-spacing: -.02em;
  }

  body.check-page .criteria-summary.phone-revision-only,
  body.check-page .advance-summary.phone-revision-only {
    display: grid !important;
  }

  body.check-page .criteria-summary.phone-revision-only {
    padding-inline: 10px;
  }

  body.check-page .advance-summary.phone-revision-only {
    padding-inline: 8px;
  }

  body.check-page .criteria-summary.phone-revision-only p {
    font-size: 15px;
    letter-spacing: -.03em;
  }

  /* Apartment check: use the cleaner service pictograms on phones only. */
  body.check-page .check-advance .advance-list img.phone-legacy-icon {
    display: none !important;
  }

  body.check-page .check-advance .advance-list img.phone-revision-only {
    display: block !important;
  }

  /*
   * Home page: phone-only typography alignment.
   * The insights title is the accepted reference for section headings.
   */
  body.relait-home .requests > h2,
  body.relait-home .work-section .work-intro > h2 {
    max-width: 345px;
    margin: 0 0 24px 7px;
    font-size: 38px;
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: 0;
  }

  body.relait-home .requests > h2::after,
  body.relait-home .work-section .work-intro > h2::after {
    content: "";
    display: block;
    width: 58px;
    height: 2px;
    margin-top: 20px;
    background: linear-gradient(90deg, var(--blue), var(--orange));
  }

  /* Service choices borrow the readable body size from the principles card. */
  body.relait-home .request-card b {
    font-size: 15px;
    line-height: 1.56;
    font-weight: 900;
  }

  /*
   * Complex deal: principle-sized title and copy, with a deliberately larger
   * answer. The illustration remains in its original phone-only position.
   */
  body.relait-home .complex-card {
    min-height: 0;
    padding: 22px 18px 20px;
  }

  body.relait-home .complex-card > div:first-child {
    position: relative;
    z-index: 2;
  }

  body.relait-home .complex-card h3.mobile-baseline-only {
    max-width: 220px;
    margin: 0 0 14px;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 900;
  }

  body.relait-home .complex-card strong {
    margin: 0;
    font-size: 58px;
    line-height: .95;
  }

  body.relait-home .complex-card p {
    max-width: none;
    margin-top: 50px;
    font-size: 15px;
    line-height: 1.56;
  }

  body.relait-home .complex-card .glass-shield {
    right: -4px;
    top: 28px;
    width: 144px;
    height: 152px;
  }

  /* The two editorial links are simple labels without drifting arrows. */
  body.relait-home .team-links a {
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
  }

  body.relait-home .team-links b {
    justify-self: center;
    text-align: center;
  }

  body.relait-home .team-links em {
    display: none !important;
  }

  /* Use the already shared lead-form component instead of the phone link. */
  body.relait-home .home-desktop-form {
    display: block !important;
    margin-top: 24px;
  }

  body.relait-home .home-mobile-cta {
    display: none !important;
  }

  /*
   * The featured video is intentionally composed differently from article
   * rows: title and description first, then one full-width video panel.
   */
  .insights-section .featured-insight {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "featured-copy"
      "featured-video";
    gap: 18px;
    align-items: stretch;
  }

  .insights-section .featured-insight .featured-copy {
    grid-area: featured-copy;
    width: 100%;
  }

  .insights-section .featured-insight > .video-thumb {
    grid-area: featured-video;
    width: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .insights-section .featured-insight .featured-copy h3 {
    margin-bottom: 8px;
  }

  .insights-section .featured-insight .featured-copy p {
    max-width: none;
  }
}
