/* ==========================================================================
   MEGA v5 · PAGES
   The vocabulary the 21 interior pages are assembled from: accordion,
   timeline, region explorer, editorial split, tables, grids, and the
   secondary-reference band roles (MADRE cream, GFW plum, WGC policy).

   Evidence: RECON/refs/css/wedo.css and RECON/refs/wedo-home.html.
   ========================================================================== */

/* The standalone .and connector (outside a .display line) gets the same
   hand-drawn strokes above and below. */
.and::before,.and::after{
  content:"";position:absolute;left:0;right:0;height:.1em;
  background:url("../img/strokes/underlineSm.svg") center/100% 100% no-repeat;
  pointer-events:none;
}
.and::before{top:-.1em}
.and::after{bottom:-.12em;transform:rotate(180deg)}
.band-ink .and::before,.band-ink .and::after,
.band-plum .and::before,.band-plum .and::after,
.band-violet .and::before,.band-violet .and::after,
.photo-band .and::before,.photo-band .and::after,
.cta-band .and::before,.cta-band .and::after{filter:brightness(0) invert(1)}

/* Section-head tones. The reference prints some heads in brand green
   (`text-green`) and some in ink (`text-black`). */
.sec-head--green .display{color:var(--green)}
.sec-head--ink .display{color:var(--ink)}
.sec-head--off .display{color:var(--offwhite)}
.band-ink .sec-head .display,.band-plum .sec-head .display,
.band-violet .sec-head .display,.photo-band .sec-head .display{color:var(--offwhite)}
.band-green .sec-head .display{color:var(--ink)}
.band-green .sec-head .display .and::before,
.band-green .sec-head .display .and::after{filter:none}

/* Interior hero: the heading takes the band's colour role. */
.page-hero .display{color:var(--green-text)}
.page-hero.band-ink .display,.page-hero.band-plum .display,
.page-hero.band-violet .display{color:var(--offwhite)}
.page-hero.band-green .display{color:var(--ink)}
.page-hero.band-yellow .display{color:var(--on-yellow)}
.page-hero.band-cream .display{color:var(--violet)}
.page-hero.band-cream .page-hero__lede,.page-hero.band-cream .kicker{color:var(--violet)}
.page-hero.band-policy .display{color:var(--green-text)}
.page-hero.band-policy .page-hero__lede{color:var(--policy-ink)}
.page-hero.band-ink .display .and::before,
.page-hero.band-ink .display .and::after,
.page-hero.band-plum .display .and::before,
.page-hero.band-plum .display .and::after,
.page-hero.band-violet .display .and::before,
.page-hero.band-violet .display .and::after{filter:brightness(0) invert(1)}
.page-hero.band-green .display .and::before,
.page-hero.band-green .display .and::after{filter:none}
.page-hero.band-green .page-hero__lede,.page-hero.band-green .kicker{color:var(--on-green)}
.page-hero.band-ink .page-hero__lede,.page-hero.band-plum .page-hero__lede,
.page-hero.band-violet .page-hero__lede{color:var(--offwhite)}
.page-hero.band-yellow .page-hero__lede{color:var(--on-yellow)}

/* ------------------------------------------------------------ colour row */
/* The reference's black-band row: four flat colour blocks, an outlined
   eyebrow, a serif line, and a black circular badge that turns green. */
.colour-grid{display:grid;gap:1.5rem;grid-template-columns:1fr;position:relative;z-index:2}
@media (min-width:768px){.colour-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.colour-card{
  display:flex;flex-direction:column;justify-content:space-between;gap:2rem;
  padding:1rem;min-height:10rem;border-radius:var(--r-card);
  transition:background var(--t) var(--ease),color var(--t) var(--ease);
}
@media (min-width:768px){.colour-card{padding:1.5rem}}
.colour-card--orange{background:var(--orange);color:var(--on-orange)}
.colour-card--yellow{background:var(--yellow);color:var(--on-yellow)}
.colour-card--green{background:var(--green-text);color:var(--white)}
.colour-card--purple{background:var(--purple);color:var(--on-purple)}
.colour-card--blue{background:var(--blue);color:var(--white)}
.colour-card--burgundy{background:var(--burgundy);color:var(--white)}
.colour-card:hover{background:var(--ink);color:var(--offwhite)}
.colour-card__eyebrow{
  align-self:flex-start;border:1px solid currentColor;border-radius:var(--r-eyebrow);
  padding:.125rem .5rem;font-size:.75rem;line-height:1.25;font-weight:600;
}
.colour-card__title{
  display:block;font-size:1.0625rem;line-height:1.25;flex:1;
}
@media (min-width:1024px){.colour-card__title{font-size:1.125rem}}
.colour-card__foot{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.colour-card__more{font-weight:500;line-height:1.25}
.colour-card .circle-btn{background:var(--ink);color:var(--offwhite)}
.colour-card:hover .circle-btn{background:var(--green);color:var(--white)}

/* --------------------------------------------------------- partner wall */
/* The reference's coalition wall. Cells with no mark print their name in
   the serif face rather than faking a logo. */
.logo-wall{
  display:grid;gap:1rem;grid-template-columns:repeat(2,minmax(0,1fr));
}
@media (min-width:768px){
  .logo-wall{grid-template-columns:repeat(4,minmax(0,1fr));gap:1.5rem}
  .logo-wall--3{grid-template-columns:repeat(3,minmax(0,1fr))}
  .logo-wall--5{grid-template-columns:repeat(5,minmax(0,1fr))}
}
.logo-wall__cell{
  display:grid;place-items:center;text-align:center;
  min-height:6rem;padding:1rem;background:var(--white);color:var(--ink);
  border-bottom:4px solid transparent;
  transition:border-color var(--t) var(--ease);
}
@media (min-width:768px){.logo-wall__cell{min-height:7.5rem;padding:1.5rem}}
.logo-wall__cell img{max-width:100%;max-height:4rem;width:auto;height:auto;object-fit:contain}
.logo-wall__cell--text{
  font-family:var(--serif);font-weight:600;font-size:1rem;line-height:1.25;
  text-wrap:balance;
}
.logo-wall__cell:hover{border-bottom-color:var(--green)}
.band-offwhite .logo-wall__cell{background:var(--white)}
.band-ink .logo-wall__cell{background:rgba(248,246,246,.09);color:var(--offwhite)}
.band-ink .logo-wall__cell:hover{border-bottom-color:var(--yellow)}

/* ------------------------------------------------------------ accordion */
/* Reference language: a white block per row, a display numeral in green on
   the left, Denim for the question. */
.acc{display:grid;grid-template-columns:minmax(0,1fr);gap:.75rem}
.acc__item{background:var(--white);color:var(--ink);border-left:8px solid transparent;transition:border-color var(--t) var(--ease)}
.acc__item.is-open{border-left-color:var(--green)}
.acc__btn{
  width:100%;display:grid;grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;gap:1rem;text-align:left;
  background:transparent;border:0;cursor:pointer;
  padding:1.25rem;font-weight:500;font-size:1.0625rem;line-height:1.3;
  min-height:3.5rem;color:var(--ink);
}
.acc__btn:hover{background:var(--offwhite)}
.acc__num{
  font-family:var(--display);font-weight:600;font-size:1.25rem;line-height:1.04;
  color:var(--green-text);
}
.acc__ico{
  position:relative;width:1rem;height:1rem;flex:0 0 auto;
}
.acc__ico::before,.acc__ico::after{
  content:"";position:absolute;background:var(--green);transition:transform var(--t) var(--ease);
}
.acc__ico::before{left:0;right:0;top:calc(50% - 1px);height:2px}
.acc__ico::after{top:0;bottom:0;left:calc(50% - 1px);width:2px}
.acc__item.is-open .acc__ico::after{transform:scaleY(0)}
.acc__panel{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--t) var(--ease)}
.acc__item.is-open .acc__panel{grid-template-rows:1fr}
.acc__panel>div{overflow:hidden}
.acc__inner{padding:0 1.25rem 1.25rem 3.5rem;max-width:72ch}
.acc__inner p{font-size:1rem;line-height:1.6;text-wrap:pretty}
.band-ink .acc__item,.band-plum .acc__item{background:rgba(248,246,246,.07)}
.band-ink .acc__btn,.band-plum .acc__btn{color:var(--offwhite)}
.band-ink .acc__btn:hover,.band-plum .acc__btn:hover{background:rgba(248,246,246,.1)}
.band-ink .acc__num,.band-plum .acc__num{color:var(--yellow)}
.band-ink .acc__ico::before,.band-ink .acc__ico::after,
.band-plum .acc__ico::before,.band-plum .acc__ico::after{background:var(--yellow)}
.band-ink .acc__item.is-open,.band-plum .acc__item.is-open{border-left-color:var(--yellow)}

/* ------------------------------------------------------------- timeline */
.timeline{display:grid;grid-template-columns:minmax(0,1fr);gap:1.5rem}
.tl-item{
  display:grid;grid-template-columns:auto minmax(0,1fr);gap:1.25rem;
  align-items:start;padding-bottom:1.5rem;border-bottom:1px solid var(--ink-12);
}
@media (min-width:768px){.tl-item{gap:2rem;padding-bottom:2rem}}
.tl-item__stage{
  font-family:var(--display);font-weight:600;font-size:1.75rem;line-height:1.04;
  color:var(--green);min-width:2.5rem;
}
@media (min-width:768px){.tl-item__stage{font-size:2.5rem;min-width:3.5rem}}
.tl-item__title{
  font-family:var(--serif);font-weight:600;font-size:1.25rem;line-height:1.25;
  margin-bottom:.5rem;
}
.tl-item p:not(.tag-line){font-size:1rem;line-height:1.55;max-width:70ch}
.band-ink .tl-item,.band-plum .tl-item{border-bottom-color:var(--off-20)}
.band-ink .tl-item__stage,.band-plum .tl-item__stage{color:var(--yellow)}

/* ------------------------------------------------------------- explorer */
.explorer{display:grid;grid-template-columns:minmax(0,1fr);gap:2rem}
@media (min-width:1024px){
  .explorer{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);align-items:start;gap:3rem}
}
.explorer__map{
  position:relative;background:var(--offwhite);padding:1rem;
}
.band-offwhite .explorer__map{background:var(--white)}
.explorer__mapinner{position:relative;width:100%}
.explorer__mapinner img{width:100%;height:auto;display:block}
.hotspot{
  position:absolute;transform:translate(-50%,-50%);
  width:2.75rem;height:2.75rem;border-radius:var(--pill);
  border:2px solid var(--green);background:var(--white);color:var(--green-text);
  font-family:var(--display);font-weight:600;font-size:1rem;line-height:1.04;
  display:grid;place-items:center;cursor:pointer;
  transition:background var(--t) var(--ease),color var(--t) var(--ease);
}
.hotspot:hover{background:var(--green);color:var(--white)}
.hotspot[aria-pressed="true"]{background:var(--green-text);color:var(--white)}
.hotspot[aria-pressed="true"]::after{
  content:"";position:absolute;inset:-.5rem;border:2px solid var(--green);
  border-radius:var(--pill);
}
.explorer__list{display:flex;flex-wrap:wrap;gap:.5rem}
.explorer__panel{display:grid;gap:1rem}
.explorer__panel h3{
  font-family:var(--serif);font-weight:600;font-size:1.5rem;line-height:1.2;
}
.explorer__panel p{font-size:1rem;line-height:1.55;max-width:60ch}

/* ---------------------------------------------------------------- split */
.split{display:grid;grid-template-columns:minmax(0,1fr);gap:2rem}
@media (min-width:1024px){
  .split{grid-template-columns:repeat(2,minmax(0,1fr));gap:4rem;align-items:start}
  .split--wide-left{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr)}
}
.split h2{max-width:22ch}
.split h3{font-family:var(--serif);font-weight:600;font-size:1.25rem;line-height:1.25}
.flow-md{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem}
.flow-md p{font-size:1.0625rem;line-height:1.6;max-width:64ch;text-wrap:pretty}
.media-frame{position:relative;overflow:hidden;background:var(--blue-light)}
.media-frame img{width:100%;height:100%;object-fit:cover}

/* ----------------------------------------------------------- grid shims */
.card-grid{display:grid;gap:1.5rem;grid-template-columns:minmax(0,1fr)}
.grid-2{display:grid;gap:1.5rem;grid-template-columns:minmax(0,1fr)}
.grid-3{display:grid;gap:1.5rem;grid-template-columns:minmax(0,1fr)}
.tiles{display:grid;gap:1.5rem;grid-template-columns:minmax(0,1fr)}
@media (min-width:640px){
  .card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:1024px){
  .card-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .card-grid--4{grid-template-columns:repeat(4,minmax(0,1fr))}
  .grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
  .tiles{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (min-width:768px){.card-grid,.grid-2,.grid-3,.tiles{gap:2rem}}
.card__foot{
  margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:1rem;
}
.card__ico--ink{background:var(--ink);color:var(--offwhite)}
.tile__title{font-family:var(--serif);font-weight:600;font-size:1.25rem;line-height:1.2}
.news-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:2rem}
.news-list{display:grid;grid-template-columns:minmax(0,1fr);gap:1.5rem}

/* --------------------------------------------------------------- subnav */
.subnav{
  position:sticky;top:5rem;z-index:90;
  background:var(--offwhite);border-bottom:1px solid var(--ink-12);
}
.subnav__inner{
  width:100%;max-width:var(--wrap-wide);margin-inline:auto;
  padding:.5rem var(--gut);
  display:flex;gap:.5rem;overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
@media (min-width:768px){.subnav__inner{padding-inline:var(--gut-md)}}
@media (min-width:1024px){.subnav__inner{padding-inline:var(--gut-lg)}}
.subnav__inner a{
  flex:0 0 auto;padding:.5rem .875rem;border-radius:var(--pill);
  font-size:.8125rem;font-weight:500;line-height:1;white-space:nowrap;
  transition:background var(--t) var(--ease),color var(--t) var(--ease);
}
.subnav__inner a:hover{background:var(--ink);color:var(--offwhite)}

/* ------------------------------------------------------------ pullquote */
.pullquote{
  font-family:var(--serif);font-weight:600;line-height:1.2;
  font-size:1.5rem;max-width:34ch;margin-inline:auto;text-wrap:balance;
}
@media (min-width:768px){.pullquote{font-size:2.25rem}}
@media (min-width:1024px){.pullquote{font-size:2.75rem}}
.band-yellow .pullquote{color:var(--on-yellow)}
.band-ink .pullquote,.band-plum .pullquote{color:var(--offwhite)}
.kicker--plain{color:inherit;opacity:.85}

/* --------------------------------------------------------------- tables */
.tbl-wrap{overflow-x:auto;background:var(--white);border:1px solid var(--ink-12)}
.tbl{width:100%;min-width:32rem;border-collapse:collapse;font-size:.9375rem}
.tbl caption{
  caption-side:top;text-align:left;padding:1rem;
  font-size:.75rem;font-weight:500;letter-spacing:.1em;text-transform:uppercase;
  color:var(--ink-70);
}
.tbl th{
  background:var(--blue-light);color:var(--ink);text-align:left;
  padding:1rem;font-weight:500;line-height:1.25;
}
.tbl td{padding:1rem;border-top:1px solid var(--ink-12);vertical-align:top;line-height:1.5}
.tbl tbody tr:nth-child(odd){background:var(--offwhite)}
.band-ink .tbl-wrap,.band-plum .tbl-wrap{background:rgba(248,246,246,.06);border-color:var(--off-20)}
.band-ink .tbl th,.band-plum .tbl th{background:rgba(248,246,246,.14);color:var(--offwhite)}
.band-ink .tbl td,.band-plum .tbl td{border-top-color:var(--off-20);color:var(--offwhite)}
.band-ink .tbl tbody tr:nth-child(odd),
.band-plum .tbl tbody tr:nth-child(odd){background:transparent}
.band-ink .tbl caption,.band-plum .tbl caption{color:var(--off-70)}

/* ------------------------------------------------------------ utilities */
.wrap--narrow{max-width:48rem}
.sec--flush-top{padding-top:0}
.band-paper{background:var(--offwhite);border-left-color:var(--green)}
.small{font-size:.875rem;line-height:1.5}
.mt-32{margin-top:2rem}
.mt-56{margin-top:3.5rem}
.tag-line{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.5rem}
.tag--muted{background:var(--offwhite);color:var(--ink-70);border:1px solid var(--ink-12)}
.band-ink .tag--muted,.band-plum .tag--muted{
  background:rgba(248,246,246,.1);color:var(--offwhite);border-color:var(--off-20);
}
.h-emph{color:var(--green);max-width:26ch}
.field__hint{display:block;font-size:.8125rem;color:var(--ink-70);margin-bottom:.35rem}
.band-ink .field__hint{color:var(--off-70)}
.head-actions{display:flex;align-items:center;gap:1rem;flex:0 0 auto}
.band-note{
  margin-top:2rem;font-size:.8125rem;line-height:1.55;color:var(--ink-70);max-width:70ch;
}
.band-ink .band-note,.band-plum .band-note{color:var(--off-70)}
.band-green .band-note{color:rgba(20,16,20,.8)}

/* The photo overlay chip used on cards that must not crop their subject. */
.feature-card__media--tall{aspect-ratio:auto;min-height:17.5rem}
.feature-card__body--static{position:static;background:var(--white);color:var(--ink)}
.feature-card__body--static h3,.feature-card__body--static h3 a{color:var(--ink)}
.feature-card__body--static>p{color:var(--ink-70)}

@media (max-width:639px){
  .acc__inner{padding-left:1.25rem}
  .tl-item__stage{font-size:1.5rem;min-width:2rem}
}

/* ------------------------------------------------------- system closure */
/* Explicit split modifier (the base .sec-head is already a split row; this
   names the intent so a future edit cannot quietly change it). */
.sec-head--split{justify-content:space-between}
.sec-head--split .sec-head__text{flex:1 1 22rem}

/* Cohort counts for the partner and coalition walls. */
.logo-grid--3{grid-template-columns:repeat(2,minmax(0,1fr))}
.logo-grid--4{grid-template-columns:repeat(2,minmax(0,1fr))}
.logo-grid--5{grid-template-columns:repeat(2,minmax(0,1fr))}
@media (min-width:768px){
  .logo-grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}
  .logo-grid--4{grid-template-columns:repeat(4,minmax(0,1fr))}
  .logo-grid--5{grid-template-columns:repeat(5,minmax(0,1fr))}
}
@media (min-width:768px){
  .logo-wall--4{grid-template-columns:repeat(4,minmax(0,1fr))}
}

/* Eyebrow tones the page vocabulary asks for. */
.eyebrow-pill--green{background:var(--green-text);color:var(--white)}
.eyebrow-pill--burgundy{background:var(--burgundy);color:var(--white)}
.eyebrow-pill--plum{background:var(--plum);color:var(--offwhite)}

/* Demonstrably inert forms: the class is a JavaScript hook, and it also
   stacks the fields so a no-JS browser still sees a usable form. */
.js-form{display:grid;grid-template-columns:minmax(0,1fr);gap:1.25rem}

/* ---------------------------------------------------------------- search */
.search-form{display:flex;flex-wrap:wrap;gap:.75rem;align-items:flex-end}
.search-form .field{flex:1 1 20rem}
.search-results{display:grid;gap:1.25rem;margin-top:2rem}
.search-result{border:1px solid var(--ink-12);background:var(--offwhite);padding:1.25rem}
.search-result__page{
  font-size:.75rem;font-weight:500;text-transform:uppercase;letter-spacing:.1em;
  color:var(--green-text);margin-bottom:.4rem;
}
.search-result h3{font-family:var(--serif);font-size:1.25rem;line-height:1.25;margin-bottom:.4rem}
.search-result h3 a{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}
.search-result p{font-size:.9375rem;line-height:1.55}
.search-result mark{background:var(--yellow);color:inherit;padding:0 .15em}

/* ==========================================================================
   MOBILE ERGONOMICS
   Touch targets on a phone, a shorter sticky header, and the sub-nav pinned
   to exactly that header's height so its chips never slide underneath it.
   ========================================================================== */

/* 44px minimum for every control that is not a link inside running prose
   (WCAG 2.5.8 asks for 24px; Apple and Google both ask for 44px). */
.subnav__inner a{display:inline-flex;align-items:center;min-height:2.75rem;padding:.5rem 1rem}
.footer__cols a{display:flex;align-items:center;min-height:2.75rem;padding:.25rem 0}
.footer__legal a,.footer__contact a{display:inline-flex;align-items:center;min-height:2.75rem}
.drawer__panel a{display:flex;align-items:center;min-height:2.75rem;padding:.25rem 0}
.arrow-link{min-height:2.75rem}

/* A 99px header is 12% of a small phone screen before any content appears. */
@media (max-width:767px){
  :root{--masthead-h:4rem}
  .brand__mark{width:3rem;height:3rem}
}
/* +1px for the masthead's own bottom border, so the two never overlap. */
.subnav{top:calc(var(--masthead-h) + 1px)}

/* The campaigns feature card was a two-column grid at every width, which left
   a 130px copy column on a 320px screen. */
.feature-card--split{display:grid;grid-template-columns:minmax(0,1fr)}
@media (min-width:768px){
  .feature-card--split{grid-template-columns:minmax(0,1.05fr) minmax(0,1fr)}
}

/* iOS Safari inflates body text in landscape unless told not to, and a tap
   should still give visible feedback. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
a,button,input,select,textarea{-webkit-tap-highlight-color:rgba(33,153,72,.16)}

/* Anchor targets must not land under the sticky header — this is what the
   sub-nav chips and every in-page link jump to. */
html{scroll-padding-top:calc(var(--masthead-h) + 1.5rem)}

/* Card "Continue" links were 24px tall. */
.more{display:inline-flex;align-items:center;min-height:2.75rem}

