/*
  Paṇatā v2.0.0 RC5.1 — Surgical Layout Recovery
  Scope: homepage equation + Begin Reading position + Philosophy Section III.
  No global typography, navigation, Manifesto, Research, Journal, Challenge,
  Turnstile, or shared grid rules are changed here.
*/

/* --------------------------------------------------------------------------
   Homepage: keep the manuscript equation as one composed unit.
   -------------------------------------------------------------------------- */
body.v2-home .v2-home-art {
  position: relative !important;
}

body.v2-home .v2-home-art figcaption.rc5-value-equation,
body.v2-home .v2-home-art figcaption.rc5-1-home-equation {
  position: absolute !important;
  right: clamp(20px, 2vw, 34px) !important;
  top: 50% !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 4 !important;
  transform: translateY(-50%) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 16px !important;
  color: #715936 !important;
  opacity: 1 !important;
  text-align: center !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.35) !important;
}

body.v2-home .v2-home-art figcaption.rc5-value-equation > span,
body.v2-home .v2-home-art figcaption.rc5-1-home-equation > span {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  font-family: var(--serif, Georgia, serif) !important;
  font-size: clamp(13px, 1.02vw, 17px) !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  letter-spacing: .20em !important;
}

body.v2-home .v2-home-art figcaption.rc5-value-equation > i,
body.v2-home .v2-home-art figcaption.rc5-1-home-equation > i,
body.v2-home .v2-home-art figcaption .rc5-equation-sign {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  font-family: var(--serif, Georgia, serif) !important;
  font-size: clamp(15px, 1.15vw, 20px) !important;
  font-style: normal !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}

/* Pull the reading invitation into the natural continuation of the hero. */
body.v2-home .v2-home-hero-grid {
  min-height: 640px !important;
}

body.v2-home .turn-page {
  position: relative !important;
  z-index: 5 !important;
  margin-top: -34px !important;
}

/* --------------------------------------------------------------------------
   Philosophy III: restore the original horizontal four-stage memory sequence.
   This explicitly neutralizes the accidental RC5 equation class on this block.
   -------------------------------------------------------------------------- */
body.v2-philosophy .v2-memory-page .v2-memory-figure,
body.v2-philosophy .v2-memory-page .v2-memory-figure.rc5-value-equation {
  position: relative !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  justify-content: initial !important;
  gap: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 65px 0 0 !important;
  padding: 0 !important;
  color: inherit !important;
  text-align: left !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  text-shadow: none !important;
  border-top: 1px solid rgba(116,114,104,.35) !important;
  border-bottom: 1px solid rgba(116,114,104,.35) !important;
}

body.v2-philosophy .v2-memory-page .v2-memory-figure > div,
body.v2-philosophy .v2-memory-page .v2-memory-figure.rc5-value-equation > div {
  position: relative !important;
  display: block !important;
  min-height: 220px !important;
  margin: 0 !important;
  padding: 34px !important;
  color: inherit !important;
  font-family: var(--serif, Georgia, serif) !important;
  font-size: 25px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: normal !important;
  text-align: left !important;
  text-transform: none !important;
}

body.v2-philosophy .v2-memory-page .v2-memory-figure > div > span,
body.v2-philosophy .v2-memory-page .v2-memory-figure.rc5-value-equation > div > span {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

body.v2-philosophy .v2-memory-page .v2-memory-figure > div:not(:last-child)::after {
  content: "→" !important;
  position: absolute !important;
  right: -8px !important;
  top: 50% !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
  color: var(--bronze, #906735) !important;
  font-family: var(--serif, Georgia, serif) !important;
  font-size: 24px !important;
  line-height: 1 !important;
}

body.v2-philosophy .v2-memory-page .v2-memory-figure > div:last-child {
  background: var(--forest, #173A2A) !important;
  color: #F1EBDD !important;
}

@media (max-width: 1100px) {
  body.v2-home .v2-home-hero-grid {
    min-height: 600px !important;
  }

  body.v2-home .turn-page {
    margin-top: -20px !important;
  }
}

@media (max-width: 760px) {
  body.v2-home .v2-home-art figcaption.rc5-value-equation,
  body.v2-home .v2-home-art figcaption.rc5-1-home-equation {
    right: 14px !important;
    gap: 10px !important;
  }

  body.v2-home .v2-home-hero-grid {
    min-height: 0 !important;
  }

  body.v2-home .turn-page {
    margin-top: 10px !important;
  }

  body.v2-philosophy .v2-memory-page .v2-memory-figure,
  body.v2-philosophy .v2-memory-page .v2-memory-figure.rc5-value-equation {
    grid-template-columns: 1fr !important;
  }

  body.v2-philosophy .v2-memory-page .v2-memory-figure > div,
  body.v2-philosophy .v2-memory-page .v2-memory-figure.rc5-value-equation > div {
    min-height: 150px !important;
  }

  body.v2-philosophy .v2-memory-page .v2-memory-figure > div:not(:last-child)::after {
    content: "↓" !important;
    right: 50% !important;
    top: auto !important;
    bottom: -10px !important;
    transform: translateX(50%) !important;
  }
}
