/* Shared phone refinements; branded pages use the same stylesheet. */
html { overflow-x: clip; }
body { overflow-x: clip; }
.compact-menu-toggle { display: none; }
@media (min-width: 621px) {
  html[data-brand="nest"] .hero-index { translate: 0 clamp(20px, 2.5vw, 40px); }
}
@media (max-width: 620px) {
  .hero-index { display: none; }
  .hero-index a { font-size: clamp(.75rem, 3.2vw, .9rem); letter-spacing: 0; min-height: 44px; display: flex; align-items: center; }
  html[data-brand="nest"] .hero-index { translate: 0 12px; }
  .compact-menu-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: .5rem; background: none; color: inherit; border: 0; font: inherit; font-size: .9rem; }
  .compact-menu-toggle svg { width: 22px; height: 22px; }
  .compact-nav .compact-links { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: .7rem var(--page-pad) 1rem; background: var(--surface); border-bottom: 1px solid var(--rule); }
  .compact-nav[data-cursor-theme="dark"] .compact-links { background: var(--deep); }
  .compact-nav.is-menu-open .compact-links { display: grid; gap: .15rem; }
  .compact-nav .compact-links a { font-size: 1rem; padding: .8rem 0; min-height: 44px; }

  .editorial-intro { height: auto; }
  .editorial-intro__stage { position: relative; height: auto; min-height: 0; overflow: clip; }
  .editorial-intro__inner { padding: 6rem var(--page-pad) 4rem; }
  .editorial-intro__inner > .editorial-intro__reveal--headline { width: 65%; }
  .editorial-intro__headline { font-size: clamp(2.15rem, 8.4vw, 3.2rem); max-width: 10ch; }
  .editorial-intro__nest { top: 6.3rem; right: var(--page-pad); width: 28%; }
  .editorial-intro__mark { width: clamp(66px, 20vw, 100px); }
  .editorial-intro__mark .nest-ring { border-width: 1px; }
  .editorial-intro__row { margin-top: 2rem; }
  .editorial-intro.is-ready .editorial-intro__reveal > * { opacity: 1; }

  .capabilities-inner { display: grid; grid-template-columns: minmax(0, 1fr); }
  .capabilities-opening { grid-area: 1 / 1; }
  .capabilities-eyebrow { min-height: 3.25rem; padding-right: 124px; }
  .capabilities-layout { display: contents; }
  .capabilities-chapters { grid-area: 2 / 1; }
  .capabilities-rail { grid-area: 1 / 1 / 3 / 2; align-self: start; position: sticky; top: 3.9rem; z-index: 5; margin: -2.5rem 0 0; padding: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none; }
  .capabilities-rail__sticky { position: static; }
  .capabilities-rail__nest { width: 112px; margin: 0 0 0 auto; isolation: isolate; }
  .capabilities-rail__nest.nest-orbit::before { content: ''; inset: 9%; border: 0; border-radius: 50%; background: var(--deep); z-index: -1; }
  .capabilities-rail__nest .nest-ring { border-width: 1px; }
  .cap-chapter__heading { font-weight: 400; letter-spacing: -.025em; font-size: min(15vw, 18cqi); -webkit-text-stroke-width: 1px; }

  .how-we-work__examples { font-size: .88rem; line-height: 1.65; }
  .how-we-work__examples span { display: inline; }
  .how-we-work__founder { grid-template-columns: 80px minmax(0, 1fr); gap: 1.25rem; }
  .how-we-work__founder-profile, .how-we-work__founder-copy { display: contents; }
  .how-we-work__founder-picture { grid-column: 1; grid-row: 1; }
  .how-we-work__founder-heading { grid-column: 2; grid-row: 1; align-self: center; }
  .how-we-work__founder-copy > p { grid-column: 1 / -1; margin-top: 0; }
  .how-we-work__founder .how-we-work__founder-links { grid-column: 1 / -1; grid-row: 4; flex-direction: row; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 0; }
  .how-we-work__founder-links a { min-height: 44px; display: inline-flex; align-items: center; gap: .25rem; }
}

@media (max-width: 620px) {
  .cap-chapter__heading-base { display: block; }
}

/* Keep the whole overlap story on phones, with a compact left-to-right roll. */
@media (max-width: 620px) and (prefers-reduced-motion: no-preference) {
  .editorial-intro { height: calc(100svh + 1500px); }
  .editorial-intro__stage { position: sticky; top: 0; min-height: 100svh; height: auto; overflow: visible; }
  .editorial-intro__inner { padding-top: 6rem; padding-bottom: 3rem; }
  .editorial-intro__inner > .editorial-intro__reveal--headline { margin-left: 35%; width: 65%; }
  .editorial-intro__nest { left: var(--page-pad); right: auto; }
  .editorial-intro__reveal { opacity: var(--intro-copy-opacity, 1); }
}

/* Outline the silhouette on phones without animated highlight layers. */
@media (max-width: 620px) {
  .cap-chapter__heading-base {
    -webkit-text-stroke: 0;
    -webkit-text-fill-color: currentColor;
    filter: url("#mobile-glyph-outline");
  }
}
