/* Onosoji Platform v2.9.3 — rendered-layout correction.
   1. The approved homepage hero is allowed to use a genuinely wide shell.
   2. Multi-item evidence/process groups use one bounded surface with internal
      divisions, taking the Five Sovereignty Pillars as the visual precedent.
   3. Venture cards share one consistent treatment. */

/* --------------------------------------------------------------------------
   APPROVED HOMEPAGE HERO
   The previous v2.9 rules changed the grid but left it inside the global
   1180px shell and retained a narrow portrait cap. This is the actual fix.
   -------------------------------------------------------------------------- */
@media (min-width: 1280px) {
  .hero-v27 > .shell {
    width: min(1880px, calc(100% - 96px));
  }

  .hero-grid-v27 {
    grid-template-columns: minmax(0, 1.03fr) minmax(660px, .97fr);
    gap: clamp(64px, 4.2vw, 96px);
    align-items: center;
  }

  .hero-v27 h1 {
    max-width: 14ch;
    font-size: clamp(4rem, 4.65vw, 5.6rem);
    line-height: .985;
    letter-spacing: -.048em;
  }

  .hero-v27 .hero-intro {
    max-width: 760px;
  }

  .hero-portrait-v27 {
    width: 100%;
    max-width: 860px;
    margin-left: auto;
  }

  .hero-portrait-v27 img {
    width: 100%;
    height: auto;
  }
}

@media (min-width: 1680px) {
  .hero-v27 {
    padding-top: 46px;
    padding-bottom: 54px;
  }
}

/* --------------------------------------------------------------------------
   BOUNDED EVIDENCE SURFACES
   Do not let four or six related items read like an unfinished spreadsheet.
   They belong to one surface, with internal hierarchy and contained edges.
   -------------------------------------------------------------------------- */
.process-grid {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(11,61,46,.12);
  border-radius: 24px;
  background: rgba(252,251,247,.62);
  box-shadow: 0 14px 38px rgba(5,39,30,.045);
}

.process-step {
  padding: 34px 34px 32px;
  border-top: 0 !important;
  border-bottom: 0;
  background: transparent;
}

.process-step h3 {
  font-size: clamp(1.25rem, 1.8vw, 1.62rem);
}

.process-step p {
  margin-top: .78rem;
}

.green .process-grid,
.green-deep .process-grid {
  border-color: rgba(255,255,255,.19) !important;
  background: rgba(255,255,255,.025);
  box-shadow: none;
}

.green .process-step,
.green-deep .process-step {
  border-color: rgba(255,255,255,.19) !important;
}

/* Info-card groups now behave like the Five Pillars: one coherent object. */
.card-grid.three:has(> .info-card),
.card-grid.two:has(> .info-card) {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(11,61,46,.11);
  border-radius: 24px;
  background: rgba(252,251,247,.58);
  box-shadow: 0 14px 38px rgba(5,39,30,.04);
}

.card-grid.three:has(> .info-card) > .info-card,
.card-grid.two:has(> .info-card) > .info-card,
.v27-card-grid .info-card:not(.green-card) {
  min-height: 0;
  padding: 32px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.card-grid.three:has(> .info-card) > .info-card:nth-child(3n) {
  border-right: 0;
}
.card-grid.three:has(> .info-card) > .info-card:nth-last-child(-n+3) {
  border-bottom: 0;
}

.card-grid.two:has(> .info-card) > .info-card:nth-child(2n) {
  border-right: 0;
}
.card-grid.two:has(> .info-card) > .info-card:nth-last-child(-n+2) {
  border-bottom: 0;
}

.card-grid.three:has(> .info-card) > .info-card h3,
.card-grid.two:has(> .info-card) > .info-card h3 {
  margin-top: 0;
}

.card-grid.three:has(> .info-card) > .info-card .text-link,
.card-grid.two:has(> .info-card) > .info-card .text-link {
  margin-top: 24px;
}

/* The homepage selected-experience accordion is a contained evidence object. */
.proof-shell-v275 {
  border: 0;
  background: transparent;
}

.proof-shell-v275 .selected-experience-accordion {
  border-radius: 26px;
}

/* Profile selected experience: a single grouped body, not another open register. */
.profile-experience-cards .sector-card-grid {
  gap: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(11,61,46,.10);
  border-radius: 24px;
  background: rgba(238,232,219,.40);
  box-shadow: 0 14px 38px rgba(5,39,30,.035);
}

.profile-experience-cards .sector-card-grid article,
.profile-experience-cards .sector-card-grid article:nth-child(odd) {
  padding: 28px 30px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.profile-experience-cards .sector-card-grid article:nth-child(2n) {
  border-right: 0;
}
.profile-experience-cards .sector-card-grid article:nth-last-child(-n+2) {
  border-bottom: 0;
}

/* Ventures: every named venture is a peer in the same system. */
.ventures-grid {
  align-items: stretch;
}

.ventures-grid > .info-card {
  display: flex;
  flex-direction: column;
}

.ventures-grid > .info-card .label {
  margin-bottom: 14px;
  color: var(--green);
}

.ventures-grid > .info-card p:not(.label) {
  color: var(--muted);
}

.ventures-grid > .info-card .venture-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  margin-top: auto;
  padding-top: 26px;
}

/* Responsive boundaries remain contained rather than reverting to open rules. */
@media (max-width: 1040px) and (min-width: 821px) {
  .card-grid.three:has(> .info-card) {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
  .card-grid.three:has(> .info-card) > .info-card {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  .card-grid.three:has(> .info-card) > .info-card:nth-child(2n) {
    border-right: 0;
  }
  .card-grid.three:has(> .info-card) > .info-card:nth-last-child(-n+2) {
    border-bottom: 0;
  }
}

@media (max-width: 900px) {
  .profile-experience-cards .sector-card-grid article,
  .profile-experience-cards .sector-card-grid article:nth-child(odd) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .profile-experience-cards .sector-card-grid article:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 820px) {
  .process-grid,
  .card-grid.three:has(> .info-card),
  .card-grid.two:has(> .info-card),
  .profile-experience-cards .sector-card-grid {
    border-radius: 20px;
  }

  .card-grid.three:has(> .info-card) > .info-card,
  .card-grid.two:has(> .info-card) > .info-card,
  .v27-card-grid .info-card:not(.green-card) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .card-grid.three:has(> .info-card) > .info-card:last-child,
  .card-grid.two:has(> .info-card) > .info-card:last-child {
    border-bottom: 0;
  }

  .process-step {
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
  }
  .process-step:last-child {
    border-bottom: 0 !important;
  }
  .green .process-step,
  .green-deep .process-step {
    border-bottom-color: rgba(255,255,255,.19) !important;
  }
}

@media (max-width: 560px) {
  .hero-v27 > .shell {
    width: calc(100% - 32px);
  }
  .process-step,
  .card-grid.three:has(> .info-card) > .info-card,
  .card-grid.two:has(> .info-card) > .info-card {
    padding: 24px 22px;
  }
}
