/* ==========================================================
   ARCADIA v7_17 — STANDALONE PAGE MOBILE POLISH
   Baseline: v7_16T full deployable.
   Purpose: harmonize Heart Intake and Hardware Path standalone pages
   with accepted homepage mobile behavior while preserving desktop
   formatting, true-source assets, colors, Worker/D1, Approval Queue,
   Operational Continuity, and no-autonomous-public-action boundaries.
   ========================================================== */

/* Exact page-title anchors land with breathing room on desktop and mobile. */
#heart-intake-page,
#hardware-path-page,
#heart-intake-form,
#hardware-sales-gate {
  scroll-margin-top: 112px;
}

.standalone-path-page .product-hero .hero-grid {
  align-items: start;
}

.standalone-path-page .product-hero .contact-card {
  align-self: stretch;
}

.standalone-path-page .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1.1rem;
}

.standalone-path-page .page-note-card {
  margin-top: 1rem;
}

/* Descender-safe text blocks near luminous cards/forms. */
.standalone-path-page .line-stack,
.standalone-path-page .line-stack span,
.standalone-path-page h1,
.standalone-path-page h2,
.standalone-path-page .hero-sub,
.standalone-path-page .section-intro {
  line-height: 1.22;
  padding-bottom: .08em;
  overflow: visible;
}

.standalone-path-page .form-wrap > h2.line-stack,
.standalone-path-page .form-wrap > .section-intro {
  margin-bottom: 1rem;
}

@media (max-width: 900px) {
  .standalone-path-page .two-col,
  .standalone-path-page .hero-grid,
  .standalone-path-page .product-hero .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
    align-items: stretch !important;
  }

  .standalone-path-page .product-hero.section {
    padding-top: clamp(1.25rem, 4.5vw, 2rem) !important;
  }

  .standalone-path-page .contact-card,
  .standalone-path-page .luminous-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .standalone-path-page .hero-actions .button {
    flex: 1 1 220px;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 820px) {
  #heart-intake-page,
  #hardware-path-page,
  #heart-intake-form,
  #hardware-sales-gate {
    scroll-margin-top: 82px !important;
  }

  .standalone-path-page .site-header .wrap.header-inner,
  .standalone-path-page .header-inner {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
  }

  .standalone-path-page main {
    overflow-x: hidden;
  }

  .standalone-path-page .product-hero .contact-card {
    order: 2;
  }

  .standalone-path-page .product-hero .hero-grid > div:first-child {
    order: 1;
  }

  .standalone-path-page .form-grid.two {
    grid-template-columns: 1fr !important;
  }

  .standalone-path-page .intake-form,
  .standalone-path-page .safety-box,
  .standalone-path-page .review-output {
    padding: clamp(1rem, 4.5vw, 1.35rem) !important;
  }
}

@media (max-width: 520px) {
  #heart-intake-page,
  #hardware-path-page,
  #heart-intake-form,
  #hardware-sales-gate {
    scroll-margin-top: 76px !important;
  }

  .standalone-path-page .product-hero.section,
  .standalone-path-page .section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .standalone-path-page .wrap {
    width: min(100% - 1rem, var(--wrap, 1120px)) !important;
  }

  .standalone-path-page h1 {
    font-size: clamp(2.05rem, 10vw, 3.05rem) !important;
  }

  .standalone-path-page h2 {
    font-size: clamp(1.75rem, 8.4vw, 2.45rem) !important;
  }

  .standalone-path-page .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .standalone-path-page .hero-actions .button,
  .standalone-path-page .form-actions .button {
    width: 100%;
  }
}
