/* Website-consistent navigation for project form. */
body{background:#fff}header.site-header{position:sticky;top:0;z-index:4000;background:#071827}
header.site-header .nav-links .sc-project-menu-link{color:#fff;background:#087ac8;border-radius:999px;padding:10px 14px;font-weight:800;white-space:nowrap}
header.site-header .nav-links .sc-project-menu-link:hover{background:#06a6c3;color:#fff}
header.site-header .brand{line-height:normal}
header.site-header .brand-logo-image{object-fit:contain}
@media(max-width:1000px){header.site-header .nav-links .sc-project-menu-link{margin:6px 0;display:block;text-align:center}}
/* Keep form widgets styled independently of shared pages */
.intake-section input,.intake-section select,.intake-section textarea{max-width:100%}
.intake-section .panel,.intake-section .sidebar{color:#263443}
.intake-section .actions .primary{background:linear-gradient(105deg,#087ac8,#10b7c9);color:#fff}

/* Leave the form heading visible beneath the sticky site navigation. */
#project-questionnaire{scroll-margin-top:90px}
@media(max-width:600px){#project-questionnaire{scroll-margin-top:74px}}

/* Native sticky is constrained to the questionnaire GRID, not the hero or CTA.
   JS only reads header size; it NEVER moves/positions the sidebar. */
@media (min-width: 861px) {
  #project-questionnaire .layout > .sidebar {
    position: sticky !important;
    top: calc(var(--intake-header-height, 72px) + 16px) !important;
    left: auto !important;
    width: auto !important;
    align-self: start !important;
    max-height: calc(100dvh - var(--intake-header-height, 72px) - 32px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    z-index: 2 !important;
  }
}
@media (max-width: 860px) {
  #project-questionnaire .layout > .sidebar {
    position: static !important;
    top: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

/* Unified form: sticky sidebar within form only, no JS fixed positioning. */
@media (min-width: 861px) {
  #project-questionnaire .layout {
    display: grid !important;
    grid-template-columns: 280px minmax(0,1fr) !important;
    align-items: start !important;
    min-height: max(540px, calc(100dvh - var(--intake-header-height, 76px) - 42px));
    position: relative;
    overflow: visible !important;
  }
  #project-questionnaire .layout > .sidebar {
    position: sticky !important;
    top: calc(var(--intake-header-height, 76px) + 16px) !important;
    margin: 0 !important;
    max-height: calc(100dvh - var(--intake-header-height, 76px) - 32px) !important;
    overflow-y: auto !important;
    scrollbar-width: thin;
    z-index: 2 !important;
  }
}
@media (max-width: 860px) {
  #project-questionnaire .layout {min-height: 0;}
  #project-questionnaire .layout > .sidebar {position: static !important;max-height: none !important;overflow: visible !important;}
}
/* Match shared site footer without letting standalone form styles take over. */
footer.footer.v59-footer {display:block!important;}

/* Project intake: hide the progress sidebar on phones and narrow tablets. */
@media (max-width: 860px) {
  #project-questionnaire .layout > .sidebar { display: none !important; }
  #project-questionnaire .layout { grid-template-columns: minmax(0, 1fr) !important; }
  #project-questionnaire .layout > .panel { grid-column: 1 / -1 !important; min-width: 0; }
}
