/* Portfolio readability and responsive layout repair. Scoped to this page. */
body:has(.portfolio-hero-grid){overflow-x:clip}
body:has(.portfolio-hero-grid) .portfolio-hero{min-height:0!important;padding:clamp(110px,11vw,148px) 0 clamp(60px,7vw,90px)!important;overflow:hidden!important}
body:has(.portfolio-hero-grid) .portfolio-hero-grid{display:grid!important;grid-template-columns:minmax(0,1.4fr) minmax(280px,.6fr)!important;align-items:center!important;gap:clamp(28px,4vw,64px)!important}
body:has(.portfolio-hero-grid) .portfolio-hero-grid>div{min-width:0!important}
body:has(.portfolio-hero-grid) .portfolio-title{font-size:clamp(2.7rem,5.2vw,5rem)!important;line-height:1.09!important;letter-spacing:-.055em!important;max-width:850px!important;margin:18px 0 24px!important;overflow-wrap:normal!important;word-break:normal!important;text-wrap:balance!important}
body:has(.portfolio-hero-grid) .portfolio-intro{font-size:clamp(1rem,1.35vw,1.15rem)!important;line-height:1.7!important}
body:has(.portfolio-hero-grid) .portfolio-note{min-width:0!important;padding:28px!important;transform:none!important;border-radius:20px!important}
body:has(.portfolio-hero-grid) .portfolio-note::before,body:has(.portfolio-hero-grid) .portfolio-note::after{display:none!important;content:none!important}
body:has(.portfolio-hero-grid) .portfolio-note b{display:block!important;font-size:clamp(1.4rem,2vw,2rem)!important;line-height:1.25!important;margin-bottom:16px!important}
body:has(.portfolio-hero-grid) .portfolio-note span{display:block!important;font-size:.95rem!important;line-height:1.7!important}
body:has(.portfolio-hero-grid) .page-index{position:sticky!important;top:74px!important;z-index:30!important;padding:9px 0!important}
body:has(.portfolio-hero-grid) .page-index>.wrap{display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:8px!important}
body:has(.portfolio-hero-grid) .page-index a{display:inline-flex!important;align-items:center!important;min-height:38px!important;padding:8px 12px!important;border:1px solid #dce6e8!important;border-radius:99px!important;font-size:.78rem!important;text-decoration:none!important}
body:has(.portfolio-hero-grid) .portfolio-section{padding:clamp(50px,6vw,78px) 0!important}
body:has(.portfolio-hero-grid) .portfolio-section .wb-title{font-size:clamp(2rem,3.6vw,3.45rem)!important;line-height:1.15!important;letter-spacing:-.045em!important;margin:12px 0 22px!important}
body:has(.portfolio-hero-grid) .metric-grid{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:12px!important}
body:has(.portfolio-hero-grid) .metric-grid .metric{min-width:0!important;min-height:145px!important;padding:20px 16px!important}
body:has(.portfolio-hero-grid) .metric-grid .metric strong{font-size:clamp(1.55rem,2.25vw,2.5rem)!important;line-height:1.15!important;overflow-wrap:anywhere!important}
body:has(.portfolio-hero-grid) .metric-grid .metric span{font-size:.82rem!important;line-height:1.55!important}
body:has(.portfolio-hero-grid) .executive-map-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important}
body:has(.portfolio-hero-grid) .executive-map-grid article{min-width:0!important;min-height:0!important;padding:24px!important;transform:none!important}
body:has(.portfolio-hero-grid) .executive-map-grid h3{margin:14px 0 9px!important;line-height:1.3!important}
body:has(.portfolio-hero-grid) .executive-map-grid p{font-size:.94rem!important;line-height:1.65!important}
body:has(.portfolio-hero-grid) .executive-map-flow{display:flex!important;flex-wrap:wrap!important;justify-content:center!important;align-items:center!important;gap:12px!important;padding:18px!important}
body:has(.portfolio-hero-grid) .case-journey{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}
body:has(.portfolio-hero-grid) .case-journey article{min-width:0!important;min-height:0!important;padding:23px!important;transform:none!important}
body:has(.portfolio-hero-grid) .case-journey h3{line-height:1.3!important}
body:has(.portfolio-hero-grid) .case-journey p,body:has(.portfolio-hero-grid) .case-lead{font-size:.97rem!important;line-height:1.75!important}
body:has(.portfolio-hero-grid) .arch-flow{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,.8fr) minmax(0,1fr)!important;gap:15px!important;align-items:stretch!important}
body:has(.portfolio-hero-grid) .arch-flow>*{min-width:0!important}
body:has(.portfolio-hero-grid) .arch-system{padding:20px!important}
body:has(.portfolio-hero-grid) .arch-system h3{line-height:1.3!important}
body:has(.portfolio-hero-grid) .flow-steps{min-width:0!important}
body:has(.portfolio-hero-grid) .flow-steps div{overflow-wrap:break-word!important}
body:has(.portfolio-hero-grid) .evidence-row{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important;padding:20px!important}
body:has(.portfolio-hero-grid) .evidence-row>div{min-width:0!important}
body:has(.portfolio-hero-grid) .evidence-row strong{overflow-wrap:anywhere!important}
body:has(.portfolio-hero-grid) .gov-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}
body:has(.portfolio-hero-grid) .gov{min-width:0!important;min-height:0!important;transform:none!important}
body:has(.portfolio-hero-grid) .portfolio-principle{padding:42px 0!important}
body:has(.portfolio-hero-grid) .portfolio-section[id]{scroll-margin-top:150px!important}
@media(max-width:950px){body:has(.portfolio-hero-grid) .portfolio-hero-grid{grid-template-columns:1fr!important}body:has(.portfolio-hero-grid) .portfolio-note{max-width:720px!important}body:has(.portfolio-hero-grid) .metric-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}body:has(.portfolio-hero-grid) .executive-map-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}body:has(.portfolio-hero-grid) .arch-flow{grid-template-columns:1fr!important}}
@media(max-width:640px){body:has(.portfolio-hero-grid) .portfolio-hero{padding:100px 0 48px!important}body:has(.portfolio-hero-grid) .portfolio-title{font-size:clamp(2.3rem,9.4vw,3.25rem)!important;line-height:1.13!important}body:has(.portfolio-hero-grid) .portfolio-note{padding:21px!important}body:has(.portfolio-hero-grid) .page-index{top:64px!important}body:has(.portfolio-hero-grid) .page-index>.wrap{flex-wrap:nowrap!important;overflow-x:auto!important;scrollbar-width:none!important}body:has(.portfolio-hero-grid) .page-index a{white-space:nowrap!important;flex:0 0 auto!important}body:has(.portfolio-hero-grid) .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}body:has(.portfolio-hero-grid) .metric-grid .metric:last-child{grid-column:1/-1!important}body:has(.portfolio-hero-grid) .metric-grid .metric{min-height:120px!important}body:has(.portfolio-hero-grid) .executive-map-grid,body:has(.portfolio-hero-grid) .case-journey,body:has(.portfolio-hero-grid) .gov-grid{grid-template-columns:1fr!important}body:has(.portfolio-hero-grid) .evidence-row{grid-template-columns:repeat(2,minmax(0,1fr))!important;padding:15px!important}body:has(.portfolio-hero-grid) .portfolio-section .wb-title{font-size:clamp(1.85rem,7.8vw,2.6rem)!important}body:has(.portfolio-hero-grid) .portfolio-section[id]{scroll-margin-top:125px!important}}

/* Final visual pass: balanced pairs at every viewport; neutral executive hero. */
body:has(.portfolio-hero-grid) .portfolio-hero{background:linear-gradient(115deg,#101f33 0%,#172d43 58%,#22384b 100%)!important}
body:has(.portfolio-hero-grid) .portfolio-hero::before,body:has(.portfolio-hero-grid) .portfolio-hero::after{display:none!important;content:none!important}
body:has(.portfolio-hero-grid) .portfolio-note{background:#20374b!important;border-color:#526476!important;backdrop-filter:none!important}
body:has(.portfolio-hero-grid) #portfolio-map{background:#f6f8fa!important}
body:has(.portfolio-hero-grid) .portfolio-principle{background:#14283b!important}
body:has(.portfolio-hero-grid) .cta{background:linear-gradient(110deg,#13263a,#273e52)!important}
body:has(.portfolio-hero-grid) .metric-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
body:has(.portfolio-hero-grid) .metric-grid .metric:last-child{grid-column:auto!important}
body:has(.portfolio-hero-grid) .executive-map-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
body:has(.portfolio-hero-grid) .gov-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
@media(max-width:950px){body:has(.portfolio-hero-grid) .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}body:has(.portfolio-hero-grid) .metric-grid .metric:last-child{grid-column:1/-1!important}}
@media(max-width:640px){body:has(.portfolio-hero-grid) .executive-map-grid,body:has(.portfolio-hero-grid) .case-journey,body:has(.portfolio-hero-grid) .gov-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}body:has(.portfolio-hero-grid) .executive-map-grid article,body:has(.portfolio-hero-grid) .case-journey article,body:has(.portfolio-hero-grid) .gov{padding:15px!important}body:has(.portfolio-hero-grid) .executive-map-grid h3,body:has(.portfolio-hero-grid) .case-journey h3,body:has(.portfolio-hero-grid) .gov h3{font-size:1rem!important;line-height:1.35!important}body:has(.portfolio-hero-grid) .executive-map-grid p,body:has(.portfolio-hero-grid) .case-journey p,body:has(.portfolio-hero-grid) .gov p{font-size:.78rem!important;line-height:1.5!important}body:has(.portfolio-hero-grid) .metric-grid .metric:last-child{grid-column:auto!important}body:has(.portfolio-hero-grid) .metric-grid .metric{padding:14px!important}body:has(.portfolio-hero-grid) .metric-grid .metric strong{font-size:clamp(1.3rem,5vw,1.9rem)!important}body:has(.portfolio-hero-grid) .metric-grid .metric span{font-size:.72rem!important}}

/* Executive metrics: five concise tiles on one desktop row. */
@media(min-width:1000px){body:has(.portfolio-hero-grid) #portfolio-snapshot .metric-grid{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:10px!important}body:has(.portfolio-hero-grid) #portfolio-snapshot .metric-grid .metric,body:has(.portfolio-hero-grid) #portfolio-snapshot .metric-grid .metric:last-child{grid-column:auto!important;min-height:112px!important;padding:17px 14px!important}body:has(.portfolio-hero-grid) #portfolio-snapshot .metric-grid .metric strong{font-size:clamp(1.4rem,2vw,2.25rem)!important;line-height:1.1!important;white-space:nowrap!important}body:has(.portfolio-hero-grid) #portfolio-snapshot .metric-grid .metric span{display:block!important;margin-top:7px!important;font-size:.76rem!important;line-height:1.35!important}}
/* Tighter vertical rhythm across portfolio sections. */
body:has(.portfolio-hero-grid) .portfolio-section{padding-top:clamp(38px,4.2vw,58px)!important;padding-bottom:clamp(38px,4.2vw,58px)!important}
body:has(.portfolio-hero-grid) #portfolio-map.executive-map-clean{padding-bottom:20px!important}
body:has(.portfolio-hero-grid) .case-journey{margin:18px 0!important}
body:has(.portfolio-hero-grid) .case-journey article{padding:18px!important}
body:has(.portfolio-hero-grid) .executive-map-grid article{padding:18px!important}
body:has(.portfolio-hero-grid) .section-action{margin-top:18px!important}
@media(max-width:640px){body:has(.portfolio-hero-grid) .portfolio-section{padding-top:34px!important;padding-bottom:34px!important}}

/* Three-part integration narratives must not leave a stranded third card. */
@media(min-width:900px){body:has(.portfolio-hero-grid) #portfolio-sap .case-journey.compact{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important}body:has(.portfolio-hero-grid) #portfolio-sap .case-journey.compact article,body:has(.portfolio-hero-grid) #portfolio-sap .case-journey.compact article:last-child{grid-column:auto!important;grid-row:auto!important;min-width:0!important;min-height:0!important;padding:18px!important}body:has(.portfolio-hero-grid) #portfolio-sap .case-journey.compact article p{font-size:.87rem!important;line-height:1.55!important}}
@media(min-width:640px) and (max-width:899px){body:has(.portfolio-hero-grid) #portfolio-sap .case-journey.compact{grid-template-columns:repeat(3,minmax(0,1fr))!important}body:has(.portfolio-hero-grid) #portfolio-sap .case-journey.compact article:last-child{grid-column:auto!important}}
@media(max-width:639px){body:has(.portfolio-hero-grid) #portfolio-sap .case-journey.compact{grid-template-columns:1fr!important}body:has(.portfolio-hero-grid) #portfolio-sap .case-journey.compact article{padding:15px!important}}

/* SAP and Dynamics integration: override legacy compact-card spanning rules. */
@media(min-width:768px){html body #main #portfolio-sap .integration-case .case-journey.compact{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-auto-flow:row!important;gap:12px!important;align-items:stretch!important}html body #main #portfolio-sap .integration-case .case-journey.compact>article,html body #main #portfolio-sap .integration-case .case-journey.compact>article:last-child,html body #main #portfolio-sap .integration-case .case-journey.compact>article:nth-child(n){grid-column:auto!important;grid-row:auto!important;grid-area:auto!important;width:auto!important;max-width:none!important;min-width:0!important;min-height:0!important;margin:0!important;padding:18px!important}html body #main #portfolio-sap .integration-case .case-journey.compact>article p{font-size:clamp(.8rem,1vw,.93rem)!important;line-height:1.55!important}}
