/* Product entries for Home section 5 and the AFH Technology product section (Riley, 2026-10-29). The heading and the
   introduction are centred above the pair of entries. Each entry has no card container: the product name with a small
   Explore button at the right edge of the visual (Riley, 2026-11-03; below the visual from 2026-11-02), the feature
   tags, then the visual. The button's accessible name includes the product. The CodePulse visual is the
   CodePulse hero workspace in its compact form; the AFH-LR visual has a frame of the same height around the placed and
   routed layout, with its processing stages where they fit beside the board.
   The markup comes from tools/product_visuals.py; components/codepulse-hero.js plays the CodePulse workspace and
   components/product-cards.js the AFH-LR layout. */
@layer pages {
  :is(.ix-home-products,.ix-tech-products) .ix-product-entries{display:grid;grid-template-columns:minmax(0,var(--ix-product-entry-width));justify-content:center;
    margin-top:clamp(40px,4.5vw,64px);}
  /* A lead-in line (AFH Technology) spans the entries and starts at the left edge of the first visual. */
  .ix-product-entries>.ix-copy{grid-column:1/-1;margin:0 0 var(--ix-space-5);text-align:left;color:var(--ix-t-body);}
  .ix-product-entry{--ix-entry-visual:404px;display:grid;grid-template-rows:auto auto auto;min-width:0;text-align:left;}
  .ix-product-entry+.ix-product-entry{margin-top:var(--ix-space-7);}
  .ix-product-entry__head{display:flex;align-items:center;justify-content:space-between;gap:var(--ix-space-4);}
  body .ix-product-entry h3.ix-heading{margin:0;font-size:1.75rem;line-height:1.2;letter-spacing:-.01em;font-weight:500;color:var(--ix-t-title);}
  .ix-product-entry__action{flex:none;display:inline-flex;align-items:center;min-height:32px;margin:0;padding:6px 12px;font-size:.875rem;
    line-height:1.2;text-decoration:none;}
  .ix-product-entry__tags{margin:var(--ix-space-2) 0 0;font:400 .875rem/1.5 var(--ix-mono);color:var(--ix-t-meta);}
  /* A tag stays whole; the line breaks only between tags. */
  .ix-product-entry__tags span{white-space:nowrap;}
  .ix-product-entry .ix-pv-slot{height:var(--ix-entry-visual);margin:var(--ix-space-5) 0 0;}
  /* The outer width of the entries, which the closing card below them and the Home Q&A share. */
  :is(.ix-home-round,.ix-technology-round) main{--ix-product-row:var(--ix-product-entry-width);}
  @media(min-width:1000px){
    :is(.ix-home-round,.ix-technology-round) main{--ix-product-row:var(--ix-container);}
  }
  /* Side by side, both entries share their rows, so the visuals align when the tags wrap in one entry. Below 1000 px
     the entries stack, so the CodePulse workspace keeps room for its code lines. */
  @media(min-width:1000px){
    :is(.ix-home-products,.ix-tech-products) .ix-product-entries{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--ix-product-entry-gap);}
    .ix-product-entry{grid-row:span 3;grid-template-rows:subgrid;}
    .ix-product-entry+.ix-product-entry{margin-top:0;}
  }
  /* The visual areas. The CodePulse workspace shows its stage alone at the hero's type size (codepulse-hero.css); in the
     code it shows the key-scan function, whose lines the cursor writes, and the build result. The AFH-LR frame has the
     same height and surface. */
  .ix-cpx-entry{container:cpx-host / inline-size;height:var(--ix-entry-visual);margin:var(--ix-space-5) 0 0;}
  .ix-cpx-entry .ix-cpx{display:flex;flex-direction:column;height:100%;max-width:none;}
  .ix-cpx-entry .ix-cpx-stage{flex:1;padding:16px 16px 14px;}
  .ix-cpx-entry .ix-cpx-head{margin-bottom:12px;}
  .ix-cpx-entry .ix-cpx-scene{flex:1;height:auto;}
  .ix-cpx-entry .ix-cpx-ln:nth-child(-n+7 of .ix-cpx-ln){display:none;}
  /* The hardware check keeps its five pins and the question in the card's height. */
  .ix-cpx-entry .ix-cpx-check{gap:10px;}
  .ix-cpx-entry .ix-cpx-pin{height:30px;}
  .ix-cpx-entry .ix-cpx-opt{min-height:34px;}
  .ix-cpx-entry .ix-cpx-ask p{margin-bottom:2px;}
  .ix-product-entry .ix-pv{padding:0;}
  .ix-product-entry .ix-pv-lr{padding:12px 20px;background:#0b1117;border:1px solid rgba(214,228,240,.13);
    box-shadow:inset 0 1px rgba(236,244,250,.05),0 12px 28px rgba(0,0,0,.32);}
  /* The stages join the board where both fit in the frame; the board then leaves 210 px for the stages, the gap and
     the frame padding. */
  @container ix-pv (width >= 460px){
    .ix-product-entry .ix-pv-stages{display:block;}
    .ix-product-entry .ix-pv-boardwrap{width:min(calc((100cqh - 24px) * 446 / 345),calc(100cqw - 210px),var(--board-max));}
  }

  /* Slot heights follow the window continuously instead of in steps. */
  .ix-pv-slot{position:relative;flex:0 0 clamp(188px,10vw + 90px,290px);margin:auto calc(var(--ix-space-6) * -1) 0;container:ix-pv / size;}
  @media(max-width:860px){.ix-pv-slot{margin-right:calc(var(--ix-space-5) * -1);margin-left:calc(var(--ix-space-5) * -1);}}

  /* --fs sets the type size of the whole composition; wide cards use larger tiers (below), so the visual fills the card. */
  .ix-pv{--fs:14px;--board-max:340px;--pv-ease:cubic-bezier(.2,.7,.2,1);position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
    gap:32px;padding:12px 10px;font:400 var(--fs)/1.4 var(--ix-sans);color:var(--ix-t-body);letter-spacing:-.006em;}

  /* Wide cards: larger tiers. Each tier keeps the context, gap and result inside the slot. */
  @container ix-pv (width >= 700px) and (height >= 240px){.ix-pv{--fs:15px;--board-max:420px;}}
  @container ix-pv (width >= 800px) and (height >= 280px){.ix-pv{--fs:16px;--board-max:500px;}}

  /* ---------- AFH-LR ---------- */
  .ix-pv-group{display:contents;}
  .ix-pv-stages{flex:none;display:none;margin:0;padding:0;list-style:none;}
  .ix-pv-stages li{display:grid;grid-template-columns:calc(var(--fs) * 1.7) minmax(0,1fr);align-items:center;height:calc(var(--fs) * 2.3);color:#7e909c;white-space:nowrap;}
  .ix-pv-stages li::before{content:"";width:11px;height:11px;border:1.5px solid #4a5d6b;border-radius:50%;box-sizing:border-box;}
  .ix-pv-stages li[data-state="run"]{color:#eef3f6;}
  .ix-pv-stages li[data-state="run"]::before{border-color:rgba(69,183,246,.3);border-top-color:var(--ix-ui-blue);animation:ix-pv-spin .8s linear infinite;}
  .ix-pv-stages li[data-state="done"]{color:#a9b7c1;}
  .ix-pv-stages li[data-state="done"]::before{width:5px;height:10px;margin-left:3px;border:solid var(--ix-ui-green);border-width:0 1.6px 1.6px 0;border-radius:0;transform:rotate(45deg) translate(-1px,-2px);}
  /* The board takes the slot height. The stages join only where they fit beside a full-size board. */
  /* The card layout's viewBox is 44.6 x 34.5 mm: the board and a 2 mm margin. */
  .ix-pv-boardwrap{flex:none;width:min(calc((100cqh - 24px) * 446 / 345),calc(100cqw - 20px),var(--board-max));aspect-ratio:446/345;}
  .ix-pv-board{display:block;width:100%;height:100%;overflow:visible;}
  /* Each band's width threshold leaves room for the stages beside the largest board in that band. */
  @container ix-pv ((height < 200px) and (width >= 480px)) or ((height < 230px) and (width >= 520px))
    or ((height < 262px) and (width >= 565px)) or (width >= 576px){.ix-pv-stages{display:block;}}

  @keyframes ix-pv-spin{to{transform:rotate(360deg);}}
}
