/* Local review candidate: fluid chapters, true dark surfaces and one persistent search. */
:root{--page-gutter:clamp(20px,4vw,104px)}
.wrap,.top.home-surface .topin,.hero.home-surface>.wrap{width:calc(100% - 2 * var(--page-gutter));max-width:none;margin-inline:auto}
.people,#ville .people,#communityDirectory .people{grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(24px,1.9vw,40px)}
.person{min-width:0}.person h3,#ville .person h3,#communityDirectory .person h3{font-size:clamp(22px,1.4vw,30px);line-height:1.3;overflow-wrap:anywhere}
.community.home-surface{padding:clamp(72px,6vw,144px) 0}.chapter{grid-template-columns:clamp(80px,6vw,120px) minmax(0,1fr)}
.chapter h2{font-size:clamp(42px,5vw,104px);line-height:1.08;max-inline-size:22ch}.chapter p,.intro p,.submit p{max-inline-size:65ch;font-size:19px;line-height:1.7}.intro h2{max-inline-size:18ch}
.hero.home-surface h1{font-size:clamp(54px,8.5vw,184px);line-height:.98;width:auto}.hero.home-surface .hero-bottom p{width:auto;max-inline-size:52ch}.hero.home-surface{min-height:0}
body{color-scheme:light}body.dark{color-scheme:dark;--paper:#141b18;--surface:#202c26;--ink:#f1eee7;--muted:#c2ccc4;--line:#6f8377;--gold:#cfb88e;--forest:#10251b;--portrait-bed:#1b2721;--action-bg:#cfb88e;--action-ink:#142219}
body.dark .home-surface{--home-ivory:#141b18;--home-stone:#202c26;--home-deep:#10251b;--paper:#141b18;--surface:#202c26;--ink:#f1eee7;--muted:#c2ccc4;--line:#6f8377;--gold:#cfb88e;--portrait-bed:#1b2721}
body.dark .home-surface[data-home-tone="forest"]{--paper:#10251b;--surface:#202c26;background:#10251b;color:var(--ink)}
/* Tone selectors must override the earlier equally specific dark foreground tokens too. */
body.dark .home-surface[data-home-tone="ivory"]{--ink:#f1eee7;--muted:#c2ccc4;--line:#6f8377;--gold:#cfb88e;background:#141b18;color:var(--ink)}body.dark .home-surface[data-home-tone="stone"]{--ink:#f1eee7;--muted:#c2ccc4;--line:#6f8377;--gold:#cfb88e;background:#202c26;color:var(--ink)}
body.dark :is(#ville,#communityDirectory[data-community="ville"]){background:#202c26;--ink:#f1eee7;--muted:#c2ccc4;--line:#6f8377;--surface:#202c26;--gold:#cfb88e}
body.dark :is(#ville,#communityDirectory[data-community="ville"]) .person h3{color:#f1eee7}
body.dark .home-surface .person .portrait,body.dark .home-surface .portrait-visual img,body.dark :is(#ville,#communityDirectory[data-community="ville"]) .person .portrait,body.dark :is(#ville,#communityDirectory[data-community="ville"]) .person[data-name-pending="true"] .portrait-visual img{background:#1b2721;color:#c2ccc4}
body.dark .person:focus-visible{outline-color:#cfb88e}body.dark .submit.home-surface .btn{background:#cfb88e;color:#142219}
button:disabled{opacity:1!important;color:var(--muted)}:is(button,a,input,textarea):focus-visible{outline:3px solid var(--gold);outline-offset:3px}
.top.home-surface .topin{flex-wrap:nowrap;min-height:72px}.top.home-surface .menu{gap:16px;margin-left:auto;margin-right:0}.header-search-slot{display:none;min-width:0}.search-docked .header-search-slot{display:block;flex:1;max-width:440px;height:56px}
.hero-search-dock{position:relative;min-height:88px;margin-top:30px;width:min(760px,100%)}.hero-search-dock:before{content:'Rechèch yon moun';display:block;font:16px/1.4 Arial,sans-serif;margin-bottom:8px;color:var(--ink)}
#globalSearchForm{position:relative;left:auto;top:auto;display:flex;width:100%;min-width:0;height:56px;max-width:none;background:var(--surface);color:var(--ink);border:2px solid var(--line);border-radius:12px;margin:0}
#globalSearchForm input{font:16px Arial,sans-serif;color:var(--ink);padding-left:44px;border-radius:10px}#globalSearchForm input::placeholder{color:var(--muted);opacity:1}#globalSearchForm button{top:4px;right:4px;width:44px;height:44px;background:var(--action-bg);color:var(--action-ink);border-radius:8px}.search-icon{border-color:var(--ink)}.search-icon:after{background:var(--ink)}
#globalSearchForm.is-docked{position:fixed;left:var(--search-left);top:var(--search-top);width:var(--search-width);z-index:25}.global-search:focus-within{outline:3px solid var(--gold);outline-offset:3px}
@media(max-width:1099px){.top.home-surface .topin{flex-wrap:wrap}.search-docked .header-search-slot{order:3;flex:0 0 100%;max-width:none}.top.home-surface .menu{margin-left:auto}}
@media(max-width:1023px){.people,#ville .people,#communityDirectory .people{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.chapter{grid-template-columns:1fr}}
@media(max-width:850px){.top.home-surface .topin{width:calc(100% - 2 * var(--page-gutter))}.top.home-surface .menu{order:4;width:100%;gap:8px;font-size:12px}.top.home-surface .brand{margin-right:52px}.top.home-surface .theme{top:8px;right:0}.hero.home-surface h1{font-size:clamp(46px,11.5vw,98px)}.hero-search-dock{min-height:84px}#globalSearchForm{height:52px}#globalSearchForm button{height:44px;top:2px}.search-docked .header-search-slot{height:52px}}
@media(max-width:600px){.people,#ville .people,#communityDirectory .people{gap:16px}.person h3,#ville .person h3,#communityDirectory .person h3{font-size:22px}}
@media(max-width:359px){.people,#ville .people,#communityDirectory .people{grid-template-columns:1fr}.top.home-surface .brand{font-size:13px}}

/* One thumbnail geometry; original sources remain untouched. */
body .person .portrait,body :is(#ville,#communityDirectory) .person .portrait{aspect-ratio:4/5;padding:0;border:0;border-radius:14px;background:var(--portrait-bed)}
body .person .portrait-visual,body :is(#ville,#communityDirectory) .person .portrait-visual{position:absolute;inset:0;width:100%;height:100%;transform:none}
body .person .portrait-visual img,body :is(#ville,#communityDirectory) .person .portrait-visual img{position:static;margin:0;width:100%;height:100%;max-width:none;max-height:none;object-fit:cover!important;border:0;border-radius:0;background:var(--portrait-bed)}
/* Presentation follows visually inspected content, never identity certainty.
   All current supplied sources are photos. Future print-bearing programs are an
   explicit contain exception: do not crop identifying print to fake uniformity. */
body .person[data-content-type="photo"] .portrait-visual img,body :is(#ville,#communityDirectory) .person[data-content-type="photo"] .portrait-visual img{object-fit:cover!important;object-position:var(--photo-position,50% 50%)}
body .person[data-content-type="program"] .portrait-visual img,body :is(#ville,#communityDirectory) .person[data-content-type="program"] .portrait-visual img{object-fit:contain!important}
body .person:hover .portrait::after,body .person:focus-visible .portrait::after,body .person:hover .portrait-cta,body .person:focus-visible .portrait-cta{opacity:1;transform:none}
body .person:hover .portrait-visual,body .person:focus-visible .portrait-visual{transform:none}
body .memorial-dialog.generic-editing{width:min(600px,100%);display:block;height:auto;min-height:0;max-height:calc(100dvh - 48px)}
body .generic-editing>.memorial-photo-region,body .generic-editing>.memorial-copy,body .generic-editing>.memorial-close{display:none}
body .generic-editing>.memory-drawer{position:relative;inset:auto;width:100%;height:auto;max-height:calc(100dvh - 48px);border:0}
#drawerSummary:empty,#draftContext:empty{display:none}#draftAttachment{max-width:100%}#attachmentPreview{display:block;max-width:100%;max-height:160px;object-fit:contain;margin:12px 0}#attachmentPreview[hidden],#removeAttachment[hidden]{display:none}#attachmentError{color:var(--ink);font-weight:700}#removeAttachment{min-height:44px;padding:8px 16px;background:var(--surface);color:var(--ink);border:1px solid var(--line);cursor:pointer}

@media(max-width:850px){.search-docked .header-search-slot{max-width:none;order:5}body .memorial-dialog.generic-editing{height:auto;max-height:calc(100dvh - 24px);margin:12px;width:calc(100% - 24px)}body .generic-editing>.memory-drawer{height:auto;max-height:calc(100dvh - 24px)}}
body :is(#ville,#communityDirectory) .person .portrait{aspect-ratio:4/5!important}
/* Hover/focus may reveal the CTA, never resize cards or fade neighbours. */
body .person,body .person:hover,body .person:focus-visible,body .people:has(.person:hover) .person:not(:hover):not(:focus-visible),body :is(#ville,#communityDirectory) .person,body :is(#ville,#communityDirectory) .person:hover,body :is(#ville,#communityDirectory) .person:focus-visible,body :is(#ville,#communityDirectory) .people:has(.person:hover) .person:not(:hover):not(:focus-visible){transform:none;opacity:1;transition:none}
body .person:hover .portrait,body .person:focus-visible .portrait{transform:none;box-shadow:none}
body .person:focus-visible,body :is(#ville,#communityDirectory) .person:focus-visible{z-index:3;outline:3px solid var(--gold);outline-offset:6px}
/* A solid bed makes white CTA contrast independent of source and theme. */
body .person .portrait-cta{background:#10251b;color:#fff;padding:8px 10px;border-radius:6px;left:12px;right:12px;bottom:12px}
.attachment-picker{position:relative;display:inline-flex;max-width:100%;min-height:44px;align-items:center;background:var(--surface);color:var(--ink);border:1px solid var(--line);padding:10px 16px;cursor:pointer}
#draftForm .attachment-picker input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;padding:0;border:0}
.attachment-picker:focus-within{outline:3px solid var(--gold);outline-offset:3px}
#attachmentSelection{display:block;overflow-wrap:anywhere;margin-top:8px}
@media(prefers-reduced-motion:reduce){body .person{transform:none!important}}

/* Inline search correction. The desktop header has exactly one grid row. */
@media(min-width:1100px){
.top.home-surface .topin{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,440px) minmax(0,1fr);align-items:center;gap:20px;flex-wrap:nowrap}
.top.home-surface .brand{grid-column:1;grid-row:1;justify-self:start;margin:0;white-space:nowrap}
.top.home-surface .menu{grid-column:3;grid-row:1;justify-self:end;margin:0;gap:16px;width:auto}
.search-docked .header-search-slot{display:block;grid-column:2;grid-row:1;order:0;width:100%;max-width:none;height:48px;margin:0}
#globalSearchForm.is-docked{height:48px}
#globalSearchForm.is-docked button{top:0;right:0}
}
.search-toggle{display:none}
#globalSearchForm[hidden]{display:none!important}
@media(max-width:1099px){
.top.home-surface .topin{display:flex;position:relative;flex-wrap:wrap;gap:8px}
.top.home-surface .brand{flex:1;min-width:0;margin:0 52px 0 0;min-height:44px;display:flex;align-items:center;font-size:16px}
.top.home-surface.search-docked .brand{margin-right:0}
.search-docked .header-search-slot{display:block;order:0;flex:0 0 44px;width:44px;height:44px;max-width:44px;margin:0 52px 0 0}
.search-docked .search-toggle{display:block;width:44px;height:44px;border:2px solid var(--ink);border-radius:10px;background:var(--surface);color:var(--ink);font:28px/1 Arial,sans-serif;cursor:pointer}
.top.home-surface .menu{order:3;width:100%;margin:0;gap:8px;justify-content:space-between;font-size:13px}
.top.home-surface .menu>a{min-height:44px;padding:10px 0}
.top.home-surface .theme{position:absolute;right:0;top:8px}
#globalSearchForm.is-docked{height:52px;box-shadow:0 12px 32px #0006}
#globalSearchForm.is-docked button{top:2px;right:2px}
}

@media(min-width:1100px) and (max-width:1399px){.top.home-surface .topin{grid-template-columns:auto minmax(180px,1fr) auto}.search-docked .header-search-slot{max-width:360px;justify-self:center}}
/* Shared dramatic stationary card interaction */
body .person{--card-ring:#243b2e;--card-halo:#f4d99b;--card-panel:#f4d99b;--card-panel-ink:#10251b}
body.dark .person{--card-ring:#f4d99b;--card-halo:#10251b}
body .people .person:is(:hover,:focus-visible,:focus-within) .portrait,body :is(#ville,#communityDirectory) .people .person:is(:hover,:focus-visible,:focus-within) .portrait{transform:none;box-shadow:0 0 0 3px var(--card-ring),0 0 0 6px var(--card-halo),0 18px 38px #0006;outline:0}
body .people .person:is(:hover,:focus-visible,:focus-within) .portrait-cta,body :is(#ville,#communityDirectory) .people .person:is(:hover,:focus-visible,:focus-within) .portrait-cta{opacity:1;transform:none;background:var(--card-panel);color:var(--card-panel-ink);box-shadow:0 4px 16px #0005}
body .person .portrait-cta{min-height:44px;display:flex;align-items:center;justify-content:space-between;font-weight:700;line-height:1.4}
body .people .person:is(:hover,:focus-visible,:focus-within) h3,body :is(#ville,#communityDirectory) .people .person:is(:hover,:focus-visible,:focus-within) h3{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:5px}
body .people .person:is(:hover,:focus-visible,:focus-within) .portrait::after,body :is(#ville,#communityDirectory) .people .person:is(:hover,:focus-visible,:focus-within) .portrait::after{opacity:1}
body .people .person:is(:hover,:focus-visible,:focus-within) .portrait-visual,body :is(#ville,#communityDirectory) .people .person:is(:hover,:focus-visible,:focus-within) .portrait-visual{transform:none}
@media(hover:none),(pointer:coarse){body .person .portrait-cta,body :is(#ville,#communityDirectory) .person .portrait-cta{opacity:1;transform:none;background:var(--card-panel);color:var(--card-panel-ink);box-shadow:0 4px 16px #0005}}
@media(prefers-reduced-motion:reduce){body .person,body .person .portrait,body .person .portrait-visual,body .person .portrait-cta,body .person .portrait::after{transition:none!important;animation:none!important}}

/* Full-viewport closing: a quiet pause, with natural growth on short screens. */
.final.home-surface{
  min-height:100vh;
  min-height:100svh;
  padding:clamp(64px,12svh,160px) clamp(20px,4vw,104px);
  display:grid;
  place-items:center;
  text-align:center;
}
.final.home-surface>div{width:100%;min-width:0}
.final.home-surface h2{
  font:400 clamp(40px,14vw,340px)/.98 Georgia,serif;
  letter-spacing:-.055em;
  margin:0;
  color:var(--ink);
}
.final.home-surface h2 em{font-weight:400}
.final.home-surface p{
  max-inline-size:40ch;
  margin:clamp(32px,5svh,64px) auto 0;
  font:400 clamp(16px,1.2vw,22px)/1.6 Georgia,serif;
  color:var(--muted);
  text-wrap:balance;
}
footer.home-surface .footer-credit{font-size:13px;line-height:1.7;max-width:100%;overflow-wrap:anywhere}

/* Nouvelle Touraine is the resting-card reference. Preserve its existing paint.
   Bongards' stone card/stone section was undefined: invert the existing ivory /
   stone pairing there only, with a quiet visible edge in both themes. */
body #bongards .person[data-content-type="placeholder"],
body #communityDirectory[data-community="bongards"] .person[data-content-type="placeholder"]{
  --empty-surface:#eeeae1;--empty-outline:#747b6f;--empty-ink:#535c53;--empty-shadow:#19282214;
}
body.dark #bongards .person[data-content-type="placeholder"],
body.dark #communityDirectory[data-community="bongards"] .person[data-content-type="placeholder"]{
  --empty-surface:#1b2721;--empty-outline:#9cae9f;--empty-ink:#c2ccc4;--empty-shadow:#0003;
}
body #bongards .person[data-content-type="placeholder"] .portrait,
body #communityDirectory[data-community="bongards"] .person[data-content-type="placeholder"] .portrait{
  background:var(--empty-surface);color:var(--empty-ink);
  border:1px solid var(--empty-outline);border-radius:14px;aspect-ratio:4/5;
}
body #bongards .person[data-content-type="placeholder"]:not(:hover):not(:focus-visible):not(:focus-within) .portrait,
body #communityDirectory[data-community="bongards"] .person[data-content-type="placeholder"]:not(:hover):not(:focus-visible):not(:focus-within) .portrait{
  box-shadow:0 3px 12px var(--empty-shadow);
}

/* Restore approved painted-edge rounding on contained Ville photos in every clone. */
body :is(#ville,#communityDirectory,#globalPeople) .person[data-community="ville"][data-name-pending="true"] .portrait-visual img{position:absolute;inset:0;margin:auto;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain!important;object-position:50% 50%;border-radius:14px}

/* Tall supplied GF panels: keep complete heads above the 4:5 card crop.
   Source bytes and modal contain rendering remain unchanged. */
body .person[data-record-id="grandfonds-supplied-20261012-01"],
body .person[data-record-id="grandfonds-supplied-20261012-02"],
body .person[data-record-id="grandfonds-supplied-20261012-03"],
body .person[data-record-id="grandfonds-supplied-20261012-05"]{--photo-position:50% 0%}
