/* Rechecked against the client's mobile instructions and supplied CTA image.
   Keep this file mobile-only so the approved desktop composition is preserved. */
@media (max-width: 760px) {
  /* Let the labels set a minimum card width, with room on both sides.
     The old 99px cards also overlapped their grid tracks on narrow screens. */
  body main .hero > .container.hero-features {
    width: min(calc(100vw - 20px), 354px) !important;
    grid-template-columns: minmax(max-content, 1fr) 7px minmax(max-content, 1fr) 7px minmax(max-content, 1fr) !important;
    gap: 0 !important;
  }

  body main .hero .feature-card {
    width: auto !important;
    padding-inline: 7px !important;
  }

  body main .hero .feature-cross,
  body main .hero .feature-cross::before,
  body main .hero .feature-cross::after {
    width: 100% !important;
  }

  body main .hero .feature-card:last-child h2 {
    white-space: nowrap !important;
  }

  /* Keep the complete product label beside the number, including clones. */
  body main section.cases-section .case-card .case-type.type-product {
    max-width: calc(100% - 64px) !important;
    padding-inline: 3px !important;
    white-space: normal !important;
    word-break: keep-all !important;
  }

  body main section.cases-section .case-card .case-type.type-product::before {
    flex-shrink: 0;
  }

  /* Two rows leave room inside each tag while preserving the 10px labels.
     Grow the stage as well so the taller cards clear the pagination dots. */
  body main section.cases-section .case-shell {
    height: 390px !important;
  }

  body main section.cases-section .case-track {
    height: 340px !important;
  }

  body main section.cases-section .case-card .tag-row {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  body main section.cases-section .case-card .tag-row span {
    flex-shrink: 0 !important;
    padding-inline: 6px !important;
    gap: 3px !important;
  }

  body main section.cases-section .case-card .tag-row span::before {
    width: 10px !important;
    height: 10px !important;
  }

  /* Match the spacing used above Flow and FAQ at these two boundaries. */
  body main section.strengths-section,
  body main section.cases-section {
    padding-top: 64px !important;
  }

  /* Issues use the same font family as desktop, including nested accents. */
  body main section.issues-section .heading-small,
  body main section.issues-section .section-heading h2,
  body main section.issues-section .section-heading h2 .wall-word,
  body main section.issues-section .issue-card:nth-child(n) .number,
  body main section.issues-section .issue-card:nth-child(n) h3,
  body main section.issues-section .issue-bottom p,
  body main section.issues-section .issue-bottom p strong,
  body main section.issues-section .issue-bottom h3,
  body main section.issues-section .issue-bottom h3 span {
    font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif !important;
  }

  body main section.issues-section .section-heading h2 .wall-word {
    color: #dc3f4d !important;
    -webkit-text-fill-color: #dc3f4d !important;
  }

  /* With the supporting paragraph removed, center the heading beside the
     numbered illustration and let the rail follow the shorter cards. */
  body main section.issues-section .issue-grid {
    min-height: 0 !important;
    padding-bottom: 14px !important;
  }

  body main section.issues-section .issue-card:nth-child(n) {
    display: grid !important;
    grid-template-columns: 74px minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    gap: 0 10px !important;
    align-items: center !important;
    height: auto !important;
    min-height: 160px !important;
    padding: 14px !important;
  }

  body main section.issues-section .issue-card:nth-child(n) .number {
    top: 12px !important;
    left: 14px !important;
  }

  body main section.issues-section .issue-card:nth-child(n) .sketch-img {
    grid-column: auto !important;
    grid-row: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: 12px !important;
    left: 4px !important;
    width: 84px !important;
    height: 92px !important;
    max-height: none !important;
    margin: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
  }

  body main section.issues-section .issue-card:nth-child(n) > div {
    position: static !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  body main section.issues-section .issue-card:nth-child(n) h3 {
    font-size: 18px !important;
    line-height: 1.55 !important;
    letter-spacing: 0 !important;
  }

  body main section.issues-section .issue-card:nth-child(n) h3::after {
    display: none !important;
  }

  body main section.issues-section .issue-bottom p {
    font-size: clamp(15px, 4.1vw, 16px) !important;
    letter-spacing: 0.035em !important;
  }

  body main section.issues-section .issue-bottom p strong {
    font-size: inherit !important;
  }

  body main section.issues-section .issue-bottom h3,
  body main section.issues-section .issue-bottom h3 span {
    font-weight: 900 !important;
  }

  body main section.issues-section .issue-bottom h3 {
    letter-spacing: 0.04em !important;
  }

  /* "Black text on one line" refers to the supporting paragraph, not the
     blue heading. Use the full card width for that paragraph. */
  body main section.strengths-section .strength-card.strength-one,
  body main section.strengths-section .strength-card.strength-two,
  body main section.strengths-section .strength-card.strength-three {
    display: grid !important;
    grid-template-columns: 52px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    align-content: center !important;
    align-items: center !important;
    gap: 14px 10px !important;
    width: calc(100% - 32px) !important;
    height: auto !important;
    min-height: 140px !important;
    padding: 18px 16px !important;
    overflow: visible !important;
  }

  body main section.strengths-section .strength-card .strength-num {
    position: static !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 52px !important;
    height: 42px !important;
    margin: 0 !important;
  }

  body main section.strengths-section .strength-card > div {
    display: contents !important;
  }

  body main section.strengths-section .strength-card h3 {
    position: static !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: auto !important;
    margin: 0 !important;
    font-size: clamp(14px, 4.1vw, 16px) !important;
    line-height: 1.6 !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
    word-break: normal !important;
    text-wrap: pretty !important;
  }

  body main section.strengths-section .strength-card h3 br:not(.br-sp) {
    display: initial !important;
  }

  body main section.strengths-section .strength-card p {
    position: static !important;
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    margin: 0 !important;
    padding-top: 12px !important;
    border-top: 2px dotted #a4d9e9 !important;
    font-size: clamp(11px, 3.4vw, 12.5px) !important;
    line-height: 1.7 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
  }

  body main section.strengths-section .strength-card p br,
  body main section.strengths-section .strength-card::before {
    display: none !important;
  }

  /* Match the existing Flow heading's font and gradient precisely. */
  body main section.cases-section .section-heading h2,
  body main section.faq-section .section-heading h2 {
    font-family: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", "MS Mincho", serif !important;
    background: linear-gradient(100deg, #0050bd 0%, #006ed2 58%, #19b7bd 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
  }

  body main section.cases-section .section-heading h2 .case-fan-word {
    -webkit-text-fill-color: transparent !important;
  }

  body main section.faq-section .faq-question-text {
    color: #0a68cc !important;
    background: linear-gradient(90deg, #0a68cc 0, #22aec6 70px) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
  }

  body main section.faq-section .faq-item > p {
    color: #172238 !important;
    /* The dotted divider is painted at this paragraph's top. Give the text
       16px below it and 16px below the final line, including the card's 4px. */
    padding-top: 16px !important;
    padding-bottom: 12px !important;
    padding-inline: 0 !important;
    margin-bottom: 0 !important;
  }

  body main section.faq-section .faq-answer-phrase {
    display: inline-block;
    max-width: 100%;
  }

  /* Center the question row as a unit, including wrapped questions. The old
     top-aligned grid and fixed icon offsets ignored the row's minimum height. */
  body main section.faq-section .faq-item {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
  }

  body main section.faq-section .faq-item button,
  body main section.faq-section .faq-item:not(.is-open) button {
    align-items: center !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  body main section.faq-section .faq-item button > span {
    align-self: center !important;
  }

  body main section.faq-section .faq-item button i {
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  /* A border chevron occupies half of its rotated square; compensate for
     that half so the visible stroke shares the other icons' center line. */
  body main section.faq-section .faq-item button::after {
    top: calc(50% + 4px) !important;
    margin-top: 0 !important;
    transform: translateY(-50%) rotate(-45deg) !important;
  }

  body main section.faq-section .faq-item:not(.is-open) button::after {
    top: calc(50% - 4px) !important;
    transform: translateY(-50%) rotate(135deg) !important;
  }

  /* The supplied CTA reference centers the intro and both headline lines.
     Remove the previous icon column and its compensating paragraph width. */
  body main section.contact-section .contact-copy h2 .contact-punctuation {
    display: none !important;
  }

  body main section.contact-section > .container.container.contact-panel {
    display: block !important;
    width: calc(100% - 30px) !important;
    padding: 32px 20px 30px !important;
    margin-inline: auto !important;
  }

  body main section.contact-section .contact-copy {
    width: 100% !important;
    margin: 0 !important;
  }

  body main section.contact-section .contact-copy p.contact-intro {
    width: 100% !important;
    margin: 0 0 18px !important;
    font-size: clamp(12px, 3.55vw, 14px) !important;
    line-height: 1.7 !important;
    text-align: center !important;
  }

  body main section.contact-section .contact-copy h2 {
    width: 100% !important;
    font-size: clamp(25px, 7.5vw, 31px) !important;
    line-height: 1.65 !important;
  }

  body main section.contact-section .contact-copy h2 .contact-leading,
  body main section.contact-section .contact-copy h2 .contact-phrase {
    width: 100% !important;
    margin: 0 !important;
    font-size: inherit !important;
    line-height: inherit !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
  }
}

/* The illustration leaves 104px for Flow text at a 320px viewport.
   Scale the headings only at the narrowest widths so they stay on one line. */
@media (max-width: 343px) {
  body main section.flow-section .flow-card h3 {
    font-size: clamp(13px, calc(12.5vw - 27px), 16px) !important;
  }
}
