/* Homepage-only readability and the fourth branch; retain existing colors and motion. */
.homepage-presentation-v2-root .section-heading > p:not(.system-label),
.homepage-presentation-v2-root .hero-lede,
.homepage-presentation-v2-root .problem-entry > p,
.homepage-presentation-v2-root .capability-core,
.homepage-presentation-v2-root .capability-panel-proof li,
.homepage-presentation-v2-root .contact-inner > p:not(.system-label) {
  font-size: max(1rem, 16px);
  line-height: 1.75;
  color: var(--v2-black);
}
.homepage-presentation-v2-root .hero-capability p,
.homepage-presentation-v2-root .capability-grid small {
  font-size: .9375rem;
  line-height: 1.6;
  color: var(--v2-black);
}
.homepage-presentation-v2-root .portfolio-summary {
  font-size: 1rem;
  line-height: 1.7;
  color: #e0e0da;
}
.homepage-presentation-v2-root .hero-capability-index { font-size: .75rem; }
/* Keep the production three-node geometry; extend only its lower right branch. */
@media (min-width: 601px) {
  .homepage-presentation-v2-root .hero-capability-stage {
    --production-stage-height: clamp(340px, 27vw, 370px);
    --stage-height: var(--production-stage-height);
    height: calc(var(--production-stage-height) + 164px);
    min-height: 504px;
  }
  .homepage-presentation-v2-root .hero-capability-line { top: calc(var(--production-stage-height) * .16); }
  .homepage-presentation-v2-root .hero-capability-list::before {
    top: calc(var(--production-stage-height) * .16);
    height: calc(var(--production-stage-height) * .36);
  }
  .homepage-presentation-v2-root .hero-capability-list::after {
    top: calc(var(--production-stage-height) * .16);
    height: calc(var(--production-stage-height) * .63);
  }
  .homepage-presentation-v2-root .hero-capability:nth-child(1) { top: calc(var(--production-stage-height) * .24); }
  .homepage-presentation-v2-root .hero-capability:nth-child(2) { top: calc(var(--production-stage-height) * .52 - 24px); }
  .homepage-presentation-v2-root .hero-capability:nth-child(3) { top: calc(var(--production-stage-height) * .79 - 24px); }
  .homepage-presentation-v2-root .hero-capability:nth-child(4) {
    top: calc(var(--production-stage-height) * .79 + 116px);
    right: 0; width: 41%; padding-left: 20px; animation-delay: 720ms;
  }
  .homepage-presentation-v2-root .hero-capability:nth-child(4)::before {
    top: 23px; left: 0; width: 12px; height: 1px;
  }
  .homepage-presentation-v2-root .hero-capability:nth-child(4)::after {
    top: 20px; left: -4px; animation-delay: 1040ms;
  }
  .hero-fourth-branch {
    position: absolute;
    top: calc(var(--production-stage-height) * .16);
    left: 50%; width: 9%;
    height: calc(var(--production-stage-height) * .63 + 140px);
    border-left: 1px solid var(--pipe-line); border-bottom: 1px solid var(--pipe-line);
    pointer-events: none; clip-path: inset(0 0 100% 0);
    animation: hero-branch-reveal 700ms cubic-bezier(.22,.8,.28,1) 570ms forwards;
    transition: border-color 180ms ease;
  }
}
.homepage-presentation-v2-root .hero-capability p { text-wrap: balance; }
.hero-capability-list:has(.hero-capability:nth-child(2):hover, .hero-capability:nth-child(2):focus-visible)::before,
.hero-capability-list:has(.hero-capability:nth-child(3):hover, .hero-capability:nth-child(3):focus-visible)::after { z-index: 2; }
.hero-capability-stage:has(.hero-capability:nth-child(4):hover, .hero-capability:nth-child(4):focus-visible) .hero-fourth-branch {
  border-color: var(--v2-orange); z-index: 2;
}
@media (min-width: 901px) {
  .homepage-presentation-v2-root .hero-copy { min-width: 0; }
  .homepage-presentation-v2-root .hero h1 {
    max-width: 100%; width: 100%;
    font-size: clamp(2.83rem, 3.9vw, 4.44rem);
  }
  .homepage-presentation-v2-root .hero h1 > span { white-space: nowrap; }
}
@media (max-width: 600px) {
  .homepage-presentation-v2-root .hero-capability:nth-child(4) {
    top: auto; left: auto; right: auto; width: auto; padding: 10px 10px 9px 14px;
    margin-right: 16px;
  }
  .homepage-presentation-v2-root .hero-capability:nth-child(4)::before { top: 50%; left: -21px; width: 20px; height: 1px; }
  .homepage-presentation-v2-root .hero-capability:nth-child(4)::after { top: calc(50% - 4px); left: -5px; width: 7px; height: 7px; }
  .hero-fourth-branch { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-fourth-branch { animation: none; clip-path: none; }
}
/* Keep the work-section introduction readable on its existing dark surface. */
.homepage-presentation-v2-root .work-section .section-heading > p:not(.system-label) {
  color: #e0e0da;
}

/* Preview feedback: keep the process connector on its node row, above the titles. */
@media (min-width: 761px) {
  .homepage-presentation-v2-root .process-board {
    --process-board-padding: clamp(26px, 3.5vw, 42px);
    padding: var(--process-board-padding);
  }
  .homepage-presentation-v2-root .process-board li {
    grid-template-rows: .62rem 56px auto 1fr;
  }
  .homepage-presentation-v2-root .process-line {
    top: calc(var(--process-board-padding) + .62rem + 28.5px);
  }
}
.homepage-presentation-v2-root .process-board li small,
.homepage-presentation-v2-root .process-section .tony-observation {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--v2-black);
}
.homepage-presentation-v2-root .hero-lede {
  text-wrap: balance;
}

/* Final review: stronger panel headings and more room for the work list. */
.homepage-presentation-v2-root .capability-panel h3 { font-weight: 900; }
@media (min-width: 901px) {
  .homepage-presentation-v2-root .capability-panel {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }
}
/* Round 2 v3: only requested behavior and mobile exceptions. */
.homepage-presentation-v2-root .problem-entry > p[hidden] { display: none; }
.homepage-presentation-v2-root a.portfolio-card { color: inherit; text-decoration: none; }
.homepage-presentation-v2-root .hero h1 .hero-line-tail { display: inline; }
@media (max-width: 760px) {
  .homepage-presentation-v2-root .hero h1 > span { white-space: nowrap; }
  .homepage-presentation-v2-root .hero h1 .hero-line-tail { display: block; }


  .homepage-presentation-v2-root .capability-tag { display: block; white-space: nowrap; }
  .homepage-presentation-v2-root .hero-capability-stage { height: auto; min-height: 0; }
  .homepage-presentation-v2-root .hero-capability-list { position: relative; inset: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 0; }
  .homepage-presentation-v2-root .hero-capability:nth-child(n) { position: relative; inset: auto; width: auto; margin: 0; }
  .homepage-presentation-v2-root .hero-capability-line,
  .homepage-presentation-v2-root .hero-fourth-branch,
  .homepage-presentation-v2-root .hero-capability-list::before,
  .homepage-presentation-v2-root .hero-capability-list::after,
  .homepage-presentation-v2-root .hero-capability::before { display: none; }
}

/* PR #16 closeout: two mobile-only layout corrections. */
@media (max-width: 760px) {
  .homepage-presentation-v2-root .footer-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .homepage-presentation-v2-root .footer-links a { min-width: 0; width: 100%; }
  .homepage-presentation-v2-root .footer-links a > span { display: none; }
  .homepage-presentation-v2-root [data-problem-entry="evidence"] h3 { white-space: nowrap; }
  .homepage-presentation-v2-root .evidence-mobile-line { display: block; }
}
