/* V27 phone refinements. Desktop layouts remain unchanged. */
body.home-page .home-phone-profile-cards{
  display:none!important;
}

.home-in-brief-phone-break{
  display:none;
}

/* The phone-only break marker must not remove the normal desktop separator. */
.home-in-brief-phone-break+.home-in-brief-link{
  margin-left:12px;
  padding-left:12px;
}

.home-in-brief-phone-break+.home-in-brief-link::before{
  content:"";
  position:absolute;
  left:0;
  top:50%;
  width:1px;
  height:8px;
  background:rgba(156,119,39,.58);
  transform:translateY(-50%);
}

@media (max-width:760px){
  /* Give every primary page hero the same visible gold lower boundary. */
  body.home-page .compact-hero,
  body:not(.home-page) .subhero,
  body.portfolio-page .portfolio-hero-refresh,
  body.page-404 .error-hero{
    box-sizing:border-box!important;
    border-bottom:2px solid #d8a52c!important;
    box-shadow:inset 0 -1px 0 rgba(255,218,126,.66)!important;
  }

  /* Narrow the Portfolio metric-card group itself and keep it centered.
     Internal typography and alignment are intentionally unchanged. */
  body.portfolio-page .portfolio-metrics-copy{
    width:min(calc(100% - 54px),360px)!important;
    max-width:none!important;
    margin-right:auto!important;
    margin-left:auto!important;
  }

  body.portfolio-page .portfolio-metrics-copy .compact-metric{
    box-sizing:border-box!important;
    width:100%!important;
  }

  /* Case-study competencies: separators were independent flex items and
     could wrap onto a line by themselves. Use deliberate phone rows instead. */
  body.portfolio-page .portfolio-competency-highlight p{
    display:grid!important;
    grid-template-columns:1fr!important;
    align-items:start!important;
    gap:3px!important;
  }

  body.portfolio-page .portfolio-competency-item{
    display:block!important;
  }

  body.portfolio-page .portfolio-competency-separator{
    display:none!important;
  }

  /* Restore the approved profile cards beneath In Brief on phones only. */
  body.home-page .home-phone-profile-cards{
    display:block!important;
  }

  body.home-page .home-phone-profile-heading{
    margin:0 auto 16px!important;
    text-align:center!important;
  }

  body.home-page .home-phone-profile-heading p{
    margin:0 0 2px!important;
    color:#a66f12!important;
    font-size:.63rem!important;
    font-weight:800!important;
    line-height:1.2!important;
    letter-spacing:.19em!important;
    text-transform:uppercase!important;
  }

  body.home-page .home-phone-profile-heading h2{
    margin:0!important;
    color:#071b3d!important;
    font-family:"Source Serif 4",Georgia,serif!important;
    font-size:1.45rem!important;
    font-weight:700!important;
    line-height:1.15!important;
  }

  /* Increase the directory's usable phone width without changing its type. */
  body.home-page .home-in-brief-sheet{
    padding:31px 14px 34px!important;
  }

  /* Create explicit phone line breaks without shared grid columns. Each line
     therefore uses only its natural link widths and retains even spacing. */
  body.home-page .home-in-brief-row--intro{
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    justify-content:start!important;
  }

  body.home-page .home-in-brief-group--snapshot{
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    justify-content:start!important;
  }

  body.home-page .home-in-brief-group--snapshot .home-in-brief-topic{
    flex:0 0 100%!important;
  }

  body.home-page .home-in-brief-group--snapshot .home-in-brief-row--primary,
  body.home-page .home-in-brief-group--snapshot .home-in-brief-row--secondary{
    display:contents!important;
  }

  body.home-page .home-in-brief-phone-break{
    display:block!important;
    flex:0 0 100%!important;
    width:100%!important;
    height:3px!important;
  }

  /* Education, Credentials, and Clients begin new phone rows. */
  body.home-page .home-in-brief-phone-break+.home-in-brief-link{
    margin-left:0!important;
    padding-left:0!important;
  }

  body.home-page .home-in-brief-phone-break+.home-in-brief-link::before{
    content:none!important;
    display:none!important;
  }

  /* Experience follows Credentials on line two, but lives in the second
     desktop row in the source, so recreate only that one separator on phone. */
  body.home-page .home-in-brief-row--secondary .home-in-brief-link:first-child{
    margin-left:9px!important;
    padding-left:9px!important;
  }

  body.home-page .home-in-brief-row--secondary .home-in-brief-link:first-child::before{
    content:""!important;
    display:block!important;
    position:absolute!important;
    left:0!important;
    top:50%!important;
    width:1px!important;
    height:7px!important;
    background:rgba(156,119,39,.58)!important;
    transform:translateY(-50%)!important;
  }
}
