/* D-223: a familiar photo profile within the factory's existing visual system. */
html[data-factory-page="contacts"] body { background: #eef2ee; color: #173d36; }
#contactsMain { width: min(1080px,100%); margin: 0 auto; padding: 24px 28px 0; font-family: Manrope,sans-serif; }
#contactsMain * { box-sizing: border-box; }
#contactsMain h1, #contactsMain h2, #contactsMain p, #contactsMain dl, #contactsMain dd { margin: 0; }
#contactsMain a { color: #173d36; text-underline-offset: 4px; }
#contactsMain a:hover { color: #0d6450; }
#contactsMain :is(a,button,summary):focus-visible { outline: 2px solid #176d5b; outline-offset: 4px; }
#contactsMain .contact-profile-head { display: grid; grid-template-columns: 176px minmax(0,1fr) auto; column-gap: 28px; row-gap: 20px; align-items: start; padding: 12px 20px 0; }
#contactsMain .contact-avatar { grid-column: 1; grid-row: 1/5; display: grid; place-items: center; padding: 3px; width: 156px; height: 156px; border: 1px solid #b6cbbf; border-radius: 50%; background: #fffdf7; }
#contactsMain .contact-avatar img { width: 138px; height: 138px; object-fit: contain; border-radius: 50%; }
#contactsMain .contact-identity { grid-column: 2; grid-row: 1; align-self: center; min-width: 0; }
#contactsMain h1 { font: 600 25px/1.3 Manrope,sans-serif; letter-spacing: -.025em; }
#contactsMain .contact-legal-name { margin-top: 5px; font-size: 13px; color: #4f675d; }
#contactsMain .contact-profile-actions { grid-column: 3; grid-row: 1; display: flex; flex-wrap: wrap; gap: 8px; }
#contactsMain .contact-profile-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 17px; border: 1px solid #c4d5ca; border-radius: 10px; background: #fffdf8; color: #173d36; font-size: 13px; font-weight: 650; text-decoration: none; white-space: nowrap; }
#contactsMain .contact-profile-actions .contact-call { color: #fff; background: #176b58; border-color: #176b58; }
#contactsMain .contact-profile-actions .contact-call:hover { background: #10513f; }
#contactsMain .contact-profile-facts { grid-column: 2/4; grid-row: 2; display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 0; padding: 0; list-style: none; }
#contactsMain .contact-profile-facts li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 6px; font-size: 13px; }
#contactsMain .contact-profile-facts strong { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
#contactsMain .contact-profile-facts span { color: #4f675d; }
#contactsMain .contact-profile-facts a { display: flex; align-items: baseline; flex-wrap: wrap; gap: inherit; color: inherit; }
#contactsMain .contact-profile-facts a span { text-decoration: underline; text-underline-offset: .2em; }
#contactsMain .contact-profile-facts a:focus-visible span { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }
#contactsMain .contact-bio { grid-column: 2/4; grid-row: 3; max-width: 65ch; font-size: 14px; line-height: 1.6; }
#contactsMain .contact-profile-category { margin-bottom: 7px; color: #4f675d; font-size: 13px; }
#contactsMain .contact-direct { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 7px; }
#contactsMain .contact-direct a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
#contactsMain .contact-company { margin-top: 5px; }
#contactsMain .contact-company summary { display: flex; align-items: center; gap: 8px; width: fit-content; min-height: 44px; cursor: pointer; list-style: none; color: #345b4d; font-size: 13px; }
#contactsMain .contact-company summary::-webkit-details-marker { display: none; }
#contactsMain .contact-company[open] summary svg { transform: rotate(180deg); }
#contactsMain .contact-company > div { padding: 4px 0 8px; font-size: 13px; }
#contactsMain .contact-company h2 { font-size: 13px; font-weight: 650; margin-bottom: 5px; }
#contactsMain .contact-company dl { display: flex; flex-wrap: wrap; gap: 5px 20px; margin-top: 10px; }
#contactsMain .contact-company dl > div { display: flex; gap: 6px; }
#contactsMain .contact-company dd { font-variant-numeric: tabular-nums; }
#contactsMain .contact-company > div > a { display: inline-flex; align-items: center; min-height: 44px; }
#contactsMain .contact-company > div > p:last-child { max-width: 55ch; color: #4f675d; }
#contactsMain .contact-highlights { display: flex; gap: 30px; padding: 24px 18px 28px; }
#contactsMain .contact-highlight { display: grid; justify-items: center; gap: 9px; width: 92px; min-width: 0; font-size: 12px; font-weight: 600; text-decoration: none; }
#contactsMain .contact-highlight-image { display: block; width: 82px; height: 82px; padding: 4px; border: 1px solid #b9cec0; border-radius: 50%; }
#contactsMain .contact-highlight picture, #contactsMain .contact-highlight img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
#contactsMain .contact-feed-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 60px; border-top: 1px solid #cfdcd2; }
#contactsMain .contact-feed-heading h2 { display: flex; align-items: center; gap: 9px; align-self: stretch; border-top: 1px solid #245d49; margin-top: -1px; font-size: 13px; font-weight: 650; }
#contactsMain .contact-feed-heading > a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 12px; font-weight: 600; text-decoration: none; }
#contactsMain .contact-photo-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
#contactsMain .contact-tile { display: block; min-width: 0; aspect-ratio: 3/4; overflow: hidden; background: #d5dfd6; }
#contactsMain .contact-tile picture, #contactsMain .contact-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
#contactsMain .contact-tile img { transition: filter 160ms ease-out; }
#contactsMain .contact-tile:hover img { filter: brightness(.93); }
#contactsMain .contact-photo-dialog { width: min(1040px,calc(100vw - 72px)); height: min(740px,calc(100svh - 72px)); max-width: none; max-height: none; margin: auto; padding: 0; border: 0; border-radius: 2px; background: #fffdf8; color: #173d36; overflow: visible; }
#contactsMain .contact-photo-dialog::backdrop { background: rgba(8,20,16,.85); }
#contactsMain .contact-post { display: grid; grid-template-columns: minmax(0,1fr) 286px; width: 100%; height: 100%; }
#contactsMain .contact-post-media { position: relative; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; background: #101d17; touch-action: pan-y pinch-zoom; }
#contactsMain .contact-post-media > img { display: block; max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; }
#contactsMain .contact-post-info { min-width: 0; padding: 22px; overflow-y: auto; font-size: 13px; line-height: 1.6; }
#contactsMain .contact-post-info header { display: flex; align-items: center; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid #dce4dc; }
#contactsMain .contact-post-info header img { border-radius: 50%; }
#contactsMain .contact-post-info header div { display: grid; gap: 2px; }
#contactsMain .contact-post-info header strong { font-size: 13px; }
#contactsMain .contact-post-info header span { font-size: 11px; color: #4f675d; }
#contactsMain .contact-post-info h2 { margin-top: 20px; font-size: 16px; line-height: 1.5; font-weight: 600; }
#contactsMain #contactsPhotoCounter { margin-top: 10px; color: #4f675d; font-variant-numeric: tabular-nums; }
#contactsMain .contact-post-connect { margin-top: 28px; display: grid; gap: 3px; }
#contactsMain .contact-post-connect p { color: #4f675d; font-size: 12px; }
#contactsMain .contact-post-connect a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; overflow-wrap: anywhere; }
#contactsMain .contact-photo-close, #contactsMain .contact-photo-arrow { display: grid; place-items: center; width: 44px; height: 44px; min-width: 44px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; }
#contactsMain .contact-photo-close { position: absolute; top: -8px; right: -54px; background: transparent; color: #fff; }
#contactsMain .contact-photo-arrow { position: absolute; top: calc(50% - 22px); background: rgba(255,253,248,.92); color: #173d36; }
#contactsMain .contact-photo-prev { left: 10px; }
#contactsMain .contact-photo-next { right: 10px; }
#contactsMain ::selection { background: #cfe5d7; color: #173d36; }
#contactsMain + .factory-chrome--footer .site-footer { background: #eef2ee; }
#contactsMain + .factory-chrome--footer .footer-shell { background: rgba(255,255,255,.68); border-color: transparent; box-shadow: 0 12px 32px rgba(18,74,61,.07); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
@media (max-width: 1000px) {
 #contactsMain .contact-profile-head { grid-template-columns: 144px minmax(0,1fr); padding-inline: 12px; column-gap: 24px; row-gap: 16px; }
 #contactsMain .contact-avatar { width: 128px; height: 128px; }
 #contactsMain .contact-avatar img { width: 114px; height: 114px; }
 #contactsMain .contact-profile-actions { grid-column: 2; grid-row: 2; }
 #contactsMain .contact-profile-facts { grid-column: 2; grid-row: 3; gap: 10px 22px; }
 #contactsMain .contact-bio { grid-column: 2; grid-row: 4; }
 #contactsMain h1 { font-size: 23px; }
 #contactsMain .contact-photo-close { top: 5px; right: 5px; background: rgba(255,253,248,.94); color: #173d36; z-index: 2; }
 #contactsMain .contact-post { grid-template-columns: minmax(0,1fr) 252px; }
}
@media (max-width: 600px) {
 #contactsMain { padding: 16px 0 0; }
 #contactsMain .contact-profile-head { grid-template-columns: 82px minmax(0,1fr); padding: 0 16px; gap: 16px; }
 #contactsMain .contact-avatar { grid-column: 1; grid-row: 1; width: 80px; height: 80px; padding: 2px; }
 #contactsMain .contact-avatar img { width: 70px; height: 70px; }
 #contactsMain .contact-identity { grid-column: 2; grid-row: 1; }
 #contactsMain h1 { font-size: 21px; }
 #contactsMain .contact-legal-name { font-size: 12px; }
 #contactsMain .contact-profile-facts { grid-column: 1/-1; grid-row: 2; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; padding-block: 2px; }
 #contactsMain .contact-profile-facts li { display: grid; align-content: start; justify-items: center; text-align: center; gap: 3px; min-width: 0; }
 #contactsMain .contact-profile-facts a { display: grid; justify-items: center; }
 #contactsMain .contact-profile-facts strong { font-size: 13px; white-space: nowrap; }
 #contactsMain .contact-profile-facts span { font-size: 11px; }
 #contactsMain .contact-bio { grid-column: 1/-1; grid-row: 3; font-size: 13px; }
 #contactsMain .contact-direct { gap: 0 12px; }
 #contactsMain .contact-direct a { min-height: 44px; }
 #contactsMain .contact-profile-actions { grid-column: 1/-1; grid-row: 4; display: grid; grid-template-columns: 1fr 1fr; }
 #contactsMain .contact-profile-actions a { min-height: 44px; }
 #contactsMain .contact-highlights { padding: 24px 16px; gap: 22px; }
 #contactsMain .contact-highlight { width: 73px; gap: 7px; font-size: 11px; }
 #contactsMain .contact-highlight-image { width: 66px; height: 66px; padding: 3px; }
 #contactsMain .contact-feed-heading { padding: 0 16px; min-height: 54px; gap: 10px; }
 #contactsMain .contact-feed-heading h2 { font-size: 12px; }
 #contactsMain .contact-feed-heading > a { font-size: 11px; gap: 4px; }
 #contactsMain .contact-photo-grid { gap: 3px; }
 #contactsMain .contact-photo-dialog { inset: 0; width: 100%; height: 100%; height: 100dvh; margin: 0; border-radius: 0; overflow: auto; overscroll-behavior: contain; }
 #contactsMain .contact-post { grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(240px,65svh) auto; height: auto; min-height: 100%; }
 #contactsMain .contact-post-info { padding: 18px 20px; }
 #contactsMain .contact-post-info header { padding-bottom: 12px; }
 #contactsMain .contact-post-info h2 { margin-top: 14px; font-size: 15px; }
 #contactsMain .contact-post-connect { margin-top: 16px; }
 #contactsMain .contact-photo-close { position: fixed; top: 10px; right: 10px; }
 #contactsMain .contact-photo-arrow { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { #contactsMain .contact-tile img { transition: none; } }

/* D-230: only the Contacts phone view ends with the photo grid. */
@media (max-width: 767px) {
 #contactsMain + .factory-chrome--footer { display: none; }
}

/* D290: keep a cached preview during loading; explicit recovery without changing ready photos. */
#contactsMain .contact-photo-preview{position:absolute;inset:0;pointer-events:none}
#contactsMain #contactsPhotoImage[data-state="loading"],#contactsMain #contactsPhotoImage[data-state="error"]{opacity:0}
#contactsMain .contact-photo-status{margin-top:12px;color:#4f675d;font-size:14px;line-height:1.5}
#contactsMain .contact-photo-retry{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:9px 14px;border:1px solid #cad9cf;border-radius:10px;background:#fffdf8;color:#173d36;font:600 14px/1.4 Manrope,Arial,sans-serif;cursor:pointer}
#contactsMain .contact-photo-retry[aria-disabled="true"]{opacity:.6;cursor:wait}
#contactsMain .contact-photo-preview[hidden],#contactsMain .contact-photo-status[hidden],#contactsMain .contact-photo-retry[hidden]{display:none}
