
/* APIS Lab v6.38 — section-head alignment system
   Labels sit on their own row; supporting copy starts exactly with the heading. */

/* Wrapped heads: flatten only on desktop so the support column can share the heading row. */
@media(min-width:901px){
  .v624-section-head:has(>div:first-child + p),
  .v624-section-head:has(>div:first-child + a.text-link),
  .section6-head:has(>div:first-child + p),
  .section6-head:has(>div:first-child + a),
  .international6-head:has(>div:first-child + p),
  .labx-head:has(>div:first-child + p),
  .intel-block-head:has(>div:first-child + p),
  .v5-head:has(>div:first-child + p),
  .case6-two:has(>div:first-child + p){
    display:grid!important;
    grid-template-rows:auto auto!important;
    row-gap:16px!important;
    align-items:start!important;
  }

  .v624-section-head:has(>div:first-child + p),
  .v624-section-head:has(>div:first-child + a.text-link){grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr)!important;column-gap:54px!important}
  .section6-head:has(>div:first-child + p),
  .section6-head:has(>div:first-child + a){grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr)!important;column-gap:50px!important}
  .international6-head:has(>div:first-child + p){grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr)!important;column-gap:44px!important}
  .labx-head:has(>div:first-child + p){grid-template-columns:minmax(0,1.1fr) minmax(300px,.9fr)!important;column-gap:40px!important}
  .intel-block-head:has(>div:first-child + p){grid-template-columns:minmax(0,1fr) minmax(280px,.8fr)!important;column-gap:50px!important}
  .v5-head:has(>div:first-child + p){grid-template-columns:minmax(0,1.08fr) minmax(300px,.92fr)!important;column-gap:60px!important}
  .case6-two:has(>div:first-child + p){grid-template-columns:minmax(0,1fr) minmax(300px,1fr)!important;column-gap:90px!important}

  .v624-section-head:has(>div:first-child + p)>div:first-child,
  .v624-section-head:has(>div:first-child + a.text-link)>div:first-child,
  .section6-head:has(>div:first-child + p)>div:first-child,
  .section6-head:has(>div:first-child + a)>div:first-child,
  .international6-head:has(>div:first-child + p)>div:first-child,
  .labx-head:has(>div:first-child + p)>div:first-child,
  .intel-block-head:has(>div:first-child + p)>div:first-child,
  .v5-head:has(>div:first-child + p)>div:first-child,
  .case6-two:has(>div:first-child + p)>div:first-child{
    display:contents!important;
  }

  /* Label row */
  .v624-section-head:has(>div:first-child + p)>div:first-child>span:first-child,
  .v624-section-head:has(>div:first-child + a.text-link)>div:first-child>span:first-child,
  .section6-head:has(>div:first-child + p)>div:first-child>span:first-child,
  .section6-head:has(>div:first-child + a)>div:first-child>span:first-child,
  .international6-head:has(>div:first-child + p)>div:first-child>span:first-child,
  .labx-head:has(>div:first-child + p)>div:first-child>span:first-child,
  .intel-block-head:has(>div:first-child + p)>div:first-child>span:first-child,
  .v5-head:has(>div:first-child + p)>div:first-child>span:first-child,
  .case6-two:has(>div:first-child + p)>div:first-child>span:first-child{
    grid-column:1!important;grid-row:1!important;
    display:block!important;margin:0!important;align-self:end!important;
  }

  /* Heading row */
  .v624-section-head:has(>div:first-child + p)>div:first-child>:is(h2,h3),
  .v624-section-head:has(>div:first-child + a.text-link)>div:first-child>:is(h2,h3),
  .section6-head:has(>div:first-child + p)>div:first-child>:is(h2,h3),
  .section6-head:has(>div:first-child + a)>div:first-child>:is(h2,h3),
  .international6-head:has(>div:first-child + p)>div:first-child>:is(h2,h3),
  .labx-head:has(>div:first-child + p)>div:first-child>:is(h2,h3),
  .intel-block-head:has(>div:first-child + p)>div:first-child>:is(h2,h3),
  .v5-head:has(>div:first-child + p)>div:first-child>:is(h2,h3),
  .case6-two:has(>div:first-child + p)>div:first-child>:is(h2,h3){
    grid-column:1!important;grid-row:2!important;
    margin:0!important;align-self:start!important;
  }

  /* Support copy/link sits on the exact top edge of the heading. */
  .v624-section-head:has(>div:first-child + p)>p,
  .v624-section-head:has(>div:first-child + a.text-link)>a.text-link,
  .section6-head:has(>div:first-child + p)>p,
  .section6-head:has(>div:first-child + a)>a,
  .international6-head:has(>div:first-child + p)>p,
  .labx-head:has(>div:first-child + p)>p,
  .intel-block-head:has(>div:first-child + p)>p,
  .v5-head:has(>div:first-child + p)>p,
  .case6-two:has(>div:first-child + p)>p{
    grid-column:2!important;grid-row:2!important;
    margin:0!important;padding:0!important;align-self:start!important;
  }

  /* Direct label + heading + support patterns. */
  .v624-section-head:has(>.v6-label:first-child + h2 + p),
  .decision6-intro:has(>.v6-label:first-child + h2 + p),
  .home-intl-bridge-head:has(>.v6-label:first-child + h2 + p){
    display:grid!important;
    grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr)!important;
    grid-template-rows:auto auto!important;
    column-gap:54px!important;row-gap:16px!important;align-items:start!important;
  }
  .v624-section-head:has(>.v6-label:first-child + h2 + p)>.v6-label,
  .decision6-intro:has(>.v6-label:first-child + h2 + p)>.v6-label,
  .home-intl-bridge-head:has(>.v6-label:first-child + h2 + p)>.v6-label{
    grid-column:1!important;grid-row:1!important;margin:0!important;display:block!important;
  }
  .v624-section-head:has(>.v6-label:first-child + h2 + p)>h2,
  .decision6-intro:has(>.v6-label:first-child + h2 + p)>h2,
  .home-intl-bridge-head:has(>.v6-label:first-child + h2 + p)>h2{
    grid-column:1!important;grid-row:2!important;margin:0!important;align-self:start!important;
  }
  .v624-section-head:has(>.v6-label:first-child + h2 + p)>p,
  .decision6-intro:has(>.v6-label:first-child + h2 + p)>p,
  .home-intl-bridge-head:has(>.v6-label:first-child + h2 + p)>p{
    grid-column:2!important;grid-row:2!important;margin:0!important;padding:0!important;align-self:start!important;
  }

  /* Other two-column explanation blocks: account for the label row explicitly. */
  .tools-ethic>div:nth-child(2),
  .tool-explain-grid>div:nth-child(2){margin-top:30px!important;align-self:start!important}
}

/* Consistent visible gap between a section name and its title everywhere. */
:where(.v624-section-head,.section6-head,.international6-head,.labx-head,.intel-block-head,.v5-head,.case6-two,.decision6-intro,.home-intl-bridge-head)
  :where(.v6-label,.v5-kicker){line-height:1.25!important}

@media(max-width:900px){
  /* Mobile/tablet returns to natural flow. */
  .v624-section-head,.section6-head,.international6-head,.labx-head,.intel-block-head,.v5-head,.case6-two,
  .decision6-intro,.home-intl-bridge-head{
    grid-template-columns:1fr!important;grid-template-rows:auto!important;gap:0!important;display:grid!important;
  }
  .v624-section-head>div:first-child,.section6-head>div:first-child,.international6-head>div:first-child,.labx-head>div:first-child,
  .intel-block-head>div:first-child,.v5-head>div:first-child,.case6-two>div:first-child{display:block!important}
  .v624-section-head :where(.v6-label,.v5-kicker),.section6-head :where(.v6-label,.v5-kicker),.international6-head :where(.v6-label,.v5-kicker),
  .labx-head :where(.v6-label,.v5-kicker),.intel-block-head :where(.v6-label,.v5-kicker),.v5-head :where(.v6-label,.v5-kicker),
  .case6-two :where(.v6-label,.v5-kicker),.decision6-intro>.v6-label,.home-intl-bridge-head>.v6-label{display:block!important;margin:0 0 14px!important}
  .v624-section-head :is(h2,h3),.section6-head :is(h2,h3),.international6-head :is(h2,h3),.labx-head :is(h2,h3),
  .intel-block-head :is(h2,h3),.v5-head :is(h2,h3),.case6-two :is(h2,h3),.decision6-intro>h2,.home-intl-bridge-head>h2{margin:0!important}
  .v624-section-head>p,.section6-head>p,.international6-head>p,.labx-head>p,.intel-block-head>p,.v5-head>p,.case6-two>p,
  .decision6-intro>p,.home-intl-bridge-head>p{grid-column:1!important;grid-row:auto!important;margin:22px 0 0!important;padding:0!important;align-self:start!important}
  .v624-section-head>a.text-link,.section6-head>a{grid-column:1!important;grid-row:auto!important;margin-top:22px!important}
}
