/* SGC · single-field art reset
   Cross-project canon: one dark / chromatic content field maximum, atlas exempt.
   Hero remains photographic; shared shell/footer are untouched.
   SGC-01 is the sole signature colour field and uses the project highlight hue. */

body.sgc-r58 {
  --sgc58-accent: #8b5a46;
  --sgc58-accent-strong: #744435;
  --sgc58-accent-on-field: #fff3e8;
  --sgc58-panel: var(--sgc58-accent);
  --sgc58-rose: var(--sgc58-accent);
}

/* ---------- Context: documentary rather than componentised ---------- */
body.sgc-r58 .sgc-r58-context {
  padding-bottom: clamp(72px, 7.5vw, 112px);
}

body.sgc-r58 .sgc-r58-context__head {
  grid-template-columns: minmax(0, .88fr) minmax(320px, .66fr);
  gap: clamp(46px, 8vw, 126px);
}

body.sgc-r58 .sgc-r58-context__copy {
  align-self: end;
  gap: 20px;
}

/* Real Sundarbans cleanup photography. Source: World Bank, Katka beach cleanup. */
body.sgc-r58 .sgc-r58-context__head::after {
  content: "";
  grid-column: 1 / -1;
  min-height: clamp(300px, 34vw, 520px);
  margin-top: clamp(24px, 3vw, 42px);
  border: 0;
  background:
    linear-gradient(90deg, rgba(20,32,28,.10), transparent 44%, rgba(20,32,28,.18)),
    linear-gradient(180deg, transparent 58%, rgba(20,32,28,.22)),
    url("https://s7d1.scene7.com/is/image/wbcollab/Mercy?fmt=webp&qlt=90&resMode=sharp2&w=1800") center 54% / cover no-repeat;
  filter: saturate(.78) contrast(1.03);
}

body.sgc-r58 .sgc-r58-context__human {
  max-width: 50ch;
}

/* ---------- Atlas: exempt neutral evidence plate ---------- */
body.sgc-r58 .sgc-r58-atlas {
  grid-template-columns: minmax(0, 1.34fr) minmax(270px, .48fr);
  min-height: 500px;
  margin-top: clamp(54px, 6vw, 84px);
  background: #e8e3d8;
}

body.sgc-r58 .sgc-r58-atlas__field {
  min-height: 500px;
  background:
    radial-gradient(circle at 36% 66%, rgba(139,90,70,.10), transparent 20%),
    linear-gradient(135deg, #e3e5de 0%, #ece9e0 62%, #e5dfd4 100%);
}

body.sgc-r58 .sgc-r58-atlas__field::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0 64%, rgba(20,32,28,.035) 100%);
}

body.sgc-r58 .sgc-r58-atlas__map {
  top: -5%;
  left: -1%;
  width: 68%;
  height: 110%;
  opacity: .91;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: multiply;
  filter: contrast(.94) saturate(.68);
}

body.sgc-r58 .sgc-r58-atlas__focus {
  left: 35.5%;
  top: 66%;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--sgc58-accent);
  background: rgba(139,90,70,.08);
  box-shadow: 0 0 0 7px rgba(139,90,70,.04);
}

body.sgc-r58 .sgc-r58-atlas__focus::after {
  left: calc(100% + 10px);
  width: clamp(88px, 11vw, 150px);
  background: var(--sgc58-accent);
  opacity: .78;
}

body.sgc-r58 .sgc-r58-atlas__label--southwest {
  left: 54%;
  top: 56%;
}

body.sgc-r58 .sgc-r58-atlas__label span {
  color: #696b64;
}

body.sgc-r58 .sgc-r58-atlas__label strong {
  max-width: 11ch;
  color: var(--sgc58-ink);
  font-size: clamp(1.7rem, 2.35vw, 2.5rem);
}

body.sgc-r58 .sgc-r58-atlas__note {
  position: relative;
  z-index: 2;
  align-content: center;
  gap: 16px;
  padding: clamp(32px, 3.4vw, 50px);
  background: rgba(242,238,229,.82);
  backdrop-filter: blur(4px);
}

body.sgc-r58 .sgc-r58-atlas__boundary {
  color: var(--sgc58-accent) !important;
}

/* ---------- EPR: paper interruption, not a second colour field ---------- */
body.sgc-r58 .sgc-r58-epr {
  padding: clamp(72px, 7vw, 100px) 0;
  background: var(--sgc58-paper-soft);
}

body.sgc-r58 .sgc-r58-epr__grid {
  grid-template-columns: minmax(220px, .43fr) minmax(0, 1fr);
  gap: clamp(46px, 6vw, 86px);
  align-items: end;
}

body.sgc-r58 .sgc-r58-epr__date strong {
  color: var(--sgc58-accent);
  font-size: clamp(4.8rem, 7vw, 7.5rem);
}

body.sgc-r58 .sgc-r58-epr__date span,
body.sgc-r58 .sgc-r58-kicker {
  color: var(--sgc58-accent);
}

body.sgc-r58 .sgc-r58-epr__copy h2 {
  max-width: 17ch;
  text-wrap: balance;
}

body.sgc-r58 .sgc-r58-sources {
  margin-top: 20px;
  padding-top: 12px;
  gap: 0 18px;
}

body.sgc-r58 .sgc-r58-sources span,
body.sgc-r58 .sgc-r58-sources a {
  min-height: 40px;
  font-size: .8rem;
  line-height: 1.45;
}

/* ---------- SGC-01: sole signature colour field ---------- */
body.sgc-r58 .sgc-r58-lot {
  padding: clamp(84px, 8vw, 124px) 0 clamp(92px, 9vw, 138px);
  background: var(--sgc58-panel);
  color: #fff;
}

body.sgc-r58 .sgc-r58-lot .sgc-r58-title,
body.sgc-r58 .sgc-r58-step h3,
body.sgc-r58 .sgc-r58-passport__meta strong {
  color: #fff;
}

body.sgc-r58 .sgc-r58-lot .sgc-r58-copy,
body.sgc-r58 .sgc-r58-step__lead {
  color: rgba(255,255,255,.82);
}

body.sgc-r58 .sgc-r58-lot .sgc-r58-kicker,
body.sgc-r58 .sgc-r58-passport__state,
body.sgc-r58 .sgc-r58-step__index,
body.sgc-r58 .sgc-r58-step__boundary strong {
  color: var(--sgc58-accent-on-field);
}

body.sgc-r58 .sgc-r58-lot__intro {
  grid-template-columns: minmax(0, 1.02fr) minmax(300px, .55fr);
  gap: clamp(46px, 7vw, 104px);
  margin-bottom: clamp(50px, 5.5vw, 76px);
  align-items: end;
}

body.sgc-r58 .sgc-r58-lot__intro .sgc-r58-title {
  max-width: 13ch;
}

body.sgc-r58 .sgc-r58-lot__intro .sgc-r58-copy {
  max-width: 45ch;
}

body.sgc-r58 .sgc-r58-lot__layout {
  grid-template-columns: minmax(290px, .5fr) minmax(0, 1fr);
  gap: clamp(52px, 7vw, 104px);
}

body.sgc-r58 .sgc-r58-passport {
  min-height: 390px;
  grid-template-rows: auto 1fr auto;
  padding: 0 0 24px;
  border: 0;
  border-top: 1px solid rgba(255,255,255,.34);
  border-bottom: 1px solid rgba(255,255,255,.24);
  background: transparent;
  box-shadow: none;
}

body.sgc-r58 .sgc-r58-passport > .sgc-r58-passport__image {
  display: none;
}

body.sgc-r58 .sgc-r58-passport__mast {
  display: grid;
  justify-content: stretch;
  gap: 12px;
  padding: 22px 0 26px;
  border-bottom: 0;
}

body.sgc-r58 .sgc-r58-passport__meta {
  gap: 8px;
}

body.sgc-r58 .sgc-r58-passport__meta span {
  color: rgba(255,255,255,.58);
}

body.sgc-r58 .sgc-r58-passport__meta strong {
  font-size: clamp(5rem, 7.5vw, 8rem);
  line-height: .82;
  letter-spacing: -.058em;
}

body.sgc-r58 .sgc-r58-passport__state {
  max-width: none;
  text-align: left;
  font-size: .65rem;
  letter-spacing: .065em;
}

body.sgc-r58 .sgc-r58-passport__chain {
  align-self: end;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.22);
}

body.sgc-r58 .sgc-r58-passport__chain span {
  padding: 0 12px 0 0;
  color: rgba(255,255,255,.46);
  font-size: .66rem;
  text-align: left;
}

body.sgc-r58 .sgc-r58-passport__chain span::before {
  display: none;
}

body.sgc-r58 .sgc-r58-passport[data-active-step="origin"] [data-passport-node="origin"],
body.sgc-r58 .sgc-r58-passport[data-active-step="custody"] [data-passport-node="custody"],
body.sgc-r58 .sgc-r58-passport[data-active-step="acceptance"] [data-passport-node="acceptance"],
body.sgc-r58 .sgc-r58-passport[data-active-step="settlement"] [data-passport-node="settlement"] {
  color: #fff;
}

body.sgc-r58 .sgc-r58-passport[data-active-step="custody"] [data-passport-node="origin"],
body.sgc-r58 .sgc-r58-passport[data-active-step="acceptance"] [data-passport-node="origin"],
body.sgc-r58 .sgc-r58-passport[data-active-step="acceptance"] [data-passport-node="custody"],
body.sgc-r58 .sgc-r58-passport[data-active-step="settlement"] [data-passport-node="origin"],
body.sgc-r58 .sgc-r58-passport[data-active-step="settlement"] [data-passport-node="custody"],
body.sgc-r58 .sgc-r58-passport[data-active-step="settlement"] [data-passport-node="acceptance"] {
  color: rgba(255,255,255,.72);
}

body.sgc-r58 .sgc-r58-step {
  min-height: 46vh;
  padding: clamp(36px, 4.3vw, 56px) 0;
  border-top-color: rgba(255,255,255,.22);
}

body.sgc-r58 .sgc-r58-step:first-child {
  padding-top: 0;
}

body.sgc-r58 .sgc-r58-step__lead {
  margin: 12px 0 20px;
  max-width: 50ch;
}

body.sgc-r58 .sgc-r58-fields {
  border-top-color: rgba(255,255,255,.24);
}

body.sgc-r58 .sgc-r58-fields div {
  padding: 13px 0;
  border-bottom-color: rgba(255,255,255,.18);
}

body.sgc-r58 .sgc-r58-fields dt {
  color: rgba(255,255,255,.58);
}

body.sgc-r58 .sgc-r58-fields dd {
  color: rgba(255,255,255,.93);
}

body.sgc-r58 .sgc-r58-step__boundary {
  color: rgba(255,255,255,.70);
}

body.sgc-r58 .sgc-r58-step[data-sgc-r58-step="acceptance"] > .sgc-r58-passport__image {
  min-height: 190px;
  max-height: 220px;
  margin: 18px 0 20px;
}

body.sgc-r58 .sgc-r58-step[data-sgc-r58-step="acceptance"] > .sgc-r58-passport__image img {
  min-height: 190px;
  max-height: 220px;
  object-position: center 52%;
}

/* ---------- Proof / allocation return to paper ---------- */
body.sgc-r58 .sgc-r58-proof {
  background: var(--sgc58-paper);
}

body.sgc-r58 .sgc-r58-proof__head,
body.sgc-r58 .sgc-r58-allocation__head {
  gap: clamp(40px, 6vw, 88px);
}

body.sgc-r58 .sgc-r58-proof__grid {
  margin-top: clamp(38px, 4.4vw, 58px);
}

body.sgc-r58 .sgc-r58-proof__item {
  padding-top: 28px;
  padding-bottom: 31px;
}

body.sgc-r58 .sgc-r58-proof__icon {
  margin-bottom: 28px;
  stroke: var(--sgc58-accent);
}

body.sgc-r58 .sgc-r58-proof__item h3 {
  max-width: 20ch;
  font-size: clamp(1.4rem, 1.8vw, 1.9rem);
  text-wrap: balance;
}

body.sgc-r58 .sgc-r58-gate {
  margin-top: clamp(30px, 3.5vw, 46px);
  padding: clamp(22px, 2.7vw, 34px) 0;
  border-top: 1px solid var(--sgc58-accent);
}

body.sgc-r58 .sgc-r58-gate span {
  color: var(--sgc58-accent);
}

body.sgc-r58 .sgc-r58-allocation {
  background: var(--sgc58-paper-soft);
}

body.sgc-r58 .sgc-r58-allocation__bar {
  margin-top: clamp(34px, 4vw, 52px);
}

body.sgc-r58 .sgc-r58-allocation__bar i,
body.sgc-r58 .sgc-r58-allocation.is-visible .sgc-r58-allocation__bar i {
  transform: scaleX(1) !important;
  transition: none !important;
}

/* ---------- Decision: light editorial close, not another dark panel ---------- */
body.sgc-r58 .sgc-r58-decision {
  padding: clamp(86px, 9vw, 132px) 0;
  background: var(--sgc58-paper);
  color: var(--sgc58-ink);
  border-top: 1px solid var(--sgc58-line);
}

body.sgc-r58 .sgc-r58-decision__grid {
  grid-template-columns: minmax(0, .9fr) minmax(300px, .52fr);
  gap: clamp(44px, 7vw, 104px);
}

body.sgc-r58 .sgc-r58-decision h2 {
  max-width: 14ch;
  color: var(--sgc58-ink);
  text-wrap: balance;
}

body.sgc-r58 .sgc-r58-decision__ask p {
  max-width: 40ch;
  color: var(--sgc58-muted);
}

body.sgc-r58 .sgc-r58-decision__ask .btn.primary {
  border-color: var(--sgc58-accent);
  background: var(--sgc58-accent);
  color: #fff;
  box-shadow: none;
}

body.sgc-r58 .sgc-r58-decision__ask .btn.primary:hover,
body.sgc-r58 .sgc-r58-decision__ask .btn.primary:focus-visible {
  border-color: var(--sgc58-accent-strong);
  background: transparent;
  color: var(--sgc58-accent-strong);
}

/* ---------- Motion: material moves, evidence settles ---------- */
body.sgc-r58.sgc-r58-motion-ready .sgc-r58-atlas .sgc-r58-atlas__focus {
  opacity: 0;
  transform: scale(.9);
  transition: opacity 360ms ease, transform 520ms cubic-bezier(.16,1,.3,1);
}

body.sgc-r58.sgc-r58-motion-ready .sgc-r58-atlas .sgc-r58-atlas__focus::after {
  transform: scaleX(.25);
  transform-origin: left;
  transition: transform 520ms 90ms cubic-bezier(.16,1,.3,1);
}

body.sgc-r58.sgc-r58-motion-ready .sgc-r58-atlas .sgc-r58-atlas__label--southwest {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 360ms 110ms ease, transform 520ms 110ms cubic-bezier(.16,1,.3,1);
}

body.sgc-r58.sgc-r58-motion-ready .sgc-r58-atlas.is-visible .sgc-r58-atlas__focus,
body.sgc-r58.sgc-r58-motion-ready .sgc-r58-atlas.is-visible .sgc-r58-atlas__label--southwest {
  opacity: 1;
  transform: none;
}

body.sgc-r58.sgc-r58-motion-ready .sgc-r58-atlas.is-visible .sgc-r58-atlas__focus::after {
  transform: scaleX(1);
}

body.sgc-r58.sgc-r58-motion-ready .sgc-r58-epr .sgc-r58-epr__copy {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 380ms ease, transform 560ms cubic-bezier(.16,1,.3,1);
}

body.sgc-r58.sgc-r58-motion-ready .sgc-r58-epr.is-visible .sgc-r58-epr__copy {
  opacity: 1;
  transform: none;
}

body.sgc-r58 .sgc-r58-passport__chain span {
  transition: color 220ms ease;
}

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
  body.sgc-r58 .sgc-r58-context__head::after {
    min-height: clamp(280px, 42vw, 390px);
    background-position: 48% 54%;
  }

  body.sgc-r58 .sgc-r58-atlas {
    grid-template-columns: minmax(0, 1.1fr) minmax(250px, .55fr);
    min-height: 440px;
  }

  body.sgc-r58 .sgc-r58-atlas__field { min-height: 440px; }
  body.sgc-r58 .sgc-r58-atlas__map { width: 73%; left: -4%; }
  body.sgc-r58 .sgc-r58-atlas__focus { left: 35%; top: 66%; }
  body.sgc-r58 .sgc-r58-atlas__label--southwest { left: 55%; top: 55%; }

  body.sgc-r58 .sgc-r58-epr__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  body.sgc-r58 .sgc-r58-epr__date {
    display: flex;
    align-items: baseline;
    gap: 18px;
  }

  body.sgc-r58 .sgc-r58-lot__intro,
  body.sgc-r58 .sgc-r58-decision__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  body.sgc-r58 .sgc-r58-lot__layout {
    grid-template-columns: minmax(250px, .46fr) minmax(0, 1fr);
    gap: 40px;
  }

  body.sgc-r58 .sgc-r58-proof__item {
    grid-template-columns: 38px minmax(0,.45fr) minmax(0,1fr);
    gap: 18px 22px;
  }
}

@media (max-width: 820px) {
  body.sgc-r58 .sgc-r58-lot__layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  body.sgc-r58 .sgc-r58-passport {
    position: relative;
    top: auto;
    min-height: 0;
    margin-bottom: 34px;
    padding-bottom: 22px;
  }

  body.sgc-r58 .sgc-r58-step {
    min-height: 0;
  }
}

/* ---------- Mobile ---------- */
@media (max-width: 719px) {
  body.sgc-r58 .sgc-r58-context__head::after {
    min-height: 250px;
    margin-top: 14px;
    background-position: 44% 54%;
  }

  body.sgc-r58 .sgc-r58-atlas {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  body.sgc-r58 .sgc-r58-atlas__field {
    min-height: 350px;
    background:
      radial-gradient(circle at 36% 67%, rgba(139,90,70,.10), transparent 22%),
      linear-gradient(145deg, #e4e5dd 0%, #ece9e0 62%, #e5dfd3 100%);
  }

  body.sgc-r58 .sgc-r58-atlas__map {
    top: -7%;
    left: -8%;
    width: 86%;
    height: 114%;
  }

  body.sgc-r58 .sgc-r58-atlas__focus {
    left: 36%;
    top: 67%;
    width: 40px;
    height: 40px;
  }

  body.sgc-r58 .sgc-r58-atlas__focus::after {
    width: clamp(54px, 16vw, 76px);
  }

  body.sgc-r58 .sgc-r58-atlas__label--southwest {
    left: 56%;
    top: 55%;
    max-width: 43%;
  }

  body.sgc-r58 .sgc-r58-atlas__note {
    padding: 26px 20px 28px;
    border-left: 0;
    border-top: 1px solid var(--sgc58-line);
    backdrop-filter: none;
  }

  body.sgc-r58 .sgc-r58-epr {
    padding: 34px 0 36px!important;
  }

  body.sgc-r58 .sgc-r58-epr__date {
    display: grid;
    gap: 4px;
  }

  body.sgc-r58 .sgc-r58-epr__date strong {
    font-size: clamp(4rem, 20vw, 5.55rem);
  }

  body.sgc-r58 .sgc-r58-epr__copy h2 {
    max-width: 16ch;
    font-size: clamp(1.85rem, 8.4vw, 2.45rem);
  }

  body.sgc-r58 .sgc-r58-sources span,
  body.sgc-r58 .sgc-r58-sources a {
    min-height: 44px;
    font-size: .78rem;
  }

  body.sgc-r58 .sgc-r58-lot {
    padding: 64px 0 72px;
  }

  body.sgc-r58 .sgc-r58-passport__mast {
    padding: 18px 0 22px;
  }

  body.sgc-r58 .sgc-r58-passport__meta strong {
    font-size: clamp(4rem, 19vw, 5.6rem);
  }

  body.sgc-r58 .sgc-r58-passport__chain {
    gap: 8px 14px;
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  body.sgc-r58 .sgc-r58-step {
    padding: 40px 0;
  }

  body.sgc-r58 .sgc-r58-step:first-child {
    padding-top: 24px;
  }

  body.sgc-r58 .sgc-r58-step[data-sgc-r58-step="acceptance"] > .sgc-r58-passport__image,
  body.sgc-r58 .sgc-r58-step[data-sgc-r58-step="acceptance"] > .sgc-r58-passport__image img {
    min-height: 190px;
    max-height: 220px;
  }

  body.sgc-r58 .sgc-r58-proof__item {
    grid-template-columns: 34px 1fr;
    gap: 16px;
    padding: 22px 0;
  }

  body.sgc-r58 .sgc-r58-decision {
    padding: 68px 0 76px;
  }

  body.sgc-r58 .sgc-r58-decision h2 {
    max-width: 15ch;
    font-size: clamp(2.45rem, 10.4vw, 3.45rem);
    line-height: .98;
  }

  body.sgc-r58 .r42-project-nav__title,
  body.sgc-r58 .project-subnav-noscript a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  body.sgc-r58.sgc-r58-motion-ready .sgc-r58-atlas .sgc-r58-atlas__focus,
  body.sgc-r58.sgc-r58-motion-ready .sgc-r58-atlas .sgc-r58-atlas__label--southwest,
  body.sgc-r58.sgc-r58-motion-ready .sgc-r58-epr .sgc-r58-epr__copy {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  body.sgc-r58.sgc-r58-motion-ready .sgc-r58-atlas .sgc-r58-atlas__focus::after,
  body.sgc-r58 .sgc-r58-passport__chain span {
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- No-JS fallback ---------- */
body.sgc-r58:has(.project-subnav-noscript) .cv-global-nav {
  background: var(--sgc58-paper);
}

body.sgc-r58:has(.project-subnav-noscript) #mobileMenuButton {
  display: none;
}

body.sgc-r58:has(.project-subnav-noscript) .cv-global-nav[data-cv-tone="overlay"]:not(.is-scrolled) {
  background: var(--cv-shell-paper, #f5f1e8) !important;
  color: var(--cv-shell-ink, #14201c) !important;
  border-bottom-color: var(--cv-shell-line, rgba(20,32,28,.14)) !important;
}

body.sgc-r58:has(.project-subnav-noscript) .cv-global-logo--primary {
  opacity: 1 !important;
}

body.sgc-r58:has(.project-subnav-noscript) .cv-global-logo--reverse {
  opacity: 0 !important;
}

@media (max-width: 719px) {
  body.sgc-r58 .project-subnav-noscript {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0 16px;
    align-items: center;
    margin-top: var(--global-nav-height, 56px);
    padding: 8px 20px 10px;
    border-bottom: 1px solid var(--sgc58-line);
    background: var(--sgc58-paper);
    color: var(--sgc58-ink);
  }

  body.sgc-r58 .project-subnav-noscript span {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 2px 0 4px;
    color: var(--sgc58-muted);
    font-size: .72rem;
    line-height: 1.35;
  }

  body.sgc-r58 .project-subnav-noscript a {
    color: var(--sgc58-ink);
    font-size: .8rem;
    font-weight: 600;
  }

  body.sgc-r58 .project-subnav-noscript a:last-child {
    justify-self: end;
  }
}
