/* v13 — mobile layout repair and a more composed, image-led hero */

.p13-site .p10-hero {
  background:
    radial-gradient(circle at 82% 8%, rgba(205, 232, 236, 0.68), transparent 28rem),
    radial-gradient(circle at 12% 32%, rgba(240, 218, 214, 0.32), transparent 23rem),
    linear-gradient(180deg, #f5f8f7 0%, #fbfbfa 72%, #fff 100%);
}

.p13-site .p10-hero-stage {
  border-color: rgba(16, 35, 49, 0.12);
  background: #f8f9f7;
  box-shadow:
    0 2.7rem 7.5rem rgba(16, 35, 49, 0.13),
    0 0.35rem 1rem rgba(16, 35, 49, 0.04);
}

.p13-site .p10-hero-copy h1 .p13-hero-line {
  display: block;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
}

.p13-site .p10-hero-visual img {
  filter: saturate(1.06) contrast(1.035);
}

@media (max-width: 980px) {
  /* v8 is loaded after the original responsive rules. Reset its desktop grid here. */
  .p13-site .p6-section-head {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 1.15rem;
  }

  .p13-site .p6-section-head > div,
  .p13-site .p6-section-head > p {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .p13-site .p6-section-head h2 {
    width: 100%;
    max-width: none;
    writing-mode: horizontal-tb;
    word-break: normal;
    overflow-wrap: break-word;
    text-wrap: wrap;
  }

  .p13-site .p10-hero-stage {
    overflow: hidden;
    border: 1px solid rgba(16, 35, 49, 0.11);
    border-radius: 2rem;
    background:
      radial-gradient(circle at 95% 0%, rgba(218, 238, 241, 0.82), transparent 21rem),
      #fbfbfa;
    box-shadow:
      0 2rem 5rem rgba(16, 35, 49, 0.12),
      0 0.25rem 0.8rem rgba(16, 35, 49, 0.04);
  }

  .p13-site .p10-hero-copy {
    max-width: none;
    padding: clamp(2.4rem, 7vw, 4rem);
  }

  .p13-site .p10-hero-visual {
    aspect-ratio: 16 / 9;
    margin-top: 0;
    border: 0;
    border-top: 1px solid rgba(16, 35, 49, 0.09);
    border-radius: 0;
    background: #dcecef;
    box-shadow: none;
  }

  .p13-site .p10-hero-visual.is-visible {
    clip-path: inset(0) !important;
  }

  .p13-site .p10-hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .p13-site .p7-start-feature > div {
    min-width: 0;
  }

  .p13-site .p7-start-feature > div > span {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    line-height: 1.55;
  }
}

@media (max-width: 720px) {
  .p13-site .p10-hero {
    padding: 6.3rem 0 3.5rem;
  }

  .p13-site .p10-hero-stage {
    border-radius: 1.45rem;
  }

  .p13-site .p10-hero-copy {
    padding: 1.8rem 1.35rem 1.55rem;
  }

  .p13-site .p10-hero-copy h1 {
    margin-top: 1rem;
    font-size: clamp(2.05rem, 9.2vw, 2.75rem);
    letter-spacing: -0.055em;
    line-height: 1.08;
  }

  .p13-site .p10-hero-copy h1 small {
    margin-bottom: 0.65rem;
    font-size: 0.28em;
    letter-spacing: 0.08em;
  }

  .p13-site .p10-hero-copy h1 .p13-hero-line + .p13-hero-line {
    margin-top: 0.08em;
  }

  .p13-site .p10-hero-copy > p:last-of-type {
    margin-top: 1.2rem;
  }

  .p13-site .p10-hero-visual {
    aspect-ratio: 4 / 3;
  }

  .p13-site .p10-hero-visual img {
    object-position: 59% center;
  }

  .p13-site .p6-section-head {
    display: block;
  }

  .p13-site .p6-section-head h2 {
    margin-top: 0.8rem;
    font-size: clamp(1.72rem, 8.15vw, 2.08rem);
    letter-spacing: -0.035em;
    line-height: 1.36;
  }

  .p13-site .p6-section-head > p {
    margin-top: 0.9rem;
    font-size: 0.88rem;
    line-height: 1.85;
  }

  .p13-site .p7-start-layout {
    gap: 3.4rem;
  }

  .p13-site .p7-start-feature {
    overflow: hidden;
    border: 1px solid rgba(16, 35, 49, 0.1);
    border-radius: 1.25rem;
    background: #f8faf9;
    box-shadow: 0 1.15rem 3rem rgba(16, 35, 49, 0.08);
  }

  .p13-site .p7-start-feature figure {
    border-radius: 0;
  }

  .p13-site .p7-start-feature > div {
    padding: 1.25rem 1.2rem 1.45rem;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
  }

  .p13-site .p7-start-feature h3 {
    width: 100%;
    max-width: none;
    font-size: 1.42rem;
    line-height: 1.48;
  }

  .p13-site .p7-start-feature > div > span {
    width: auto;
    max-width: 100%;
    margin: 1rem 0 0.15rem;
    white-space: nowrap;
  }

  /* The long-form roadmap must never crop or bleed artwork on iPhone. */
  .p8-guide-site .p7-guide-cover,
  .p8-guide-site .p7-guide-inline-image,
  .p8-guide-site .p7-guide-chapter:nth-child(even) .p7-guide-inline-image {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    aspect-ratio: auto;
    margin-right: 0;
    margin-left: 0;
    overflow: hidden;
    transform: none !important;
  }

  .p8-guide-site .p7-guide-cover img,
  .p8-guide-site .p7-guide-inline-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
  }

  .p8-guide-site .p7-guide-cover[data-motion-card]::after {
    display: none;
  }

  .p8-guide-site .p7-pauu-callout {
    min-width: 0;
    padding: 1rem;
    grid-template-columns: 4.8rem minmax(0, 1fr);
    gap: 0.8rem;
    overflow: hidden;
  }

  .p8-guide-site .p7-pauu-callout img {
    width: 100%;
    max-width: 4.8rem;
    margin: 0;
    align-self: end;
  }

  .p8-guide-site .p7-guide-next {
    min-width: 0;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    overflow: hidden;
  }

  .p8-guide-site .p7-guide-next > img {
    width: 100%;
    height: auto;
    align-self: end;
  }

  /* On phones, each chapter is a reading sheet—not a scaled-down desktop card. */
  .p8-guide-site .p7-guide-layout {
    width: min(calc(100% - 24px), 42rem);
    padding-top: 2.75rem;
    gap: 1.6rem;
  }

  .p8-guide-site .p7-guide-body {
    width: 100%;
    min-width: 0;
    gap: 1.35rem;
  }

  .p8-guide-site .p7-guide-chapter[data-chapter] {
    width: 100%;
    min-width: 0;
    padding: 1.25rem;
    overflow: hidden;
    border-radius: 1.25rem 0.4rem 1.25rem 0.4rem;
  }

  .p8-guide-site .p7-guide-chapter + .p7-guide-chapter {
    padding-top: 1.25rem;
  }

  .p8-guide-site .p7-guide-chapter[data-chapter]::after {
    display: none;
  }

  .p8-guide-site .p7-guide-chapter h2 {
    max-width: none;
    margin-top: 0.7rem;
    font-size: clamp(1.48rem, 6.8vw, 1.75rem);
    letter-spacing: -0.025em;
    line-height: 1.45;
  }

  .p8-guide-site .p7-guide-chapter h2 br {
    display: none;
  }

  .p8-guide-site .p7-guide-chapter > p {
    max-width: none;
    font-size: 0.94rem;
    line-height: 1.95;
  }

  /* Chapter 1 becomes one continuous vertical route on iPhone. */
  .p8-guide-site .p7-guide-flow {
    position: relative;
    margin-top: 1.55rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.65rem;
  }

  .p8-guide-site .p7-guide-flow::before {
    position: absolute;
    top: 1.1rem;
    bottom: 1.1rem;
    left: 1.78rem;
    width: 1px;
    background: rgba(215, 95, 85, 0.3);
    content: "";
  }

  .p8-guide-site .p7-guide-flow > div {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0.9rem 1rem;
    display: grid;
    grid-template-columns: 1.65rem minmax(0, 1fr);
    align-items: center;
    align-content: initial;
    gap: 0.75rem;
    border-radius: 0.85rem;
  }

  .p8-guide-site .p7-guide-flow span {
    width: 1.65rem;
    height: 1.65rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(215, 95, 85, 0.4);
    border-radius: 50%;
    background: #fff;
    font-size: 0.58rem;
    line-height: 1;
  }

  .p8-guide-site .p7-guide-flow b {
    min-width: 0;
    font-size: 0.86rem;
    line-height: 1.65;
  }

  .p8-guide-site .p7-guide-flow > i {
    display: none;
  }

  .p8-guide-site .p7-pauu-callout {
    width: 100%;
    grid-template-columns: 4rem minmax(0, 1fr);
    gap: 0.75rem;
  }

  .p8-guide-site .p7-pauu-callout img {
    max-width: 4rem;
    align-self: start;
  }

  .p8-guide-site .p7-pauu-callout > p,
  .p8-guide-site .p7-guide-actions > li > div,
  .p8-guide-site .p7-guide-post-list article > * {
    min-width: 0;
  }

  .p8-guide-site .p7-pauu-callout b {
    font-size: 0.9rem;
    line-height: 1.7;
  }

  .p8-guide-site .p7-pauu-callout span {
    font-size: 0.77rem;
    line-height: 1.8;
  }

  .p8-guide-site .p7-guide-cover img,
  .p8-guide-site .p7-guide-inline-image img,
  .p8-guide-site .p7-pauu-callout img {
    display: block;
  }

  .p8-guide-site .p7-guide-table-wrap,
  .p8-guide-site .p7-formula,
  .p8-guide-site .p7-guide-finish,
  .p8-guide-site .p7-guide-result {
    max-width: 100%;
    min-width: 0;
  }
}
