/* ==========================================================================
   Parts Intelligence: Guide pages (page-pi-guide.php)
   Figma 763:19107 (YMME guide) and 763:19466 (app or native).

   The hero, article body (rail, section headers), table, checklist, steps,
   FAQ items and page cards are shared and live in pi-global.css. This file
   only holds the guide's own spacing and its paragraph, callout, note and
   links blocks.
   ========================================================================== */

/* ---- Hero (763:19109): the FAQ hero with a wider H1 and answer, and no
   search. 90px below the answer. ---- */
.pi-guide-hero { padding-bottom: 90px; }
.pi-guide-hero .pi-res-hero__headline { width: 1000px; }
.pi-guide-hero .pi-res-hero__lede { width: 860px; }
/* "Resources / Guides": both muted, "Guides" isn't the current page. */
.pi-guide-hero .pi-breadcrumb__list { color: var(--pi-text-muted); }
/* The rail's links as jump pills, only where the rail is hidden. */
.pi-guide-hero .pi-res-hero__jump { display: none; }

/* ---- Sections (763:19165): blocks start 24px under the 54px header ---- */
.pi-guide-section { scroll-margin-top: 120px; }
.pi-guide-blocks { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; margin-top: 24px; }
.pi-guide-blocks > .pi-data-table__frame,
.pi-guide-blocks > .pi-checklist { align-self: stretch; }
.pi-guide-blocks > .pi-steps { max-width: 780px; }

/* Paragraph (764:19630) */
/* A section with a UI panel beside its blocks (My Garage, Figma 932:19481):
   the copy column centered against the 380px panel, 40px apart. */
.pi-guide-split { display: flex; align-items: center; gap: 40px; margin-top: 24px; }
.pi-guide-split > .pi-guide-blocks { flex: 1 1 0; min-width: 0; margin-top: 0; }
.pi-guide-split__visual { flex: 0 0 380px; }
.pi-guide-split__visual .pi-ui-garage { width: 380px; }

/* The stat block (Figma 932:19556): one stat, 270px wide, beside its text. */
.pi-guide-blocks > .pi-guide-stat { align-self: stretch; align-items: center; gap: 56px; }
.pi-guide-stat__stat { flex: 0 0 270px; }
.pi-guide-stat__text { position: relative; z-index: 1; flex: 1 1 0; min-width: 0; margin: 0; font-family: var(--pi-font-body); font-size: 18px; line-height: 30px; color: var(--pi-text-subtitle); }

.pi-guide-paragraph { margin: 0; max-width: 780px; font-family: var(--pi-font-body); font-size: 18px; line-height: 30px; color: var(--pi-text-subtitle); }

/* Callout (765:19699): the "Results" box */
.pi-guide-callout { display: flex; flex-direction: column; gap: 10px; box-sizing: border-box; width: 100%; max-width: 780px; padding: 24px 28px; border-radius: 16px; background: var(--pi-bg-surface); border: 1px solid rgba(255,255,255,0.06); }
.pi-guide-callout__label { margin: 0; font-family: var(--pi-font-body); font-weight: 700; font-size: 12px; line-height: 16px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pi-text-muted); }
.pi-guide-callout__text { margin: 0; font-family: var(--pi-font-body); font-size: 18px; line-height: 30px; color: var(--pi-text-primary); }

/* Note (765:19531): the dated line under a table */
.pi-guide-note { margin: 0; max-width: 780px; font-family: var(--pi-font-body); font-size: 14px; line-height: 22px; color: var(--pi-text-muted); }
/* The preferred-source line at the end of a guide: the consent note's link style
   (pi-live-sessions.css), so it reads as a footnote. */
.pi-guide-source a { color: var(--pi-text-subtitle); text-decoration: underline; text-underline-offset: 2px; }

/* Links (764:20029): text links (components/text-link.php) in a row */
.pi-guide-links { display: flex; flex-wrap: wrap; gap: 16px 36px; }

/* ---- Phones and tablets (no 390 frames: the FAQ page's mobile) ---- */
@media (max-width: 1023.98px) {
  .pi-guide-hero { padding-bottom: 56px; }
  .pi-guide-hero .pi-res-hero__headline,
  .pi-guide-hero .pi-res-hero__lede { width: 100%; }
  .pi-guide-hero .pi-breadcrumb__list { justify-content: flex-start; }
  .pi-guide-hero .pi-res-hero__jump { display: flex; }

  /* The stacked body sizes its column to the content, and a table's
     720px scroll width would widen the page: fill the width instead, so
     the table scrolls inside its frame. */
  .pi-guide-body .pi-faqbody-groups { align-self: stretch; }
  .pi-guide-section { scroll-margin-top: 88px; }
  .pi-guide-blocks { gap: 20px; margin-top: 20px; }
  .pi-guide-split { flex-direction: column; align-items: stretch; gap: 24px; margin-top: 20px; }
  .pi-guide-split__visual { flex: none; display: flex; justify-content: center; }
  .pi-guide-split__visual .pi-ui-garage { width: 100%; max-width: 380px; }
  .pi-guide-blocks > .pi-guide-stat { flex-direction: column; align-items: flex-start; gap: 20px; padding: 32px 24px; }
  .pi-guide-stat__stat { flex: none; width: 100%; }
  .pi-guide-stat__text { font-size: var(--pi-m-body-size); line-height: var(--pi-m-body-line); }
  .pi-guide-paragraph, .pi-guide-callout__text { font-size: var(--pi-m-body-size); line-height: var(--pi-m-body-line); }
  .pi-guide-callout { padding: 20px 22px; }
  .pi-guide-links .pi-text-link { font-size: 13px; }
}

/* The My Garage panel beside a section (My Garage page) on phones and
   tablets: the same fixes the Platform hero's copy of the panel has
   (pi-platform.css). From 480 the vehicle lines wrap instead of cutting
   off; below 480 the Shopping badge drops under the active vehicle's
   lines, so "6.7L Cummins · Laramie" has the full width. */
@media (min-width: 480px) and (max-width: 1023.98px) {
  .pi-guide-split__visual .pi-ui-garage__vehicle-text strong,
  .pi-guide-split__visual .pi-ui-garage__vehicle-text em { white-space: normal; overflow: visible; text-overflow: clip; }
}
@media (max-width: 479.98px) {
  .pi-guide-split__visual .pi-ui-garage__vehicle.is-active { display: grid; grid-template-columns: 38px 1fr; column-gap: 12px; row-gap: 6px; }
  .pi-guide-split__visual .pi-ui-garage__vehicle.is-active .pi-ui-garage__vehicle-icon { grid-row: 1 / 3; }
  .pi-guide-split__visual .pi-ui-garage__vehicle.is-active .pi-ui-garage__vehicle-text { grid-column: 2; grid-row: 1; }
  .pi-guide-split__visual .pi-ui-garage__vehicle.is-active .pi-ui-garage__badge { grid-column: 2; grid-row: 2; justify-self: start; }
}
