/* Same article/sidebar proportions and navigation treatment as the formula guide.
 * Scoped overrides replace the various legacy pill menus only after enhancement. */
body .shp-seo-layout {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 720px) minmax(200px, 250px);
  justify-content: space-between;
  gap: 0 64px;
  width: calc(100% - 48px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 0 88px;
  align-items: start;
}
body .shp-seo-layout > .shp-seo-article {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  container-type: inline-size;
}
body .shp-app-guide__container:has(.shp-seo-layout) { max-width: 1180px !important; }
body .shp-about__body > .shp-seo-layout,
body .shp-app-guide__container article > .shp-seo-layout,
body .lp-guide-grid > .shp-seo-layout { width: 100%; }
body .shp-seo-layout .shp-seo-article > section > [class$="__container"],
body .shp-seo-layout .shp-seo-article > section > [class$="-container"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
body .shp-seo-layout .shp-seo-anchor { scroll-margin-top: 130px; }
/* Old full-width sections now live in an article column. Avoid squeezing
 * their text and feature cards into narrow side-by-side columns. */
@container (max-width: 760px) {
  .shp-seo-article [class*="__grid--2"],
  .shp-seo-article [class*="__grid--3"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  /* Four cards in a row become ~150px wide and break words; use two. */
  .shp-seo-article [class*="__grid--4"],
  .shp-seo-article .hp-about__proof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@container (max-width: 420px) {
  .shp-seo-article [class*="__grid--4"],
  .shp-seo-article .hp-about__proof-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
body .shp-seo-layout > nav.shp-seo-toc {
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: start !important;
  position: sticky !important;
  top: 24px !important;
  width: auto !important;
  max-width: 100% !important;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  margin: 0 !important;
  padding: 6px 0 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  z-index: 1 !important;
}
body .shp-seo-layout .shp-seo-toc .shp-seo-toc__title {
  margin: 0 0 10px !important;
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}
body .shp-seo-layout .shp-seo-toc ol {
  display: block !important;
  columns: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border-left: 1px solid #e2e8f0 !important;
  list-style: none !important;
}
body .shp-seo-layout .shp-seo-toc li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
body .shp-seo-layout .shp-seo-toc a {
  display: block !important;
  margin: 0 0 0 -1px !important;
  padding: 6px 0 6px 14px !important;
  border: 0 !important;
  border-left: 2px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #334155 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  text-decoration: none !important;
  white-space: normal !important;
  transform: none !important;
  transition: color .15s ease, border-color .15s ease;
}
body .shp-seo-layout .shp-seo-toc a:hover,
body .shp-seo-layout .shp-seo-toc a:focus-visible,
body .shp-seo-layout .shp-seo-toc a[aria-current="true"] {
  border-left-color: #2563eb !important;
  color: #2563eb !important;
}
body .shp-seo-layout .shp-seo-toc a:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
@media (max-width: 1080px) {
  body .shp-seo-layout {
    grid-template-columns: minmax(0, 1fr);
    max-width: 768px;
    padding-top: 40px;
  }
  body .shp-seo-layout > nav.shp-seo-toc {
    grid-column: 1 !important;
    position: static !important;
    max-height: none;
    overflow: visible;
    margin-bottom: 48px !important;
    padding: 18px 20px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
  }
  body .shp-seo-layout .shp-seo-toc ol {
    columns: 2 !important;
    column-gap: 24px;
    border-left: 0 !important;
  }
  body .shp-seo-layout .shp-seo-toc li { break-inside: avoid; }
  body .shp-seo-layout .shp-seo-toc a {
    margin-left: 0 !important;
    padding: 5px 0 !important;
    border-left: 0 !important;
  }
  body .shp-seo-layout > .shp-seo-article { grid-row: 2; }
}
@media (max-width: 640px) {
  body .shp-seo-layout { width: calc(100% - 32px); padding: 28px 0 64px; }
  body .shp-seo-layout > nav.shp-seo-toc { margin-bottom: 40px !important; padding: 14px 16px !important; }
  body .shp-seo-layout .shp-seo-toc ol { columns: 1 !important; }
}
@media print {
  body .shp-seo-layout { display: block; width: 100%; padding: 0; }
  body .shp-seo-layout > nav.shp-seo-toc { display: none !important; }
}
