/* ==========================================================================
   Foundation IP  (/products/design/design-ip/foundation-ip/)

   The Foundation IP family page, parent of Memory Compilers, Standard Cell,
   Interface IP and Low Power Foundation IP, built like the LVDS and
   Testability family pages. NO NEW COMPONENTS: .pf-def for the definition,
   .pf-cards for the four lines, and the shared .pf-parts / .pf-ptable for the
   line-by-line coverage table.

   Band rhythm is the homepage's: 48 / 64 / 80. Bands alternate white and
   --ps-color-neutral-2-100; --ps-color-neutral-2-000 is reserved for the
   conversion band. No two adjacent bands share a tint.

     §1  banner        white          §6  proof          neutral-2-100
     §2  what it is    neutral-2-100  §7  evaluate       neutral-2-000
     §3  four lines    white          §8  FAQ            white
     §4  coverage      neutral-2-100  §9  related        neutral-2-100
     §5  applications  white
   ========================================================================== */

/* --------------------------------------------------------------------------
   Section anchors - 96px clears the sticky header. The four cards are anchor
   targets too (.pf-card has its own scroll margin).
   -------------------------------------------------------------------------- */
#what-it-is,#lines,#coverage,#applications,#resources{scroll-margin-top:96px}

/* --------------------------------------------------------------------------
   §3 The four lines: two across from 640 (2 x 2) at every wider width, not
   three and an orphan; the nodes line may carry a link (Interface IP)
   -------------------------------------------------------------------------- */
@media (min-width:640px){
  .pf-cards__grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.pf-card__nodes a{color:var(--ps-color-brand-600);text-decoration:underline;text-underline-offset:2px}
.pf-card__nodes a:hover{color:var(--ps-color-brand-500)}

/* --------------------------------------------------------------------------
   §6 Proof: five figures (five across from 1024), then five resources, two
   across from 640 with the last taking its row, three across from 1024
   -------------------------------------------------------------------------- */
@media (min-width:1024px){
  .pf-facts{grid-template-columns:repeat(5,minmax(0,1fr))}
}
@media (min-width:640px){
  .fip-res__grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:640px) and (max-width:1023.98px){
  .fip-res__grid > .pf-res-card:last-child:nth-child(odd){grid-column:1 / -1}
}
@media (min-width:1024px){
  .fip-res__grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* --------------------------------------------------------------------------
   §9 Related: four tiles, two across from 640 and four from 1024
   -------------------------------------------------------------------------- */
@media (min-width:640px) and (max-width:1023.98px){
  .pf-related__list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:1024px){
  .pf-related__list{grid-template-columns:repeat(4,minmax(0,1fr))}
}

/* phones: the large button can be wider than a 375px column; let it wrap */
@media (max-width:639.98px){
  .page-banner__ctas .ps-btn--large{max-width:100%}
  .page-banner__ctas .ps-btn--large .ps-btn__text{white-space:normal;min-width:0}
}
/* the closing band's button sits beside a text link; let it wrap at every width */
.section-headings__ctas .ps-btn--large{max-width:100%}
.section-headings__ctas .ps-btn--large .ps-btn__text{white-space:normal;min-width:0}

/* --------------------------------------------------------------------------
   §8 FAQ - sits on white, below the conversion band
   -------------------------------------------------------------------------- */
.faq{background:var(--sv-white)}

/* --------------------------------------------------------------------------
   Band run for this page
   -------------------------------------------------------------------------- */
.pf-def,.pf-parts,.pf-res,.pf-related{
  background:var(--ps-color-neutral-2-100);
  border-block:1px solid var(--ps-color-neutral-2-300);
}
/* stated explicitly rather than left transparent */
.pf-cards,.pf-applist{background:var(--sv-white)}
/* the conversion band takes the tint the site reserves for it site-wide */
.section-headings__wrapper--cta{background:var(--ps-color-neutral-2-000)}

/* Foundation IP round, 2026-09-28 (FOUNDATION-IP-C02, C03): the "What Silvaco
   Foundation IP is" band (§2) is held, which would leave the white banner
   above the white four-lines band. While it is absent the run shifts one
   band, so no two neighbours share a tint: banner white, four lines
   neutral-2-100, coverage white, applications neutral-2-100, proof white,
   then the closing band, FAQ and Related as before. Switch §2 back on and the
   original run applies unchanged. */
body:not(:has(#what-it-is)) .pf-cards,
body:not(:has(#what-it-is)) .pf-applist{
  background:var(--ps-color-neutral-2-100);
  border-block:1px solid var(--ps-color-neutral-2-300);
}
body:not(:has(#what-it-is)) .pf-parts,
body:not(:has(#what-it-is)) .pf-res{background:var(--sv-white);border-block:0}
