/* Final W1.4 responsive fit layer. Loaded last. */

html,body{max-width:100%;overflow-x:hidden}
img,svg{max-width:100%;height:auto}
.hero-copy,.section-heading,.operating-intro,.contact-card>div,.product-card,.value-card,.product-link,.workflow-list article>div,.principle-list>div>*{min-width:0}
.product-kicker,.hero-intro,.contact-actions,.contact-actions a,.footer-grid,.ledger-row,.flow div{overflow-wrap:anywhere}

/* iPad landscape, compact laptop and large tablet */
@media(max-width:1100px){
  .shell{width:min(100% - 40px,1040px)}
  .hero-grid{grid-template-columns:minmax(0,1.08fr) minmax(300px,.92fr);gap:28px}
  .hero h1,.page-hero h1,.company-hero h1{font-size:clamp(52px,6.2vw,68px)}
  .product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
  .product-grid>.product-card:last-child{grid-column:1/-1}
  .product-card{min-height:0}
  .row-heading{grid-template-columns:1fr;gap:20px}
  .operating-grid{grid-template-columns:1fr;gap:48px}
  .outcomes-grid{border-left:0}
  .principles-grid,.workflow-grid,.thesis-grid,.editorial-grid,.mark-grid{grid-template-columns:1fr;gap:44px}
  .contact-card{grid-template-columns:1fr;gap:30px}
  .contact-actions{justify-self:start;text-align:left;max-width:100%}
  .footer-grid{grid-template-columns:1.35fr .8fr .8fr}
  .footer-meta{grid-column:1/-1;text-align:left;border-top:1px solid var(--line);padding-top:22px}
}

/* iPad portrait / common 834, 820 and 768 widths */
@media(max-width:900px){
  .shell{width:min(100% - 36px,840px)}
  .section{padding:76px 0}
  .hero-grid,.page-hero .hero-grid,.company-hero .hero-grid{grid-template-columns:1fr;min-height:auto}
  .hero-copy{padding:52px 0 22px}
  .page-hero .hero-copy,.company-hero .hero-copy{padding-bottom:10px}
  .hero-art,.page-hero .hero-art,.company-hero .hero-art{width:100%;max-width:640px;height:auto;min-height:0;margin:0 auto;padding:10px 0 48px}
  .page-home .hero-art{height:300px;padding-bottom:20px}
  .page-home .pillar{width:64px}.page-home .pillar-one{height:230px}.page-home .pillar-two{height:185px}.page-home .pillar-three{height:145px}
  .business-panel,.res-panel,.ledger-panel{width:min(100%,560px);margin-inline:auto}
  .company-mark{height:260px;margin:0 auto 12px}.company-mark i{width:58px}.company-mark i:nth-child(1){height:205px}.company-mark i:nth-child(2){height:165px}.company-mark i:nth-child(3){height:125px}
  .product-grid,.value-grid,.product-links{grid-template-columns:1fr}
  .product-grid>.product-card:last-child,.value-grid>.value-card:last-child,.product-links>.product-link:last-child{grid-column:auto}
  .outcomes-grid{grid-template-columns:1fr;border-top:1px solid rgba(255,255,255,.14)}
  .outcomes-grid article{padding:24px 0;border-right:0;border-bottom:1px solid rgba(255,255,255,.14)}
  .outcome-number{margin-bottom:16px}
  .principle-list>div{grid-template-columns:44px 1fr;gap:10px 16px}
  .principle-list>div p{grid-column:2}
  .mark-sequence{grid-template-columns:1fr;gap:14px;padding:24px}
  .mark-arrow{width:1px;height:28px;margin:auto}.mark-arrow::after{right:-3px;top:auto;bottom:0;transform:rotate(135deg)}
  .contact-card{padding:42px 38px}
  .contact-card h2{font-size:clamp(40px,6.2vw,48px)}
  .footer-grid{grid-template-columns:1.25fr 1fr 1fr}
}

/* Phones and narrow portrait tablets */
@media(max-width:720px){
  .shell{width:min(100% - 28px,680px)}
  .section{padding:62px 0}
  .nav-wrap{height:72px}
  .brand{gap:10px}.brand-mark{width:44px;height:42px;gap:3px}.brand-mark i{width:10px}.brand-mark i:nth-child(1){height:39px}.brand-mark i:nth-child(2){height:31px}.brand-mark i:nth-child(3){height:23px}
  .brand-type strong{font-size:16px;letter-spacing:.17em}.brand-type>span{font-size:7px;letter-spacing:.38em;margin-top:5px}
  .primary-nav.open{left:14px;right:14px;top:66px;max-height:calc(100dvh - 80px)}
  .hero-copy{padding:40px 0 14px}
  .hero h1,.page-hero h1,.company-hero h1{font-size:clamp(42px,12vw,58px);line-height:.95}
  .section-heading h2,.operating-intro h2,.compact-heading h2,.editorial-quote,.mark-statement{font-size:clamp(38px,9vw,46px)}
  .hero-intro{font-size:15px;line-height:1.6;margin:22px 0 26px}
  .hero-proof{display:grid;gap:9px;margin-top:24px}
  .hero-proof span+span::before{display:none}
  .hero-actions{display:grid;grid-template-columns:1fr;gap:10px}
  .hero-actions .button,.contact-actions .button{width:100%}
  .page-home .hero-art{height:250px}.page-home .pillar{width:54px}.page-home .pillar-one{height:190px}.page-home .pillar-two{height:152px}.page-home .pillar-three{height:118px}
  .product-card,.value-card,.product-link{padding:23px}
  .product-topline{align-items:flex-start;gap:12px}.status{white-space:normal;text-align:center;line-height:1.3;max-width:125px}
  .flow div,.ledger-row{grid-template-columns:minmax(0,1fr) auto;gap:12px}
  .flow div{display:grid}
  .res-panel,.ledger-panel,.business-panel{padding:24px}
  .workflow-list article{grid-template-columns:38px minmax(0,1fr);gap:12px}
  .contact-card{padding:32px 24px;border-radius:12px}
  .contact-actions{width:100%}
  .contact-actions p,.contact-actions a{max-width:100%}
  .footer-grid{grid-template-columns:1fr 1fr;gap:28px 22px}
  .footer-brand,.footer-meta{grid-column:1/-1}.footer-meta{padding-top:20px}
  .legal-shell h1,.error-shell h1{font-size:clamp(44px,12vw,64px)}
}

@media(max-width:480px){
  .shell{width:calc(100% - 24px)}
  .brand-type>span{display:none}
  .brand-type strong{font-size:15px;letter-spacing:.14em}
  .menu-button{width:42px;height:42px}
  .section{padding:54px 0}
  .hero h1,.page-hero h1,.company-hero h1{font-size:clamp(39px,12.5vw,51px)}
  .page-home .hero-art{height:220px}.page-home .pillar{width:48px}.page-home .pillar-one{height:170px}.page-home .pillar-two{height:136px}.page-home .pillar-three{height:105px}
  .res-stat{grid-template-columns:1fr}
  .ledger-row strong{text-align:right}
  .product-card h3{font-size:31px}
  .contact-card{padding:28px 20px}
  .footer-grid{grid-template-columns:1fr}
  .footer-brand,.footer-meta{grid-column:auto}
  .error-home{display:none}
}

/* Landscape phones: avoid a hero taller than the useful viewport. */
@media(max-height:520px) and (orientation:landscape) and (max-width:950px){
  .hero-copy{padding:32px 0 12px}.page-home .hero-art{display:none}.page-hero .hero-art,.company-hero .hero-art{padding-bottom:30px}
}

/* Legal and error pages */
.legal-shell,.error-shell{max-width:820px;margin:0 auto}
.legal-shell h1,.error-shell h1{font-family:var(--serif);font-weight:500;letter-spacing:-.03em;font-size:64px;line-height:.96;margin:0 0 24px}
.legal-lead,.error-shell>p{font-size:17px;line-height:1.7;color:var(--muted);margin:0 0 40px}
.legal-shell h2{font-size:20px;margin:34px 0 10px}.legal-shell p:not(.eyebrow):not(.legal-lead){color:var(--muted);line-height:1.75;font-size:14px}.legal-shell a{color:var(--green);font-weight:700}.legal-updated{margin-top:40px!important;font-size:12px!important}.error-shell{padding:70px 0}.error-shell .button{margin-top:4px}
