/* ==========================================================================
   Low Power Foundation IP  (/products/design/design-ip/foundation-ip/low-power/)

   The last Foundation IP child page, built like SRAM Compiler. NO NEW
   COMPONENTS: .pf-cap for the capabilities, the shared .pf-parts / .pf-ptable
   twice (the savings, as two small tables, and the named libraries).

   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  capabilities  neutral-2-100  §7  evaluate       neutral-2-000
     §3  savings       white          §8  FAQ            white
     §4  applications  neutral-2-100  §9  related        neutral-2-100
     §5  libraries     white
   ========================================================================== */

/* --------------------------------------------------------------------------
   Section anchors - 96px clears the sticky header
   -------------------------------------------------------------------------- */
#capabilities,#savings,#applications,#libraries,#resources{scroll-margin-top:96px}

/* --------------------------------------------------------------------------
   §2 Capabilities: four blocks, two across from 640 (2 x 2) at every wider
   width, not three and an orphan
   -------------------------------------------------------------------------- */
@media (min-width:640px){
  .pf-cap__grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* the lead links to the two pages that own the selectors */
.pf-cap__lead a{color:var(--ps-color-brand-600);text-decoration:underline;text-underline-offset:2px}
.pf-cap__lead a:hover{color:var(--ps-color-brand-500)}

/* --------------------------------------------------------------------------
   §3 Savings: two small tables, each captioned, the second spaced from the
   first; row headers set like the parts table's foundry cell. Two across from
   1024, where each is narrow enough to sit beside the other
   -------------------------------------------------------------------------- */
/* two columns need none of the shared table's 600px minimum */
.lpf-table{min-width:0}
/* and their row and column heads may wrap, so a phone never scrolls them */
.lpf-table th,.lpf-table thead th{white-space:normal}
.lpf-table__caption{
  caption-side:top;text-align:left;padding:16px 16px 4px;
  font:500 16px/24px var(--ps-font);color:var(--ps-color-neutral-3-500);
}
.lpf-table th[scope="row"]{text-align:left}
.lpf-table__gap{margin-top:32px}
@media (min-width:1024px){
  #savings .pf-parts__wrap{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:32px;align-items:start}
  #savings .lpf-table__gap{margin-top:0}
  #savings .pf-parts__footnote{grid-column:1 / -1}
}

/* --------------------------------------------------------------------------
   §5 Libraries: short cells that should not break
   -------------------------------------------------------------------------- */
.lpf-libs__table td:nth-child(3),
.lpf-libs__table td:nth-child(6){white-space:nowrap}

/* --------------------------------------------------------------------------
   §6 Proof: five figures (five across from 1024), the last linking VarMan
   XMA, then three 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))}
}
.pf-fact__what a{color:var(--ps-color-brand-600);text-decoration:underline;text-underline-offset:2px}
.pf-fact__what a:hover{color:var(--ps-color-brand-500)}
@media (min-width:640px){
  .lpf-res__grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:640px) and (max-width:1023.98px){
  .lpf-res__grid > .pf-res-card:last-child:nth-child(odd){grid-column:1 / -1}
}
@media (min-width:1024px){
  .lpf-res__grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* --------------------------------------------------------------------------
   §9 Related: three tiles, two across from 640 with the last taking its row,
   three from 1024
   -------------------------------------------------------------------------- */
@media (min-width:640px) and (max-width:1023.98px){
  .pf-related__list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pf-related__list > li:last-child:nth-child(odd){grid-column:1 / -1}
}
@media (min-width:1024px){
  .pf-related__list{grid-template-columns:repeat(3,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-cap,.pf-applist,.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-parts{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)}

/* Low Power Foundation IP round, 2026-09-28.
   LOWPOWER-04 adds a fifth capabilities card: from 640 the odd last card
   takes its row. */
@media (min-width:640px){
  .pf-cap__grid > .pf-cap-block:last-child:nth-child(odd){grid-column:1 / -1}
}
/* LOWPOWER-05, -07: the SRAM table and the libraries move into Proof, after
   the figures and before the resource cards, with room between the blocks */
.pf-res .lpf-proof__modes{margin-bottom:40px}
.pf-res .lpf-libs__head{margin-bottom:24px}
.pf-res .lpf-libs__head + .pf-parts__wrap{margin-bottom:40px}
/* the savings and libraries bands are gone, so applications would sit tinted
   against tinted capabilities: while #savings is absent it runs white.
   Banner white, capabilities neutral-2-100, applications white, proof
   neutral-2-100, then the closing band, FAQ and Related as before. */
body:not(:has(section#savings)) .pf-applist{background:var(--sv-white);border-block:0}
/* LOWPOWER-08 moves the Design IP hub into a fourth Related tile: four in one
   row from 1024 (three would leave one alone) */
@media (min-width:1024px){
  .pf-related__list:has(> li:nth-child(4)){grid-template-columns:repeat(4,minmax(0,1fr))}
}
